Ergodic theorem for a positive Harris recurrent Markov chain (source code)

= Ergodic theorem for a positive Harris recurrent Markov chain

For a positive Harris recurrent <Markov chain> with invariant probability $\pi$ and $\int|h|\,d\pi<\infty$, its time average converges almost surely to the invariant expectation:
$$
\frac1N\sum_{t=1}^Nh(X_t)\longrightarrow\int h\,d\pi.
$$
This is the consistency result for <Markov chain Monte Carlo> averages. Independent-observation variance formulas do not follow from this theorem.