Time-reversed Markov chain (source code)

= Time-reversed Markov chain

For a stationary <Markov chain> with <transition matrix> $P$ and <Stationary distribution> $\pi$, the <time-reversed Markov chain> has <transition matrix>
$$
P^*(x,y)=\frac{\pi(y)P(y,x)}{\pi(x)}
$$
on the <support of a measure>[support] $\{x:\pi(x)>0\}$. The <Stationary distribution> is essential: <Bayes' theorem>[Bayes' rule] gives $P^*(x,y)=\mathbb P(X_{t-1}=y\mid X_t=x)$. The quotient is not defined at a zero-mass state, so arbitrary states outside the stationary <support of a measure>[support] must not be included without an extra convention.

The <stationarity equations> give $\sum_yP^*(x,y)=1$. Also $\sum_x\pi(x)P^*(x,y)=\pi(y)$, so the reversed <Markov kernel>[kernel] has the same invariant law. Multiplying the pairwise identity $\pi(x)P(x,y)=\pi(y)P^*(y,x)$ along a finite path proves equality between its forward <Probability> and the <Probability> of the reversed path under $P^*$.

The reversed chain need not be the original chain. A directed three-state cycle has uniform <Stationary distribution>; <time-reversed Markov chain>[time reversal] traverses the cycle in the opposite direction. A stationary chain is <reversible Markov chain>[reversible] exactly when $P^*=P$, which is equivalent to <Detailed balance>.