[Math] Weather forecasting problem using Markov chains

markov chainsmarkov-process

Suppose that the weather tomorrow depends only on the weather today and that there are $3$ states for the weather: Sun, Cloudy, Rainy. Suppose today is day $1$ and is Sun, what's the probability of raining in day $3$ and $4$?

The transition matrix is known and is given by :

$$P=\begin{pmatrix} 0.5 & 0.3 & 0.2 \\ 0.5 & 0.2 & 0.3 \\ 0.4 & 0.5 & 0.1 \end{pmatrix}$$

My question here is the following, If I do $P^2$ I can know the weather in day $3$ and if I do $P^3$ I can know the weather for day $4$. However, how can I know the weather simultaneously for those days?

Best Answer

Denoting your state space by $\{S,C,R\}$, you are searching for:

$$\Bbb P (X_4 = R, X_3 = R | X_1 = S) = \Bbb P(X_4 = R | X_3 = R,X_1=S)\Bbb P (X_3=R|X_1=S)$$ Can you go further by yourself? This step should be an answer to your question already.

EDIT: Further, by the markov property above equals $$ \Bbb P(X_4 = R | X_3 = R)\Bbb P (X_3=R|X_1=S) = P(R,R)\cdot P^2(S,R) = 0.1\cdot 0.21 $$