Does a Markov chain started at a state i come back to i? The answer can be read from the n-step transition probabilities pii(n) of the previous posts.
Throughout, (Xn)n≥0 is a Markov chain on the state space I with transition matrix P=(pij), defined on a probability space with probability P.
Definition 3.1. A state i is called recurrent if
P(n=1⋃∞{Xn=i}{X0=i})=1,
otherwise it is called transient.
According to Definition 3.1, i is recurrent if, starting from the state i at time 0, the Markov chain returns to the state i almost surely in a finite time. In particular, if pii=1, then i is recurrent; such a state is called absorbing, or a trap.
Definition 3.2 (First entrance time). Let j be a state. The first entrance time in j, or first visit time in j, is the random variable with values in N∪{+∞}
Figure 1. An instance: a path X0,…,X14 of the chain of Example 2.1, started at X0=1. The buttons choose j; the first n≥1 with Xn=j, that is Tj, is marked, and the last button draws another path.
Notation. For simplicity we denote by Pi the conditional probability
Pi(⋅)=P(⋅∣{X0=i}),
and by Ei the expectation with respect to Pi.
For all n>0 and all i,j∈I let
fij(n)=Pi{Tj=n},fij(0)=0,
and also
fij∗=1≤n<+∞∑fij(n)=Pi{Tj<+∞}.
The Markov chain (Xn)n≥0 is time-homogeneous, therefore, for every m≥0 with P{Xm=i}>0,
fij(n)=P({Xm+n=j}∩1≤ν≤n−1⋂{Xm+ν=j}{Xm=i}).
Indeed, conditional on Xm=i, the chain (Xm+n)n≥0 is Markov(δi,P) by the Markov property, so the event on the right has the probability that {Tj=n} has under Pi. Note that a state i is recurrent if fii∗=1 and transient if fii∗<1.
This proves (6). Indeed, the event {Xν−1=j,…,X1=j} is determined by X0,…,Xν, so the Markov property removes it from the condition, and fij(n) is the term ν=n of (6) because pjj(0)=1.■
Definition (Radius of convergence). Let (an)n≥0 be a sequence of real numbers. The radius of convergence of the power series ∑n≥0ansn is
r=sup{ρ≥0:n=0∑∞∣an∣ρn<+∞}∈[0,+∞].
For every real s with ∣s∣<r the series converges absolutely. By the definition of the supremum there is ρ>∣s∣ with ∑n∣an∣ρn<+∞, and ∣ansn∣≤∣an∣ρn for every n. For ∣s∣>r the series diverges.
Lemma 3.4. Let (an)n≥0 be a sequence of nonnegative real numbers such that the power series
A(s)=n=0∑∞ansn
has radius of convergence r≥1. Then, with both sides possibly equal to +∞,
s→1−limA(s)=n=0∑∞an.
Theorem 3.5. For every state i the following are equivalent. (a) The state i is recurrent. (b) The series ∑n≥0pii(n) is divergent.
If i is transient, then
n=0∑∞pii(n)=1−fii∗1=Pi{Ti=∞}1.
Proof (complete). Consider the generating functions of the sequences (pii(n))n≥0 and (fii(n))n≥0,
Pii(s)=n=0∑∞pii(n)sn,Fii(s)=n=0∑∞fii(n)sn.
In both cases the radius of convergence is r≥1, because the sequences (pii(n))n≥0 and (fii(n))n≥0 are bounded. In detail, every term is a probability, so 0≤pii(n)≤1 and 0≤fii(n)≤1 for all n. Hence, for every ρ∈[0,1), the geometric series bounds both series of absolute values:
Every ρ∈[0,1) therefore belongs to the set whose supremum is the radius of convergence, and that supremum is at least 1. In particular both series converge absolutely for every s∈(−1,1), the range of s used in the rest of the proof. By the renewal equation (6) of Theorem 3.3 with j=i, for all n≥1 we have
The first equality holds because pii(0)=Pi{X0=i}=1, so the term n=0 of Pii(s) is 1. The second replaces each pii(n)sn with the previous display. The third exchanges the order of summation: the pairs (n,ν) with 1≤ν≤n are exactly the pairs with ν≥1 and n≥ν. The fourth renames n−ν as n in the inner sum, which then runs from 0 and no longer depends on ν. The fifth takes out the common factor Pii(s) and uses fii(0)=0, so that the sum over ν≥1 is Fii(s).
The exchange in the third equality is allowed because the double series converges absolutely for ∣s∣<1. Indeed, the numbers fii(ν) and pii(m) are nonnegative, so replacing s with ∣s∣ replaces each term with its absolute value. By the first two equalities, applied at ∣s∣, the double series of absolute values sums to Pii(∣s∣)−1, which is finite because ∣s∣<1≤r. A double series whose absolute values have a finite sum can be summed in either order, with the same result.
The chain of equalities reads Pii(s)−1=Fii(s)Pii(s), that is Pii(s)(1−Fii(s))=1. To divide by 1−Fii(s) it must be nonzero. Since fii(0)=0 and ∣s∣n≤∣s∣ for n≥1,
Both limits follow from Lemma 3.4, applied to an=fii(n) and to an=pii(n): the terms are nonnegative, and the radius of convergence is at least 1 by the first step of the proof. In the first limit the sum of the series is ∑n≥1fii(n)=fii∗, because fii(0)=0; the second limit may be +∞.
Now let s→1− in Pii(s)=1/(1−Fii(s)). Recall that i is recurrent if fii∗=1 and transient if fii∗<1. If i is recurrent, then 1−Fii(s) is positive and tends to 0, so Pii(s) tends to +∞; by the second limit the series ∑n≥0pii(n) diverges. If i is transient, then 1−Fii(s) tends to 1−fii∗>0, so ∑n≥0pii(n)=1/(1−fii∗)<+∞. The first case shows that (a) implies (b); the second shows that if (a) fails then (b) fails, that is, (b) implies (a). Finally, since {Ti=∞} is the complement of {Ti<+∞}, we have Pi{Ti=∞}=1−fii∗, which gives the formula for transient i.■
Figure 2.Theorem 3.5 on the chain of Example 2.5, an instance: the partial sums ∑n=0Npii(n) for N=0,…,40. The buttons choose i.
Corollary 3.6. Let J be a class of states and j∈J. If j is recurrent (respectively, transient), then all elements of J are recurrent (respectively, transient).
Proof (complete). Let k∈J∖{j}. Since k and j communicate, there exist l,m≥1 such that
so that the series ∑n≥0pkk(n) and ∑n≥0pjj(n) are both convergent or both divergent. The conclusion follows from Theorem 3.5. ■
For every state j, the sum of the series ∑n≥0pij(n) is the average sojourn time in j, the average number of visits to j, starting from i. The random variable ∑n≥01{Xn=j} represents the random time spent in j, because it counts how many times the event {Xn=j} occurs, and its expectation is
In particular, by (7), the random variable ∑n≥01{Xn=j} has finite expectation under Pi. It follows that it is almost surely finite, and so only a finite number of the events {Xn=j} occur. Indeed, the sums can be exchanged because their terms are nonnegative, the last series converges by Theorem 3.5 because j is transient, and pij(0)=0 for i=j.■
In the case where the number of states is finite, the Markov chain cannot visit only transient states, each one a finite number of times. Corollary 3.8 is a consequence.
Corollary 3.8. A Markov chain with a finite set of states I has at least one recurrent state.
Proof (complete). Suppose, by contradiction, that all states are transient. For all i,j the series (8) is convergent; in particular
n→∞limpij(n)=0.
The matrix P(n) is stochastic, and so, for all n≥1, we also have
j∈I∑pij(n)=1.
Taking the limit as n goes to infinity and exchanging limit and sum on j, we find the contradiction 0=1.■
Figure 3.Corollaries 3.7 and 3.8 on the chain of Example 2.5, an instance: the entries pij(n) of the row i of Pn, one bar for each state j. The slider sets n and the buttons choose i.