= Stochastic matrix
{title2=$P$}
{wiki}
= Transition matrix
{synonym}
A row-stochastic <matrix> has nonnegative entries and each row sums to one. For a time-homogeneous <Discrete-time Markov chain>, its <transition matrix> has entries
$$
P_{ij}=\mathbb P(X_{n+1}=j\mid X_n=i).
$$
If a state has zero <probability> at time $n$, this row is specified by the model's <Markov kernel>, rather than recovered by conditioning on that zero-<probability> event. Rows index departure states and columns arrival states. Writing the current <probability distribution> as a row <vector> $\mu_n$ gives
$$
\mu_{n+1}=\mu_nP,\qquad\mu_n=\mu_0P^n.
$$
The row-sum condition ensures that <matrix multiplication> preserves total <probability>. Under a column convention the evolution uses the transpose; the convention must accompany the formula.
For the sunny/rainy <transition matrix>, direct <matrix multiplication> gives
$$
P^2=\begin{pmatrix}0.72&0.28\\0.56&0.44\end{pmatrix}.
$$
In particular, $(P^2)_{SS}=0.8\times0.8+0.2\times0.4=0.72$. The two terms sum the disjoint paths $S\to S\to S$ and $S\to R\to S$. Requiring both subsequent days to be sunny has <probability> $0.64$; requiring only the second day to be sunny permits the extra path through rain.
Generally $(P^n)_{ij}$ is the $n$-step <transition probability>. The identity $P^{m+n}=P^mP^n$ is the discrete-time <Chapman-Kolmogorov equation>: sum over the intermediate state. This makes <matrix powers> useful for forecasting many steps without enumerating every path individually.
Back to article page