If the weather can either be sunny or rainy on a particular day, and the probability of sun on any particular day depends on the weather in the previous two days, assume the following is true: $$P[\text{sun today}] = \begin{cases} \frac{1}{6} \text{ if }r = 2 \\ \frac{1}{3} \text{ if }r = 1 \\ \frac{1}{2} \text{ if }r = 0 \\ \end{cases}$$ where $r$ is the number of rainy days in the previous two days.
What is the PTM of this Markov chain?
I'm not sure how to enumerate the states of this chain.
You consider two recent days and each day has two possibilities. Therefore, you have four states. Let
Rrepresent rainy andSsunny. So the states are:RR,RS,SR,SS.So for instance if you are in the state
RR, you go to stateRSwith probability $\frac{1}{6}$ and remain in that state with probability $1-\frac{1}{6}$. Hence the transtion matrix becomes$\hspace{6.75cm}$
RR$\hspace{5mm}$RS$\hspace{4mm}$SR$\hspace{4mm}$SS$$\begin{bmatrix} 1-\frac{1}{6}&\frac{1}{6} & 0 & 0\\ 0&0 & 1-\frac{1}{3} & \frac{1}{3}\\ 1-\frac{1}{3}&\frac{1}{3} & 0 & 0\\ 0&0 & 1-\frac{1}{2} & \frac{1}{2} \end{bmatrix}$$