Overview

A Markov chain is a stochastic model whose present state contains the information from its past needed to predict the next step. This article treats discrete time and a finite state space, with transition probabilities that do not change with time.

The Markov property is conditional. Consecutive states can be strongly dependent. It also depends on what is recorded as the state: omitting a relevant component can make an observed process fail the property.

Prerequisites

Know conditional probability, finite probability distributions, and matrix multiplication. A stochastic process is an indexed family of random variables. Here its index is n=0,1,…n=0,1,\ldots, and its state space is a finite set SS.

Use row vectors for distributions. This fixes the direction of matrix multiplication and prevents ambiguity in formulas for evolution and stationarity.

Definition and conventions

A time-homogeneous Markov chain has an initial law α\alpha and a matrix P=(pij)i,j∈SP=(p_{ij})_{i,j\in S} with nonnegative entries and row sums one. For every positive-probability history,

P(Xn+1=j∣X0=i0,…,Xn=i)=pij.P(X_{n+1}=j\mid X_0=i_0,\ldots,X_n=i) =p_{ij}.

Equivalently, P(Xn+1=j∣σ(X0,…,Xn))=pXnjP(X_{n+1}=j\mid\sigma(X_0,\ldots,X_n))=p_{X_nj} almost surely. This latter formulation avoids assigning ratios to impossible histories.

The matrix being independent of nn is time homogeneity, an additional convention beyond the Markov property itself. A stationary distribution is a probability row vector π\pi satisfying πP=π\pi P=\pi.

Intuition

The current state is a summary for prediction, not a statement that the past never influences the present. For instance, a machine's current operating mode can reflect its earlier history while still being sufficient to specify its next transition probabilities.

An iid finite-valued sequence is a special case, obtained when every row of PP is the same distribution and the initial law agrees with it. Most transition matrices have different rows, so knowledge of the current state changes the next-state prediction.

Examples and non-examples

On S={0,1}S=\{0,1\}, take

P=(0.80.20.40.6).P=\begin{pmatrix}0.8&0.2\\0.4&0.6\end{pmatrix}.

Starting from 00, the probability of being at 11 after two steps is 0.8(0.2)+0.2(0.6)=0.280.8(0.2)+0.2(0.6)=0.28. Solving π0(0.2)=π1(0.4)\pi_0(0.2)=\pi_1(0.4) and π0+π1=1\pi_0+\pi_1=1 gives π=(2/3,1/3)\pi=(2/3,1/3).

Even when started in π\pi, the chain is not independent: P(Xn+1=1∣Xn=1)=0.6P(X_{n+1}=1\mid X_n=1)=0.6, whereas P(Xn+1=1)=1/3P(X_{n+1}=1)=1/3.

For a nonexample, choose independent fair bits A,BA,B, and define X0=AX_0=A, X1=BX_1=B, X2=AX_2=A. Knowing X1X_1 alone leaves X2X_2 fair, while knowing X0X_0 determines X2X_2. The current state has lost information needed to predict the future.

The deterministic alternation 0,1,0,1,…0,1,0,1,\ldots is a Markov chain. Its matrix has zero diagonal and unit off-diagonal entries. It has stationary law (1/2,1/2)(1/2,1/2), but from state 00 its distributions alternate forever.

Important properties

Multiplying one-step probabilities along a path and summing over intermediate states gives the Chapman–Kolmogorov identity. Hence the nn-step matrix is PnP^n and the time-nn law is αPn\alpha P^n.

Every finite stochastic matrix has a stationary distribution. One existence proof averages α,αP,…,αPn−1\alpha,\alpha P,\ldots,\alpha P^{n-1}, takes a convergent subsequence in the probability simplex, and observes that multiplying the average by PP changes it by (αPn−α)/n(\alpha P^n-\alpha)/n.

If the finite chain is irreducible, every state can reach every other and the stationary distribution is unique and positive. If it is also aperiodic, the greatest common divisor of possible positive return times is one, and αPn→π\alpha P^n\to\pi for every initial law.

Proof idea for convergence: irreducibility and aperiodicity make some power of a finite transition matrix strictly positive. This permits coupling with a uniformly positive chance to make two copies meet in each block. Their remaining disagreement probability decays geometrically.

Connections and further reading

Stopping times describe first visits; conditional expectation extends the transition rule to functions of the next state. Cambridge, §§1, 8 and 9 develops the theory. Chen's course outline, Chapter 2 documents 马尔可夫链 as literature usage.