Discrete Time Markov Chains
Discrete Time Markov Chains
This chapter is the foundation for all that follows. Discrete-time Markov
chains are defined and their behaviour is investigated. For better orien-
tation we now list the key theorems: these are Theorems 1.3.2 and 1.3.5
on hitting times, Theorem 1.4.2 on the strong Markov property, Theorem
1.5.3 characterizing recurrence and transience, Theorem 1.7.7 on invariant
distributions and positive recurrence. Theorem 1.8.3 on convergence to
equilibrium, Theorem 1.9.3 on reversibility, and Theorem 1.10.2 on long-
run averages. Once you understand these you will understand the basic
theory. Part of that understanding will come from familiarity with exam-
ples, so a large number are worked out in the text. Exercises at the end of
each section are an important part of the exposition.
α
1−α α
P = 1 2
β 1−β
β
1
0 1 0
P = 0 1/2 1/2
1
2 1
1/2 0 1/2
3 1 2
2
P(X0 = i1 , X1 = i2 , . . . , XN = iN )
= P(X0 = i1 )P(X1 = i2 | X0 = i1 )
. . . P(XN = iN | X0 = i1 , . . . , XN −1 = iN −1 )
= λi1 pi1 i2 . . . piN −1 iN .
On the other hand, if (1.1) holds for N , then by summing both sides over
iN ∈ I and using j∈I pij = 1 we see that (1.1) holds for N − 1 and, by
induction
P(Xn+1 = in+1 | X0 = i1 , . . . , Xn = in )
= P(X0 = i1 , . . . , Xn = in , Xn+1 = in+1 )/P(X0 = i1 , . . . , Xn = in )
= pin in +1 .
The next result reinforces the idea that Markov chains have no memory.
We write δi = (δij : j ∈ I) for the unit mass at i, where
1 if i = j
δij =
0 otherwise.
then the result follows by Theorem 1.1.1. First consider the case of elemen-
tary events
A = {X0 = i1 , . . . , Xm = im }.
Then the desired identity (1.2) for A follows by summing up the corre-
sponding identities for Ak .
The remainder of this section addresses the following problem: what is
the probability that after n steps our Markov chain is in a given state? First
we shall see how the problem reduces to calculating entries in the nth power
of the transition matrix. Then we shall look at some examples where this
may be done explicitly.
We regard distributions and measures λ as row vectors whose compo-
nents are indexed by I, just as P is a matrix whose entries are indexed by
I × I. When I is finite we will often label the states 1, 2, . . . , N ; then λ
will be an N -vector and P an N × N -matrix. For these objects, matrix
multiplication is a familiar operation. We extend matrix multiplication to
the general case in the obvious way, defining a new measure λP and a new
matrix P 2 by
Example 1.1.4
The most general two-state chain has transition matrix of the form
1−α α
P =
β 1−β
α
1 2
β
(n) (n)
We also know that p11 + p12 = P1 (Xn = 1 or 2) = 1, so by eliminating
(n) (n)
p12 we get a recurrence relation for p11 :
(n)
Then the answer we want would be found by computing p11 . In fact, in
this example there is a much simpler approach, which relies on exploiting
the symmetry present in the mutation rules.
At any time a transition is made from the initial state to another with
probability α, and a transition from another state to the initial state with
probability α/(N − 1). Thus we have a two-state chain with diagram
α
initial other
α/(N − 1)
Example 1.1.6
Consider the three-state chain with diagram
1
2 1
3 1 2
2
0 = det (x − P ) = x(x − 12 )2 − 1
4 = 14 (x − 1)(4x2 + 1).
(n)
The eigenvalues are 1, i/2, −i/2 and from this we deduce that p11 has the
form n n
(n) i i
p11 = a + b +c −
2 2
for some constants a, b and c. (The justification comes from linear algebra:
having distinct eigenvalues, P is diagonalizable, that is, for some invertible
matrix U we have
1 0 0
P = U 0 i/2 0 U −1
0 0 −i/2
and hence
1 0 0
Pn = U 0 (i/2)n 0 U −1
n
0 0 (−i/2)
(n)
which forces p11 to have the form claimed.) The answer we want is real
and n n n
i 1 ±inπ/2 1 nπ nπ
± = e = cos ± i sin
2 2 2 2 2
(n)
so it makes sense to rewrite p11 in the form
n
(n) 1 nπ nπ
p11 = α + β cos + γ sin
2 2 2
(n)
for constants α, β and γ. The first few values of p11 are easy to write
down, so we get equations to solve for α, β and γ:
(0)
1 = p11 = α + β
(1)
0 = p11 = α + 12 γ
(2)
0 = p11 = α − 14 β
Exercises
∞
1.1.1 Let B1 , B2 , . . . be disjoint events with n=1 Bn = Ω. Show that if A
is another event and P(A|Bn ) = p for all n then P(A) = p.
Deduce that if X and Y are discrete random variables then the following
are equivalent:
(a) X and Y are independent;
(b) the conditional distribution of X given Y = y is independent of y.
1.1.2 Suppose that (Xn )n≥0 is Markov (λ, P ). If Yn = Xkn , show that
(Yn )n≥0 is Markov (λ, P k ).
1.1.3 Let X0 be a random variable with values in a countable set I. Let
Y1 , Y2 , . . . be a sequence of independent random variables, uniformly dis-
tributed on [0, 1]. Suppose we are given a function
G : I × [0, 1] → I
Show that (Xn )n≥0 is a Markov chain and express its transition matrix P
in terms of G. Can all Markov chains be realized in this way? How would
you simulate a Markov chain using a computer?
State 3 0 0 1.
1.1.7 Let (Xn )n≥0 be a Markov chain on {1, 2, 3} with transition matrix
0 1 0
P = 0 2/3 1/3 .
p 1−p 0
Theorem 1.2.1. For distinct states i and j the following are equivalent:
(i) i → j;
(ii) pi1 i2 pi2 i2 . . . pin −1 in > 0 for some states i1 , i2 , . . . , in with i1 = i and
in = j;
(n)
(iii) pij > 0 for some n ≥ 0.
Proof. Observe that
∞
(n) (n)
pij ≤ Pi (Xn = j for some n ≥ 0) ≤ pij
n=0
(n)
Example 1.2.2
Find the communicating classes associated to the stochastic matrix
1 1
0 0 0 0
2 2
0 0 1 0 0 0
1 1 1
0 0 0
P =3 3 3
.
0 0 0 1 1
0
2 2
0 0 0 0 0 1
0 0 0 0 1 0
2 5 6
the classes being {1, 2, 3}, {4} and {5, 6}, with only {5, 6} being closed.
Exercises
1.2.1 Identify the communicating classes of the following transition matrix:
1
2
0 0 0 12
0 1 0 1 0
2 2
P = 0 01 11 01 01 .
0
4 4 4 4
1 1
2
0 0 0 2
1.2.2 Show that every transition matrix on a finite state-space has at least
one closed communicating class. Find an example of a transition matrix
with no closed communicating class.
Let (Xn )n≥0 be a Markov chain with transition matrix P . The hitting time
of a subset A of I is the random variable H A : Ω → {0, 1, 2, . . . } ∪ {∞}
given by
H A (ω) = inf{n ≥ 0 : Xn (ω) ∈ A}
where we agree that the infimum of the empty set ∅ is ∞. The probability
starting from i that (Xn )n≥0 ever hits A is then
i = Pi (H < ∞).
hA A
i = Pi (hit A),
hA kiA = Ei (time to hit A).
Example 1.3.1
Consider the chain with the following diagram:
1
1 1
2 2 2
1 2 1 3 4
2
h2 = 12 h1 + 12 h3 , k2 = 1 + 12 k1 + 12 k3 .
The 1 appears in the second formula because we count the time for the first
step. Similarly,
h3 = 12 h2 + 12 h4 , k3 = 1 + 12 k2 + 12 k4 .
Hence
h2 = 12 h3 = 12 ( 12 h2 + 12 ),
k2 = 1 + 12 k3 = 1 + 12 (1 + 12 k2 ).
So, starting from 2, the probability of hitting 4 is 1/3 and the mean time to
absorption is 2. Note that in writing down the first equations for h2 and k2
we made implicit use of the Markov property, in assuming that the chain
begins afresh from its new position after the first jump. Here is a general
result for hitting probabilities.
Pi (H A < ∞ | X1 = j) = Pj (H A < ∞) = hA
j
and
i = Pi (H < ∞) =
hA Pi (H A < ∞, X1 = j)
A
j∈I
Now if x is non-negative, so is the last term on the right, and the remaining
terms sum to Pi (H A ≤ n). So xi ≥ Pi (H A ≤ n) for all n and then
xi ≥ lim Pi (H A ≤ n) = Pi (H A < ∞) = hi .
n→∞
h4 = 1,
h2 = 12 h1 + 12 h3 , h3 = 12 h2 + 12 h4
so that
h2 = 12 h1 + 12 ( 21 h2 + 12 )
and
1
h2 = 3
+ 23 h1 , h3 = 2
3
+ 13 h1 .
The value of h1 is not determined by the system (1.3), but the minimality
condition now makes us take h1 = 0, so we recover h2 = 1/3 as before. Of
course, the extra boundary condition h1 = 0 was obvious from the beginning
so we built it into our system of equations and did not have to worry about
minimal non-negative solutions.
In cases where the state-space is infinite it may not be possible to write
down a corresponding extra boundary condition. Then, as we shall see in
the next examples, the minimality condition is essential.
Example 1.3.3 (Gamblers’ ruin)
Consider the Markov chain with diagram
q p q p q p
0 1 i i+1
p00 = 1,
pi,i−1 = q, pi,i+1 = p for i = 1, 2, . . . .
h0 = 1,
hi = phi+1 + qhi−1 , for i = 1, 2, . . . .
q1 p1 qi pi qi+1 pi+1
0 1 i i+1
h0 = 1,
hi = pi hi+1 + qi hi−1 , for i = 1, 2, . . . .
This recurrence relation has variable coefficients so the usual technique fails.
But consider ui = hi−1 − hi , then pi ui+1 = qi ui , so
qi qi qi−1 . . . q1
ui+1 = ui = u1 = γi u1
pi pi pi−1 . . . p1
u1 + . . . + ui = h0 − hi
so
hi = 1 − A(γ0 + . . . + γi−1 )
where A = u1 and γ0 = 1. At this point A remains to be determined. In
∞
the case i=0 γ i = ∞, the restriction 0 ≤ hi ≤ 1 forces A = 0 and hi = 1
∞
for all i. But if i=0 γi < ∞ then we can take A > 0 so long as
∞ ∞
hi = γj γj .
j=i j=0
Ei (H A | X1 = j) = 1 + Ej (H A )
and
kiA = Ei (H A ) = Ei (H A 1X1 =j )
j∈I
yi = 1 + pij yj
j∈A
=1+ pij 1 + pjk yk
j∈A k∈A
= Pi (H A ≥ 1) + Pi (H A ≥ 2) + pij pjk yk .
j∈A k∈A
So, if y is non-negative,
yi ≥ Pi (H A ≥ 1) + . . . + Pi (H A ≥ n)
and, letting n → ∞,
∞
yi ≥ Pi (H A ≥ n) = Ei (H A ) = kiA .
n=1
Exercises
1.3.1 Prove the claims (a), (b) and (c) made in example (v) of the Intro-
duction.
1.3.2 A gambler has £2 and needs to increase it to £10 in a hurry. He
can play a game with the following rules: a fair coin is tossed; if a player
bets on the right side, he wins a sum equal to his stake, and his stake is
returned; otherwise he loses his stake. The gambler decides to use a bold
strategy in which he stakes all his money if he has £5 or less, and otherwise
stakes just enough to increase his capital, if he wins, to £10.
Let X0 = 2 and let Xn be his capital after n throws. Prove that the
gambler will achieve his aim with probability 1/5.
What is the expected number of tosses until the gambler either achieves
his aim or loses his capital?
1.3.3 A simple game of ‘snakes and ladders’ is played on a board of nine
squares.
7 8 FINISH 9
6 5 4
1 2 3
START
At each turn a player tosses a fair coin and advances one or two places
according to whether the coin lands heads or tails. If you land at the foot
of a ladder you climb to the top, but if you land at the head of a snake you
slide down to the tail. How many turns on average does it take to complete
the game?
What is the probability that a player who has reached the middle square
will complete the game without slipping back to square 1?
1.3.4 Let (Xn )n≥0 be a Markov chain on {0, 1, . . . } with transition proba-
bilities given by
2
i+1
p01 = 1, pi,i+1 + pi,i−1 = 1, pi,i+1 = pi,i−1 , i ≥ 1 .
i
Tj = inf{n ≥ 1 : Xn = j}
(b) The first hitting time H A of Section 1.3 is a stopping time because
LA = sup{n ≥ 0 : Xn ∈ A}
We shall show that the Markov property holds at stopping times. The
crucial point is that, if T is a stopping time and B ⊆ Ω is determined by
X0 , X1 , . . . , XT , then B ∩ {T = m} is determined by X0 , X1 , . . . , Xm , for
all m = 0, 1, 2, . . . .
P({XT = j0 , XT +1 = j1 , . . . , XT +n = jn } ∩ B | T < ∞, XT = i)
= Pi (X0 = j0 , X1 = j1 , . . . , Xn = jn )P(B | T < ∞, XT = i).
The following example uses the strong Markov property to get more
information on the hitting times of the chain considered in Example 1.3.3.
Example 1.4.3
Consider the Markov chain (Xn )n≥0 with diagram
q p q p q p
0 1 i i+1
= E2 (sH1 )2 = φ(s)2 .
The first few probabilities P1 (H0 = 1), P1 (H0 = 2), . . . are readily checked
from first principles.
On letting s ↑ 1 we have φ(s) → P1 (H0 < ∞), so
√
1 − 1 − 4pq 1 if p ≤ q
P1 (H0 < ∞) = =
2p q/p if p > q.
(Remember that q = 1 − p, so
1 − 4pq = 1 − 4p + 4p2 = |1 − 2p| = |2q − 1|.)
It is only worth considering the case p ≤ q, where the mean hitting time
has a chance of being finite. Differentiate (1.5) to obtain
2psφφ + pφ2 − φ + q = 0
so
T0 = inf{n ≥ 0 : Xn ∈ J }
and, for m = 0, 1, 2, . . .
Let us assume that P(Tm < ∞) = 1 for all m. For each m we can check
easily that Tm , the time of the mth visit to J , is a stopping time. So the
strong Markov property applies to show, for i1 , . . . , im+1 ∈ J , that
P(Ym+1 = im+1 | Y0 = i1 , . . . , Ym = im )
= P(XTm +1 = im+1 | XT0 = i1 , . . . , XTm = im )
= Pim (XT1 = im+1 ) = pim im +1
where, for i, j ∈ J
pij = hji
Let us assume there are no absorbing states. Again the random times Sm
for m ≥ 0 are stopping times and, by the strong Markov property
P(Zm+1 = im+1 | Z0 = i1 , . . . , Zm = im )
= P(XSm +1 = im+1 | XS0 = i1 , . . . , XSm = im )
= Pim (XS1 = im+1 ) = pim im +1
Exercises
1.4.1 Let Y1 , Y2 , . . . be independent identically distributed random vari-
ables with
P(Y1 = 1) = P(Y1 = −1) = 1/2 and set X0 = 1, Xn = X0 + Y1 + . . . + Yn
for n ≥ 1. Define
H0 = inf{n ≥ 0 : Xn = 0} .
Find the probability generating function φ(s) = E(sH0 ).
Suppose the distribution of Y1 , Y2 , . . . is changed to P(Y1 = 2) = 1/2,
P(Y1 = −1) = 1/2. Show that φ now satisfies
sφ3 − 2φ + s = 0 .
1.4.2 Deduce carefully from Theorem 1.3.2 the claim made at (1.6).
Let (Xn )n≥0 be a Markov chain with transition matrix P . We say that a
state i is recurrent if
Thus a recurrent state is one to which you keep coming back and a transient
state is one which you eventually leave for ever. We shall show that every
state is either recurrent or transient.
Recall that the first passage time to state i is the random variable Ti
defined by
Ti (ω) = inf{n ≥ 1 : Xn (ω) = i}
(r)
where inf ∅ = ∞. We now define inductively the rth passage time Ti to
state i by
(0) (1)
Ti (ω) = 0, Ti (ω) = Ti (ω)
and, for r = 0, 1, 2, . . . ,
(r+1) (r)
Ti (ω) = inf{n ≥ Ti (ω) + 1 : Xn (ω) = i}.
i
(0)
Ti
(1)
Ti Ti
(2) (3)
Ti n
Our analysis of recurrence and transience will rest on finding the joint
distribution of these excursion lengths.
(r−1) (r)
Lemma 1.5.1. For r = 2, 3, . . . , conditional on Ti < ∞, Si is inde-
(r−1)
pendent of {Xm : m ≤ Ti } and
(r) (r−1)
P(Si = n | Ti < ∞) = Pi (Ti = n).
(r−1)
Proof. Apply the strong Markov property at the stopping time T = Ti .
It is automatic that XT = i on T < ∞. So, conditional on T < ∞,
(XT +n )n≥0 is Markov(δi , P ) and independent of X0 , X1 , . . . , XT . But
(r)
Si = inf{n ≥ 1 : XT +n = i},
(r)
so Si is the first passage time of (XT +n )n≥0 to state i.
Recall that the indicator function 1{X1 =j} is the random variable equal
to 1 if X1 = j and 0 otherwise. Let us introduce the number of visits Vi to
i, which may be written in terms of indicator functions as
∞
Vi = 1{Xn =i}
n=0
∞
P(V > r) = P(V = v)
r=0 r=0 v=r+1
∞ v−1
∞
so i is recurrent and
∞
(n)
pii = Ei (Vi ) = ∞.
n=0
(n) 1
pii = Ei (Vi ) = Pi (Vi > r) = fir = <∞
n=0 r=0 r=0
1 − fi
so
∞
∞
(r) 1 (n+r+m)
pjj ≤ (n) (m)
pii <∞
r=0 pij pji r=0
Since we have
Proof. Suppose C is closed and finite and that (Xn )n≥0 starts in C. Then
for some i ∈ C we have
(m)
so it suffices to show Pi (Tj < ∞) = 1 for all i ∈ I. Choose m with pji > 0.
By Theorem 1.5.3, we have
(m)
where the final equality uses the Markov property. But k∈I pjk = 1 so
we must have Pi (Tj < ∞) = 1.
Exercises
1.5.1 In Exercise 1.2.1, which states are recurrent and which are transient?
1.5.2 Show that, for the Markov chain (Xn )n≥0 in Exercise 1.3.4 we have
P(Xn → ∞ as n → ∞) = 1 .
(n)
n
(k) (n−k)
pij = fij pjj for n ≥ 1
k=1
(n) (n)
Pij (s) = pij sn , Fij (s) = fij sn .
n=0 n=0
Hence show that Pi (Ti < ∞) = 1 if and only if
∞
(n)
pii = ∞
n=0
q p
i−1 i i+1
In the symmetric case p = q = 1/2, so 4pq = 1; then for some N and all
n ≥ N we have
(2n) 1
p00 ≥ √
2A n
so
∞
∞
(2n) 1
1
p00 ≥ √ =∞
2A n
n=N n=N
which shows that the random walk is recurrent. On the other hand, if p = q
then 4pq = r < 1, so by a similar argument, for some N
∞
∞
(n) 1
n
p00 ≤ r <∞
A
n=N n=N
1
1 4
4
1
1 4
4
Xn+
Xn
Xn−
Then Xn+ and Xn− are independent simple symmetric random walks on
2−1/2 Z and Xn = 0 if and only if Xn+ = 0 = Xn− . This makes it clear that
for Xn we have
2
2n
(2n) 2n 1 2
p00 = ∼ 2 as n → ∞
n 2 A n
2n 2n
2 2n
(2n) (2n)! 1 2n 1 n 1
p00 = = .
i , j , k ≥0
(i!j!k!)2 6 n 2 i , j , k ≥0
ijk 3
i +j +k =n i +j +k =n
Now n
n 1
=1
i , j , k ≥0
ij k 3
i +j +k =n
the left-hand side being the total probability of all the ways of placing n
balls randomly into three boxes. For the case where n = 3m, we have
n n! n
= ≤
ij k i!j!k! mmm
for all i, j, k, so
2n n 3/2
(2n) 2n 1 n 1 1 6
p00 ≤ ∼ 3
as n → ∞
n 2 mmm 3 2A n
∞ (6m)
by Stirling’s formula. Hence, m=0 p00 < ∞ by comparison with
∞ −3/2 (6m) 2 (6m−2) (6m) 4 (6m−4)
n=0 n . But p 00 ≥ (1/6) p 00 and p00 ≥ (1/6) p00 for
all m so we must have
∞
(n)
p00 < ∞
n=0
Exercises
1.6.1 The rooted binary tree is an infinite graph T with one distinguished
vertex R from which comes a single edge; at every other vertex there are
three edges and there are no closed loops. The random walk on T jumps
from a vertex along each available edge with equal probability. Show that
the random walk is transient.
Many of the long-time properties of Markov chains are connected with the
notion of an invariant distribution or measure. Remember that a measure
λ is any row vector (λi : i ∈ I) with non-negative entries. We say λ is
invariant if
λP = λ.
The terms equilibrium and stationary are also used to mean the same. The
first result explains the term stationary.
Theorem 1.7.1. Let (Xn )n≥0 be Markov(λ, P ) and suppose that λ is in-
variant for P . Then (Xm+n )n≥0 is also Markov(λ, P ).
(n)
pij → πj as n → ∞ for all j ∈ I.
Proof. We have
(n)
(n)
πj = lim pij = lim pij = 1
n→∞ n→∞
j∈I j∈I j∈I
and
(n)
(n)
(n)
Notice that for any of the random walks discussed in Section 1.6 we have
(n)
pij → 0 as n → ∞ for all i, j ∈ I. The limit is certainly invariant, but it
is not a distribution!
Theorem 1.7.2 is not a very useful result but it serves to indicate a rela-
tionship between invariant distributions and n-step transition probabilities.
In Theorem 1.8.3 we shall prove a sort of converse, which is much more
useful.
Example 1.7.3
Consider the two-state Markov chain with transition matrix
1−α α
P = .
β 1−β
so, by Theorem 1.7.2, the distribution (β/(α + β), α/(α + β)) must be
invariant. There are of course easier ways to discover this.
Example 1.7.4
Consider the Markov chain (Xn )n≥0 with diagram
1
2 1
3 1 2
2
π1 = 12 π3
π2 = π1 + 12 π2
π3 = 12 π2 + 12 π3 .
In terms of the chain, the right-hand sides give the probabilities for X1 ,
when X0 has distribution π, and the equations require X1 also to have
distribution π. The equations are homogeneous so one of them is redundant,
and another equation is required to fix π uniquely. That equation is
π1 + π2 + π3 = 1
and we find that π = 1/5, 2/5, 2/5 .
According to Example 1.1.6
(n)
p11 → 1/5 as n → ∞
(n)
so this confirms Theorem 1.7.2. Alternatively, knowing that p11 had the
form n
(n) 1 nπ nπ
p11 = a + b cos + c sin
2 2 2
we could have used Theorem 1.7.2 and knowledge of π1 to identify a = 1/5,
(2)
instead of working out p11 in Example 1.1.6.
In the next two results we shall show that every irreducible and recurrent
stochastic matrix P has an essentially unique positive invariant measure.
The proofs rely heavily on the probabilistic interpretation so it is worth
noting at the outset that, for a finite state-space I, the existence of an
invariant row vector is a simple piece of linear algebra: the row sums of P
are all 1, so the column vector of ones is an eigenvector with eigenvalue 1,
so P must have a row eigenvector with eigenvalue 1.
For a fixed state k, consider for each i the expected time spent in i between
visits to k:
k −1
T
Here the sum of indicator functions serves to count the number of times n
at which Xn = i before the first passage time Tk .
Tk ∞
= Pk (Xn = j and n ≤ Tk )
n=1
∞
= Pk (Xn−1 = i, Xn = j and n ≤ Tk )
i∈I n=1
∞
k −1
T
So for j = k we obtain
λj ≥ Pk (X1 = j and Tk ≥ 1) + Pk (X2 = j and Tk ≥ 2)
+ . . . + Pk (Xn = j and Tk ≥ n)
→ γjk as n → ∞.
Pi (Ti < ∞) = 1.
mi = Ei (Ti )
γji = mi < ∞
j∈I
To complete the proof we return to the argument for (iii) ⇒ (i) armed
with the knowledge that P is recurrent, so λ = γ k and the inequality (1.7)
is in fact an equality.
πi = 1 for all i.
Then
πi = 12 πi−1 + 12 πi+1
Example 1.7.9
The existence of an invariant measure does not guarantee recurrence: con-
sider, for example, the simple symmetric random walk on Z3 , which is
transient by Example 1.6.3, but has invariant measure π given by πi = 1
for all i.
Example 1.7.10
Consider the asymmetric random walk on Z with transition probabilities
pi,i−1 = q < p = pi,i+1 . In components the invariant measure equation
πP = π reads
πi = πi−1 p + πi+1 q.
πi = A + B(p/q)i .
Example 1.7.11
Consider a success-run chain on Z+ , whose transition probabilities are given
by
pi,i+1 = pi , pi0 = qi = 1 − pi .
π0 = qi πi ,
i=0
πi = pi−1 πi−1 , for i ≥ 1.
∞
p= pi > 0.
i=0
π0 = (1 − pi )pi−1 . . . p0 π0 = (1 − p)π0 .
i=0
Exercises
1.7.2 Gas molecules move about randomly in a box which is divided into two
halves symmetrically by a partition. A hole is made in the partition. Sup-
pose there are N molecules in the box. Show that the number of molecules
on one side of the partition just after a molecule has passed through the hole
evolves as a Markov chain. What are the transition probabilities? What is
the invariant distribution of this chain?
1.7.4 Let (Xn )n≥0 be a simple random walk on Z with pi,i−1 = q < p =
pi,i+1 . Find
T −1
γi = E0
0
1{Xn =i}
n=0
Example 1.8.1
Consider the two-state chain with transition matrix
0 1
P = .
1 0
(n)
Then P 2 = I, so P 2n = I and P 2n+1 = P for all n. Thus pij fails to
converge for all i, j.
(n)
Let us call a state i aperiodic if pii > 0 for all sufficiently large n. We
leave it as an exercise to show that i is aperiodic if and only if the set
(n)
{n ≥ 0 : pii > 0} has no common divisor other than 1. This is also
a consequence of Theorem 1.8.4. The behaviour of the chain in Example
1.8.1 is connected with its periodicity.
In particular,
(n)
pij → πj as n → ∞ for all i, j.
T = inf{n ≥ 1 : Xn = Yn = b}.
Step 2. Set
Xn if n < T
Zn =
Yn if n ≥ T .
The diagram below illustrates the idea. We show that (Zn )n≥0 is
Markov(λ, P ).
I
Zn
*** *
* ** **
Xn ** ** ** * * ** *** **
** ** ** * * ** **
* ** ** *
** **
b *
T n
Yn
Step 3. We have
so
To understand this proof one should see what goes wrong when P is
not aperiodic. Consider the two-state chain of Example 1.8.1 which has
(1/2, 1/2) as its unique invariant distribution. We start (Xn )n≥0 from 0
and (Yn )n≥0 with equal probability from 0 or 1. However, if Y0 = 1, then,
because of periodicity, (Xn )n≥0 and (Yn )n≥0 will never meet, and the proof
fails. We move on now to the cases that were excluded in the last theorem,
where (Xn )n≥0 is periodic or transient or null recurrent. The remainder of
this section might be omitted on a first reading.
(nd+r)
Then C0 ∪ . . . ∪ Cd−1 = I, by irreducibility. Moreover, if pki > 0 and
(nd+s)
pki > 0 for some r, s ∈ {0, 1, . . . , d − 1}, then, choosing m ≥ 0 so that
(m) (nd+r+m) (nd+s+m)
pik > 0, we have pkk > 0 and pkk > 0 so r = s by minimality
of d. Hence we have a partition.
(n) (md+r)
To prove (i) suppose pij > 0 and i ∈ Cr . Choose m so that pki > 0,
(md+r+n)
then pkj > 0 so j ∈ Cr+n as required. By taking i = j = k we now
see that d must divide every element of S, in particular n1 .
Now for nd ≥ n21 , we can write nd = qn1 + r for integers q ≥ n1 and
0 ≤ r ≤ n1 − 1. Since d divides n1 we then have r = md for some integer
m and then nd = (q − m)n1 + mn2 . Hence
(nd) (n ) (n )
pkk ≥ (pkk1 )q−m (pkk2 )m > 0
We call d the period of P . The theorem just proved shows in particular for
(n)
all i ∈ I that d is the greatest common divisor of the set {n ≥ 0 : pii > 0}.
This is sometimes useful in identifying d.
Finally, here is a complete description of limiting behaviour for irre-
ducible chains. This generalizes Theorem 1.8.3 in two respects since we
require neither aperiodicity nor the existence of an invariant distribution.
The argument we use for the null recurrent case was discovered recently by
B. Fristedt and L. Gray.
P(Xnd+r = j) → d/mj as n → ∞
Proof
νi = 1.
i∈Cr
P(Xn = j) → 0 as n → ∞.
If P is transient this is easy and we are left with the null recurrent
case.
K−1
2
Pj (Tj > k) ≥ .
ε
k=0
Then, for n ≥ K − 1
n
1≥ P(Xk = j and Xm = j for m = k + 1, . . . , n)
k=n−K+1
n
= P(Xk = j)Pj (Tj > n − k)
k=n−K+1
K−1
= P(Xn−k = j)Pj (Tj > k)
k=0
as required. Assume then that (Wn )n≥0 is recurrent. Then, in the notation
of Theorem 1.8.3, we have P(T < ∞) = 1 and the coupling argument shows
that
|P(Xn = j) − P(Yn = j)| → 0 as n → ∞.
Exercises
1.8.1 Prove the claims (e), (f) and (g) made in example (v) of the Intro-
duction.
1.8.3 A fair die is thrown repeatedly. Let Xn denote the sum of the first n
throws. Find
lim P(Xn is a multiple of 13)
n→∞
1.8.4 Each morning a student takes one of the three books he owns from
his shelf. The probability that he chooses book i is αi , where 0 < αi < 1 for
i = 1, 2, 3, and choices on successive days are independent. In the evening
he replaces the book at the left-hand end of the shelf. If pn denotes the
probability that on day n the student finds the books in the order 1,2,3,
from left to right, show that, irrespective of the initial arrangement of the
books, pn converges as n → ∞, and determine the limit.
Determine
lim P(Xn = 0)
n→∞
For Markov chains, the past and future are independent given the present.
This property is symmetrical in time and suggests looking at Markov chains
with time running backwards. On the other hand, convergence to equilib-
rium shows behaviour which is asymmetrical in time: a highly organised
state such as a point mass decays to a disorganised one, the invariant dis-
tribution. This is an example of entropy increasing. It suggests that if
we want complete time-symmetry we must begin in equilibrium. The next
result shows that a Markov chain in equilibrium, run backwards, is again a
Markov chain. The transition matrix may however be different.
pji = πi pij = 1
πj
i∈I i∈I
πj pji = πi pij = πi
j∈I j∈I
P(Y0 = i1 , Y1 = i2 , . . . , YN = iN )
= P(X0 = iN , X1 = iN −1 , . . . , XN = i1 )
= πiN piN iN −1 . . . pi2 i1 = πi1 pi1 i2 . . . piN −1 iN
2 2
3 3
1 1
3 3
1
3
3 2
2
3
Example 1.9.5
p q p q
0 1 i−1 i i+1 M −1 M
So a solution is given by
λ = (p/q)i : i = 0, 1, . . . , M
1 2
4 3
1 1
1 2 3 2
1
3
1 1
2 3
1 1 1
3 3 2
4 1 1 3
3 2
The diagram shows a part of the graph. We know by Theorem 1.7.7 and
the preceding example that
8 + 24 + 80 + 96 + 128
Ec (Tc ) = = 168.
2
Exercises
1.9.1 In each of the following cases determine whether the stochastic matrix
P , which you may assume is irreducible, is reversible:
0 p 1−p
1−p p
(a) ; (b) 1 − p 0 p ;
q 1−q
p 1−p 0
A B
Find the probability that X and Y ever meet at a vertex in the following
cases:
(a) X starts at A and Y starts at B;
(b) X starts at A and Y starts at E.
For I = B, D let MI denote the expected time, when both X and Y start
at I, until they are once again both at I. Show that 9MD = 16MB .
Proof. A proof for the case µ < ∞ may be found, for example, in Probability
with Martingales by David Williams (Cambridge University Press, 1991).
(N )
The case where µ = ∞ is a simple deduction. Fix N < ∞ and set Yn =
Yn ∧ N . Then
(N ) (N )
Y1 + . . . + Yn Y + . . . + Yn
≥ 1 → E(Y1 ∧ N ) as n → ∞
n n
with probability one. As N ↑ ∞ we have E(Y1 ∧ N ) ↑ µ by monotone
convergence (see Section 6.4). So we must have, with probability 1
Y1 + . . . + Yn
→∞ as n → ∞.
n
n−1
Vi (n) = 1{Xk =i} .
k=0
P f (Xk ) → f as n → ∞ = 1
n
k=0
where
f= πi fi
i∈I
Vi (n) Vi 1
≤ →0= .
n n mi
the left-hand side being the time of the last visit to i before n. Also
(1) (Vi (n))
Si + . . . + Si ≥ n,
the left-hand side being the time of the first visit to i after n − 1. Hence
(1) (Vi (n)−1) (1) (Vi (n))
Si + . . . + Si n S + . . . + Si
≤ ≤ i . (1.8)
Vi (n) Vi (n) Vi (n)
P(Vi (n) → ∞ as n → ∞) = 1.
which implies
Vi (n) 1
P → as n → ∞ = 1.
n mi
Assume now that (Xn )n≥0 has an invariant distribution (πi : i ∈ I). Let
f : I → R be a bounded function and assume without loss of generality that
|f | ≤ 1. For any J ⊆ I we have
n−1
Vi (n)
f (Xk ) − f = − πi fi
n n
k=0 i∈I
Vi (n)
Vi (n)
≤ − πi + − πi
n n
i∈J i∈J
Vi (n)
Vi (n)
≤ − πi + + πi
n n
i∈J i∈J
Vi (n)
≤2 − πi + 2 πi .
n
i∈J i∈J
πi < ε/4
i∈J
n−1
f (Xk ) − f < ε,
n
k=0
l(P ) + µi pij
i,j∈I
N −1
N −1
pij = 1{Xn =i,Xn +1 =j} / 1{Xn =i}
n=0 n=0
P(
pij → pij as N → ∞) = 1,
Exercises
1.10.1 Prove the claim (d) made in example (v) of the Introduction.
xn = x0 + nb.
where a and c were both non-zero. Let us try a solution of the form xn = λn ;
then aλ2 + bλ + c = 0. Denote by α and β the roots of this quadratic. Then
yn = Aαn + Bβ n
x0 = A + B, x1 = Aα + Bβ
yn = (A + nB)αn
x0 = Aαn , x1 = (A + B)αn
Our analysis of recurrence and transience for random walks in Section 1.6
rested heavily on the use of the asymptotic relation
√
n! ∼ A n(n/e)n as n → ∞
log(1 + t) = t − 12 t2 + 13 t3 − . . .
log(1 − t) = −t − 12 t2 − 13 t3 − . . . .
By subtraction we obtain
1+t
1
log = t + 13 t3 + 15 t5 + . . . .
2 1−t