The arithmetic, with the Weather preset
The preset's matrix, with the states in the order Sunny, Cloudy and Rainy, is
\[ P = \begin{pmatrix} 0.7 & 0.2 & 0.1 \\ 0.3 & 0.4 & 0.3 \\ 0.2 & 0.3 & 0.5 \end{pmatrix}. \]
The distribution n steps from now
If today the probability of being in each state is the row vector \(\pi^{(0)}\), tomorrow's follows from the law of total probability: to be in state j tomorrow you must be in some state i today and move from i to j.
\[ \pi^{(1)}_j = \sum_i \pi^{(0)}_i\,p_{ij} \quad\Longleftrightarrow\quad \pi^{(1)} = \pi^{(0)}P. \]
Repeating the argument, n steps from now:
\[ \pi^{(n)} = \pi^{(0)}P^{\,n}. \]
For example, if today is Sunny, the probability that it is Sunny again in two days adds up the three possible paths (via Sunny, via Cloudy or via Rainy):
\[ 0.7 \cdot 0.7 + 0.2 \cdot 0.3 + 0.1 \cdot 0.2 = 0.57. \]
Carrying on like this, starting from Sunny:
| Steps | Sunny | Cloudy | Rainy |
| 0 | 1 | 0 | 0 |
| 1 | 0.700 | 0.200 | 0.100 |
| 2 | 0.570 | 0.250 | 0.180 |
| 3 | 0.510 | 0.268 | 0.222 |
| 5 | 0.469 | 0.279 | 0.252 |
| 8 | 0.458 | 0.282 | 0.260 |
| Limit (π) | 0.457 | 0.283 | 0.261 |
Within a week, the information that today is Sunny has almost been lost. Starting from Rainy leads to the same limiting values.
Solving πP = π
The stationary distribution is the one that does not change after one step. Writing \(\pi = (s, c, r)\), the condition \(\pi P = \pi\) gives one equation per column of P; two are enough, together with the probabilities summing to 1:
\[ \begin{aligned} s &= 0.7\,s + 0.3\,c + 0.2\,r \\ c &= 0.2\,s + 0.4\,c + 0.3\,r \\ 1 &= s + c + r \end{aligned} \]
From the first, \(3s = 3c + 2r\); from the second, \(6c = 2s + 3r\). Substituting one into the other gives \(c = \tfrac{13}{12}\,r\) and \(s = \tfrac{21}{12}\,r\), and with the third:
\[ \pi = \left( \frac{21}{46},\ \frac{13}{46},\ \frac{12}{46} \right) \approx (0.457,\ 0.283,\ 0.261). \]
In the long run, 45.7% of days are sunny, whatever the weather today. It is the same result the simulator gets by multiplying repeatedly by P.
How fast it gets there
The speed depends on the second largest eigenvalue of P in absolute value. In the Weather preset it is \(\lambda_2 \approx 0.47\): at each step, the distance between \(\pi^{(n)}\) and \(\pi\) is multiplied by roughly 0.47, and after 8 steps it is below 0.003. With two states the calculation is direct. If the matrix is
\[ P = \begin{pmatrix} 1-a & a \\ b & 1-b \end{pmatrix}, \]
at equilibrium the flow from 1 to 2 equals the flow from 2 to 1, \(\pi_1 a = \pi_2 b\), and therefore
\[ \pi = \left( \frac{b}{a+b},\ \frac{a}{a+b} \right), \qquad \lambda_2 = 1 - a - b. \]
If a and b are small, the chain rarely changes state, \(\lambda_2\) is close to 1 and convergence is slow. You can check this in Custom mode with 2 states.
Two ways of "converging"
Two things are worth telling apart. The distribution at step n, \(\pi^{(n)}\), converges to π very quickly (geometrically), and is the one in the table above. The fraction of time a single path spends in each state, which is what the simulator plots, also converges to π (this is the ergodic theorem), but much more slowly, like \(1/\sqrt{n}\), because it is an average over a random path.
Customer / Churn preset: time until churn
When there is an absorbing state, the interesting question is not where the chain ends up, but how long it takes. Let \(t_A\) and \(t_D\) be the expected number of steps to Churn starting from Active and from Dormant. Taking one step and seeing where you land:
\[ \begin{aligned} t_A &= 1 + 0.80\,t_A + 0.15\,t_D \\ t_D &= 1 + 0.20\,t_A + 0.60\,t_D \end{aligned} \]
Solving the system gives \(t_A = 11\) and \(t_D = 8\): an active customer lasts 11 periods on average before churning, 8 of them as active and 3 as dormant.