Markov Chains: Lecture 2
Markov Chains: Lecture 2
Remark: The above picture shows how the two classes of Markov chains are related. If P n
has all positive entries then
1
Fundamental Limit Theorem: Let P denote the transition matrix for a regular Markov
chain with finite state space. To simplify notation assume S = {1, 2, ..., r}. Then
lim P n = W,
n→∞
where W is an r by r matrix, all rows of which are the same strictly positive probability
vector
w = [p(1), . . . , p(r)].
That is, p(x) > 0 for x ∈ {1, . . . , r} and rx=1 p(x) = 1. In particular, for all y we have
P
Example: Consider the “coffee shop walker” from first lecture. The transition matrix was
0 1 0 0
1/3 0 1/3 1/3
P = 0 1/2 0 1/2 .
0 1/2 1/2 0
We have that
1/3 0 1/3 1/3 0 2/3 1/6 1/6
11 11
0 2/3 1/6 1/6 2/9 1/6 36
2
3 36
P =
1/6 1/4 5 1/6
,
P =
1/12 11 1/6 7
,
12 24 24
5 11 7
1/6 1/4 1/6 12
1/12 24 24
1/6
1/8 3/8 1/4 1/4
1/8 3/8 1/4 1/4
lim P n =
1/8
.
n→∞ 3/8 1/4 1/4
1/8 3/8 1/4 1/4
2
where w is the common row vector of W . Hence the long run probability of being in state
y, namely
Xr
vx P n (x, y),
x=1
is approximately wy for all y = 1, 2, ..., r no matter what initial probability distribution
v = [v1 , ..., vr ] we use. In addition, if w is the common row vector of W , then we also have
wP n = w,
for any n ≥ 0. Since the probability of being in x is wx for all times n = 0, 1, 2, ..., the chain
is in equilibrium if we start with initial distribution w.
Important Fact: Since w is the unique probability vector satisfying x = xP where P is
regular and finite, we can use this to solve for w, and hence compute
lim P n (u, v)
n→∞
for all u, v = 1, 2, ..., r, since this limit equals wv = v th term in w. That is, x = xP is an r
by r system of linear equations in the variables x1 , ..., xr and the solution is the probability
vector w.
Example: Consider the Markov chain with transition matrix
1/2 1/4 1/4
P = 1/2 0 1/2
1/4 1/4 1/2
and state space S = {1, 2, 3}. Then
7/16 3/16 3/8
P 2 = 3/8 1/4 3/8
3/8 3/16 7/16
so P is regular and limn→∞ P n = W exists. To find w we solve xP = x subject to x being a
probability vector, i.e. x1 + x2 + x3 = 1 and all xi ≥ 0. Then
x1 /2 + x2 /2 + x3 /4 = x1
x1 /4 + 0 × x2 + x3 /4 = x2
x1 /4 + x2 /2 + x3 /2 = x3 .
Solving this 3 by 3 linear system we get w = x = [2/5, 1/5, 2/5] and hence limn→∞ P n (x, y) =
2/5 for y = 1 and 3, and limn→∞ P n (x, y) = 1/5 for y = 2.
Remark: For nonnegative ergodic chains, the fundamental limit theorem may fail, as can
be seen when
0 1
P = .
1 0
Then the chain is ergodic, but
n 1 0 n 0 1
P = for n even and P = for n odd.
0 1 1 0
However, for ergodic Markov chains with finite state space there is a unique stationary
probability vector w such that wP = w. That is, we have the following theorem.
3
Theorem 1. Let P be the transition matrix for an ergodic Markov chain. Then there is a
unique probability vector w such that w = wP .
Hence, using w as the initial distribution of the chain, the chain has the same distribution
for all times since w = wP n for any n ≥ 1. For the example we’ve been using of a chain that
is ergodic but not regular, w = [1/2, 1/2].
For a regular Markov chain, the initial distribution w which satisfies
wP n = w
can be interpreted as the long run probability vector for being in the various states, i.e.
lim pn (i, j) = wj for j = 1, 2, ..., r
n→∞
when w = [w1 , . . . , wr ]. However, the limits of the individual n step probabilities do not
necessarily exist for ergodic chains. However, the following averages do hold:
n
X pk (i, j)
lim = wj for i, j = 1, 2, ..., r,
n→∞
k=0
n+1
where w = [w1 , . . . , wr ] is the stationary probability vector for P . This follows by using the
following result, which is a weak law of large numbers for Markov chains.
Theorem 2. Let w be the stationary initial distribution of an ergodic Markov chain. For
m = 0, 1, 2, . . . , let Ym = 1 if the mth step is in state j and zero otherwise. Let
Hjn = (Y0 + · · · + Yn )/(n + 1) = average # of times in state j in the first n + 1 steps .
Then, for every ǫ > 0
lim P (|Hjn − wj | > ǫ) = 0,
n→∞
independent of the starting distribution.
Exercises:
1. Consider a Markov chain transition matrix
1/2 1/3 1/6
P = 3/4 0 1/4 .
0 1 0
(a) Show the this is a regular Markov chain.
(b) If the process is started in state 1, find the probability that it is in state 3 after
two steps.
(c) Find the limiting probability vector w.
(d) Find limn→∞ pn (x, y) for all x, y ∈ S. Why do you know these limits exist?
2. Find the fixed stationary probability vector for
3/4 1/4 0
P = 0 2/3 1/3 .
1/4 1/4 1/2
3. Consider the Markov chain on S = {0, 1, 2, 3, 4} which moves a step to the right with
probability 1/2 and to the left with probability 1/2 when it starts at 1, 2, 3. If it is at
0, then assume it moves to 1 with probability 1 and if it as at 4 it moves to 3 with
probability 1. Is this chain ergodic? Is it regular?