Markov Chains
A Markov chain evolves by repeatedly applying a transition kernel: the next-state distribution depends on the current state, not the full recorded path. Stationarity, detailed balance, irreducibility, recurrence, periodicity, and mixing answer different questions, so preserving a target distribution is not by itself evidence that finite samples represent it.
A Markov chain is a stochastic process whose current state contains all information that its transition rule uses. The state may be a weather label, a queue length, an entire parameter vector, or a neural sampler configuration. The Markov property is conditional independence, not “randomness without memory”: the current state can itself encode an arbitrarily long history.
A kernel specifies the next-state law #
For a discrete-time chain ,
The transition matrix has nonnegative entries and rows summing to one. If a row-vector distribution is , then
On a general state space, a transition kernel gives the probability of moving from state into measurable set . This notation covers continuous MCMC algorithms as well as finite matrices.
For example,
describes persistence with occasional switching between two states. Starting from state 1, the next distribution is ; after another step it is . The uncertainty evolves deterministically even though individual paths are random.
Stationarity is a distribution-level fixed point #
A distribution is stationary or invariant when
or, for a kernel, . If , then . For the two-state example, solving and gives .
This equation makes no claim about a particular initialized chain. The identity kernel leaves every distribution invariant but never moves. A sampler can preserve the desired target and still explore it uselessly slowly.
Detailed balance is the stronger pairwise condition
Summing over proves stationarity. A chain satisfying detailed balance is reversible in equilibrium. Detailed balance is sufficient, not necessary: nonreversible chains may also preserve and can sometimes mix faster.
Connectivity and timing determine convergence #
For finite chains:
- States communicate when each can reach the other with positive probability in some number of steps.
- A chain is irreducible when every state communicates with every other.
- A state's period is the greatest common divisor of possible return times; period one is aperiodic.
- A state is recurrent if it returns with probability one, and positive recurrent if its expected return time is finite.
A finite irreducible chain has a unique stationary distribution. Adding aperiodicity gives convergence to it from every initial distribution. Without aperiodicity, distributions can oscillate even though a stationary distribution exists. On infinite state spaces, irreducibility and recurrence need more careful measure-theoretic forms; finite-state intuition cannot simply be copied.
Mixing is about finite-time error #
The total-variation distance
measures the largest probability discrepancy over events. A mixing time asks how many transitions are needed before this error is below a tolerance from specified starts.
Slow mixing has observable causes: high self-transition probability, narrow bridges between modes, strongly correlated coordinates, poor proposal scale, or a state representation that makes important moves unlikely. Trace plots that look locally noisy can still be trapped in one mode.
Autocorrelation means states do not generally carry the information of independent draws. For an estimand with lag correlations , the asymptotic effective sample size is motivated by
This quantity is estimand-specific: a chain can estimate one average well and another poorly.
Hitting times answer path questions #
The first hitting time of a set is
Hitting and return probabilities describe reliability, queues, randomized algorithms, and sampler mode changes. They are different from stationary occupancy. A rare state can have small stationary probability yet be extremely hard to reach from a particular initial state.
A reasoning checklist #
When a Markov-chain claim appears, separate these questions:
- What exactly is the state, and is the transition genuinely Markov in that state?
- Which distribution, if any, is invariant under the kernel?
- Is detailed balance used, or is stationarity proved another way?
- Are all relevant states or modes connected?
- Can periodicity prevent distributional convergence?
- How is finite-run bias or mixing error assessed?
- Which estimand's autocorrelation and Monte Carlo error matter?
The transition rule, invariant distribution, and convergence rate are distinct properties. MCMC works only when all three are aligned with the inference task.