Let (Xn)n≥0 be a Markov chain on the probability space (Ω,F,P) with set of states I and transition matrix P=(pij)i,j∈I. As in the previous posts, Pi is the conditional probability given X0=i, and pij(n)=Pi{Xn=j} is the entry (i,j) of the power Pn.
Definition 5.1 (Invariant probability measure). A probability measure μ on I is called invariant for the Markov chain (Xn)n≥0 if, when X0 has distribution μ, the random variable Xn has distribution μ for all n≥0.
In Definition 5.1 and below, we identify a probability measure on I with its density with respect to the counting measure on the σ-algebra of all subsets of I. This density is the collection of numbers (μi)i∈I in the interval [0,1] such that ∑i∈Iμi=1.
Proposition 5.2. A probability measure μ on I is invariant for the Markov chain (Xn)n≥0 if and only if, for every state i, we have
μi=j∈I∑μjpji,(9)
that is, the density of μ is a left eigenvector of the transition matrix with eigenvalue 1.
Proof (complete). Let μ be the probability distribution of X0. The probability distribution ν of X1 has density
νi=P{X1=i}=j∈I∑P{X0=j}pji=j∈I∑μjpji.
Therefore, if μ is an invariant probability measure for the Markov chain (Xn)n≥0, then ν=μ and (9) holds.
Conversely, if μ is a probability measure on I satisfying (9), then Xn has probability distribution μ for all n.■
Summing up, a probability measure μ on I, with its density identified with the row vector (μi)i∈I, is invariant if and only if
μ=μP.
Theorem 5.3. If the set of states I is finite, then there exists at least one invariant probability measure.
Proof (complete). The set of probability densities on I
K={(μi)i∈I:0≤μi≤1 for every i,i∈I∑μi=1}
is compact, as a closed bounded subset of Rcard(I). Let μ(0)∈K. For all n≥1, the family of real numbers (μj(n))j∈I defined by
μj(n)=n1k=1∑n(i∈I∑μi(0)pij(k))
is a probability density on I. Since the set K is compact, by considering a subsequence, if necessary, we can assume that the sequence (μj(n))n≥1 is convergent for all j∈I. Defining πj=limn→∞μj(n), the collection of real numbers (πj)j∈I is a probability density on I and, moreover,
represents the average frequency of visits to the state j at time n. Therefore we can interpret the values πj as asymptotic average frequencies of visits to the state j.
A Markov chain, even when I is finite, may have more than one invariant density, as the chain of the gambler’s ruin problem with states {0,1,…,N} shows. In this case the densities (1,0,…,0) and (0,…,0,1), and all their convex combinations
In the case where the set I is infinite, however, a Markov chain may not admit any invariant density, as Example 5.1 shows. The random walk on Z of the previous post, with p,q∈(0,1) and p+q=1, jumps from each state i to i+1 with probability p and to i−1 with probability q.
Example 5.1. The random walk on Z has no invariant density.
In Example 5.1, an invariant density (πi)i∈Z would satisfy πi=qπi+1+pπi−1 for all i∈Z, namely
q(πi+1−πi)=p(πi−πi−1).(10)
We begin by observing that πi+1=πi for all i∈Z. Otherwise the identity (10) implies πi+1=πi for all i, and (πi)i∈Z cannot be a probability density.
We distinguish three cases: p>q,p=q=1/2 and p<q. In the first case, from (10) we find
πi+1−πi=(p/q)i(π1−π0),
from which limi→+∞∣πi+1−πi∣=+∞, contradicting the boundedness of (πi)i∈Z. In the second case, from (10) we get the formula
πi+1−πi=π1−π0,
from which πi=i(π1−π0)+c, with c constant, which again contradicts the boundedness of (πi)i∈Z. The third case is similar to the first one. Summing up, the random walk on Z has no invariant density.
The explicit computation of an invariant density, or just the proof of its existence, might not be simple. The Markov chain of Example 5.2 arises in several models. Among them are the gambler’s ruin problem when the gambler’s opponent, for example a bank, has an infinite fortune, a random walk on N, and the number of customers in a queue at a counter. It is a case in which one can compute explicitly the unique invariant density.
Example 5.2. Consider the Markov chain with set of states N={0,1,2,…} and transition matrix
for all n≥1, besides positivity πn≥0 and normalization ∑n≥0πn=1. From the first equation we find
π1=q11−r0π0=q1p0π0
and, inductively,
πn=q1⋯qnp0⋯pn−1π0
for all n≥1. To see this, note that 1−rn=pn+qn for n≥1, so that the equation for πn becomes
qn+1πn+1−pnπn=qnπn−pn−1πn−1.
The first equation says q1π1−p0π0=0, so by induction qn+1πn+1=pnπn for every n≥0, and these relations give the formula. The normalization condition is fulfilled if we set
π0=(1+n≥1∑q1⋯qnp0⋯pn−1)−1
if and only if the series
n≥1∑q1⋯qnp0⋯pn−1
is convergent. Therefore this condition is necessary and sufficient for the existence of an invariant density, which is necessarily unique.