Markov chain probability rain Probability of rain today given rain yesterday is $0.6$, $0.2$ otherwise.
(a) What's the P(rain on the day after tomorrow if it rained today)?
(b) What's mean number of days of a rainy period?
(c) What fraction of days does rain fall?
(b) Really not sure how to do this one. Any help will be appreciated.
(c) For this problem, am I supposed to do pi = pi * P? Then I can compute the stationary distribution and find the proportion in the state for rain? Is that right?
 A: We have the transition matrix $$P = \begin{pmatrix}3/5&2/5\\1/5&4/5\end{pmatrix}. $$ Denote the columns in order by $1$ and $2$ (as according to raining and not raining). Then by the Chapman-Kolmogorov equation:
\begin{align}
\mathbb P(X_2 = 1 \mid X_0=1) &= \mathbb P(X_2=1\mid X_1=1)\mathbb P(X_1=1\mid X_0=1)\\ &\quad+ \mathbb PX_2=1\mid X_1=2)\mathbb P(X_1=2\mid X_0=1)\\
&= P_{11}P_{11} + P_{21}P_{12}\\
&= (3/5)^2 + 2/5\cdot1/5\\
&= 11/25\approx 0.44.
\end{align}
Assume now that $X_0=1$ (it is initially rainy) and let $\tau=\inf\{n>0:X_n=2\}$ (the first day it is not rainy. Then $\tau$ is geometrically distributed with success parameter $2/5$, and therefore has expectation $(2/5)^{-1}=5/2$.
Part (c) is asking for the stationary distribution of the Markov chain, which is the (unique) vector $\pi$ that satisfies $\pi P=\pi$ and $\sum_i \pi_i=1$. From $\pi P = \pi$ we have the system of equations
\begin{align}
3/5\pi_1 + 1/5\pi_2 &= \pi_1\\
2/5\pi_1+4/5\pi_2 &= \pi_2,
\end{align}
which yields $\pi_1=1/3,\pi_2=2/3$.
