Statistics & Probability / Markov Chains & Ergodicity
FREE TO EXPLORE
LABORATORY 40 · STATISTICS & PROBABILITY

Markov Chains & Ergodicity theory

Understand markov chains & ergodicity: probability distributions, theorems, estimation laws, and hypothesis tests.

Probabilistic foundations of Markov Chains & Ergodicity.

Discrete-Time Markov Chains provide the foundational mathematical language for modeling stochastic dynamic systems, queueing networks, algorithmic page ranking, and statistical physics. Defined by the memoryless Markov property where future evolution depends exclusively on the current state, Markov chains reveal rich asymptotic behavior governed by row-stochastic matrices, Chapman-Kolmogorov powers, and the Perron-Frobenius spectral gap. In this laboratory, we simulate stochastic paths, compute stationary left eigenvectors, evaluate ergodic time averages, and confirm the spectral decay gradient m = 0.693. In mathematical statistics, empirical data science, and modern computational engineering, understanding the asymptotic sampling properties and theoretical behavior of Discrete-Time Markov Chains, Transition Matrices, and Ergodic Stationary Distributions provides crucial guarantees. Rigorous experimental validation connects foundational probability laws with observable empirical phenomena, ensuring that statistical inference remains valid under finite sample sizes and real-world data collection constraints.

y = 0.6930 · x

Viva voce questions & analytical theory

What is the formal definition of a Discrete-Time Markov Chain and the Markov Property?

A discrete-time stochastic process {X_n, n = 0, 1, 2, ...} taking values in a countable state space S is a Markov Chain if it satisfies the Markov Property: P(X_{n+1} = j | X_n = i, X_{n-1} = i_{n-1}, ..., X_0 = i_0) = P(X_{n+1} = j | X_n = i) = P_{ij} for all states and all time steps n. In words, the conditional probability distribution of the future state X_{n+1} depends only on the present state X_n, and is conditionally independent of past history X_{n-1}, ..., X_0. If P_{ij} is independent of time n, the chain is time-homogeneous.

What are the Chapman-Kolmogorov equations, and how do they govern multi-step transitions?

The Chapman-Kolmogorov equations state that the n-step transition probability from state i to state j in m + n steps satisfies: P_{ij}^{(m+n)} = ∑_{k ∈ S} P_{ik}^{(m)} P_{kj}^{(n)}. In matrix notation, letting P denote the 1-step transition probability matrix, the n-step transition matrix is simply the n-th matrix power of P: P^{(n)} = P^n. For any initial distribution vector π^{(0)}, the probability distribution over states at time n is given by π^{(n)} = π^{(0)} P^n.

How is a stationary distribution defined, and how is it calculated via left eigenvectors?

A probability distribution vector π on state space S (satisfying π_i ≥ 0 and ∑ π_i = 1) is a stationary (invariant or equilibrium) distribution of Markov chain P if: π = π P. In scalar form: π_j = ∑_{i ∈ S} π_i P_{ij} for all j ∈ S. This means that if the system is initialized according to π, its distribution remains π for all future times. Mathematically, π is a normalized left eigenvector of the transition matrix P associated with the dominant eigenvalue λ_1 = 1.

What does the Perron-Frobenius theorem guarantee for finite irreducible aperiodic Markov chains?

By the Perron-Frobenius theorem applied to stochastic matrices: (1) The largest eigenvalue of P is exactly λ_1 = 1, and its geometric and algebraic multiplicity is 1 if the chain is irreducible; (2) The corresponding left eigenvector has strictly positive entries (π_i > 0 for all i); (3) All other eigenvalues satisfy |λ_j| ≤ 1. If the chain is also aperiodic, all non-trivial eigenvalues lie strictly inside the unit circle: |λ_j| < 1 for all j ≥ 2. Consequently, lim_{n → ∞} P^n = 1 π^T, meaning every row of P^n converges to the identical stationary vector π.

What is the Ergodic Theorem for Markov chains?

The Ergodic Theorem bridges time averages and ensemble averages. For an irreducible, positive-recurrent Markov chain, with probability 1: lim_{N → ∞} (1/N) ∑_{n=1}^N f(X_n) = ∑_{i ∈ S} f(i) π_i = E_π[f(X)]. Specifically, setting f(X) = I(X = i), the long-run fraction of time the process spends visiting state i converges almost surely to its stationary probability π_i = 1 / μ_{ii}, where μ_{ii} is the expected return time to state i. The process 'forgets' its initial starting state.

What is the spectral gap, and how does it dictate the rate of convergence to equilibrium?

Let the eigenvalues of transition matrix P be ordered 1 = λ_1 > |λ_2| ≥ |λ_3| ≥ ···. The spectral gap is defined as γ = 1 - |λ_2|. By spectral decomposition, the distance of the n-step transition matrix from the stationary distribution decays exponentially: ||P^n - 1 π^T|| ≤ C |λ_2|^n = C exp(- n |ln |λ_2||). Thus, the mixing time required to approach equilibrium is inversely proportional to the spectral gap: t_mix ≈ 1 / γ. A small spectral gap indicates bottleneck states that slow down convergence.

How is the detailed balance equation related to reversible Markov chains?

A stationary Markov chain is time-reversible if the process looks statistically identical running forward or backward in time. A necessary and sufficient condition for reversibility is the Detailed Balance condition: π_i P_{ij} = π_j P_{ji} for all i, j ∈ S. The probability flux from state i to j exactly balances the reverse flux from j to i. Detailed balance implies stationarity (summing over i recovers π_j = ∑ π_i P_{ij}) and provides the core foundation for constructing Markov Chain Monte Carlo (MCMC) algorithms like Metropolis-Hastings.

Experimental precautions and statistical checks

  • Verify that every row of the transition matrix P sums to exactly 1.0 (row-stochastic property).
  • Confirm that the chain is both irreducible (single communicating class) and aperiodic before asserting unique convergence.
  • Avoid numerical precision loss during high matrix powers P^n by using repeated squaring algorithms.
  • Account for burn-in time when estimating stationary proportions from empirical Markov trajectories.

Theoretical assumptions & limitations

  • Periodic Markov chains (e.g., alternating bipartite graphs) cycle indefinitely and do not converge to a stationary matrix power.
  • Reducible chains with absorbing states have multiple or starting-state-dependent stationary distributions.
↳
Connect theory to empirical data.

The empirical regression of log-error decay against step index confirms exponential spectral convergence with slope m = 0.6930 and R² = 1.000000.