lacunary - Mathnotes

Markov Chains

Definition: Markov Chain \@{markov-chain}

If we have a system with N states and for each state, a set of N probabilities from transitioning from that state to another state (including itself) we end up with an N×N matrix P where the entry Pjk,j,k{1,,N} represents the probability of transitioning from state j to state k.

Starting with some state, we can transition to another state, then another, with the probability of picking the next state dependent only on the existing state and the matrix P. We call this sequence of random events a Markov Chain.

More formally, the sequence X1,X2, is called a Markov Chain if

P(Xn+1=k|Xn=j,Xn1=jn1,,X0=j0)=P(Xn+1=k|Xn=j).

We write

pjk=P(Xn+1=k|Xn=j),

and note that

pjk0

and

k=1Npjk=1

for j=1,2,,N. We call the pjk values the transition probabilities of the Markov chain.

Note \@{note-2}

Note that pjk is the probability of going from state j to state k in one step. We use the notation

pjk(m)

to represent the probability of going from state j to state k in m steps.

Theorem \@{theorem-3}

pjk(m)=Pjkm.

Proof \@{proof-of-theorem-3}

Due to the magic of linear algebra, if we have a row vector x representing the probability of starting in each state, we can compute the probability of ending up in any given state after m steps as

xPm.

Ergodic Markov Chains

Definition: Ergodic \@{ergodic}

If for some positive integer m we have that pjk(m)>0 for all j,k=1,2,,N, then the Markov chain is said to be ergodic.

Theorem: Stationary Distribution of an Ergodic Chain \@{stationary-distribution}

When the markov chain is ergodic, the limit

πk=limnpjk(n)

exists and

k=1Nπk=1.

Note \@{stationary-distribution-note}

Here, π=π1,π2,,πN and the entries in it represent the long term probabilities of being in any given state, or equivalently, the portion of time spent in any given state.

Note that πP=π, which when combined with the fact that the entries of π sum to 1 lets us solve a linear system of equations to find the entries of π.

Definition: Stochastic Matrix (also: probability matrix, transition matrix, Markov matrix, right stochastic matrix, row stochastic matrix) \@{stochastic-matrix}

A stochastic matrix (actually, a right stochastic matrix) is a @square-matrix A=(aij)Rn×n with nonnegative @entries whose rows each sum to one:

aij0for all i,j,jaij=1for all i.

Equivalently, A1=1 with A0 entrywise, where 1 is the all-ones vector.

Referenced by (2 direct)

Direct references:

Definition: Left Stochastic Matrix (also: column stochastic matrix) \@{left-stochastic-matrix}

A left stochastic matrix is a @square-matrix A=(aij)Rn×n with nonnegative @entries whose columns each sum to one: aij0for all i,j,iaij=1for all j. Equivalently, 1A=1 with A0 entrywise, where 1 is the all-ones vector.

Note \@{note-10}

A stochastic matrix can be used to describe the transitions of a markov chain.

Definition: Doubly Stochastic Matrix (also: bistochastic matrix) \@{doubly-stochastic-matrix}

If a @matrix is both a row stochastic matrix and a column stochastic matrix, it is said to be a doubly stochastic matrix. That is, both its rows and its columns sum to 1.

Referenced by (2 direct)

Direct references:

Note \@{note-12}

A doubly stochastic matrix is a convex combination of @permutation-matrices.

A stochastic matrix maps a probability vector to another probability vector — but only for the matching multiplication convention. A row stochastic matrix preserves the sum acting on the right, xA; a column stochastic matrix preserves it acting on the left, Ax; and a doubly stochastic matrix preserves it either way. The demo below lets you apply each type to a probability vector, build doubly-stochastic matrices as convex combinations of permutation matrices, and iterate the map toward its stationary distribution.