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 or random variables X1,X2,,Xn 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.

Alternatively, we can say the sequence or random variables X,Y,Z is said to form a Markov Chain (denoted XYZ) if and only if X and Z are conditionally independent given Y. Specifically, X,Y and Z form a Markov Chain XYZ if the joint probability mass function can be written as

p(x,y,z)=p(x)p(y|x)p(z|y).

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: Probability Vector \@{probability-vector}

A vector whose entries are non-negative and sum to 1 is called a probability vector.

Theorem \@{probability-vectors-form-a-convex-compact-set}

The set of probability vectors in Rn is a convex set, and it is compact.

Proof \@{proof-of-probability-vectors-form-a-convex-compact-set}

Let E be the set of probability vectors in Rn. That is,

E={pRn:pi0,i=1npi=1.}

(Note: E is a n1 dimensional @simplex).

Suppose X,YE. Then

i=1nXi=1,i=1nYi=1.

Then, let λ[0,1]. Now,

i=1nλXi=λ,i=1n(1λ)Yi=1λ,

λX+(1λ)Y=i=1n(λXi+(1λ)Yi)=λ+1λ=1.

Since either λ or 1λ are non-negative, all entries of this convex combination are non-negative, so the combination is again in E and is therefore a probability vector.

We can use Heine-Borel to show that E is compact by showing it is closed and bounded.

Noe that for each pE, and each @coordinate i,

{pRn:pi0}

is a closed half-space. Now, note that the map

f:RnR,f(p)=i=1npi

is continuous, the pre-image of 1 under f is

{pRn:i=1npi=1.}=f1({1}).

Because 1 is closed in R, by A mapping f of a metric space... we have that

{pRn:i=1npi=1.}

is closed

Now,

E=(i=1n{p:pi0}){p:i=1npi=1}

is an intersection of closed sets, which is also closed.

E is obviously bounded - the sum of all coordinates in pE is always 1, so E the closed ball of radius 1 centered at the origin.

Therefore, E is closed and bounded, and is compact.

TODO: we can generalize this to the fact that @simplexes are convex and compact.

Referenced by (1 direct)
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 non-negative 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 non-negative 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-13}

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-15}

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.