Alessandro Palliccia

Stochastic Dynamical Models

Recurrent and transient states

1,169 words,

Does a Markov chain started at a state ii come back to ii? The answer can be read from the nn-step transition probabilities pii(n)p^{(n)}_{ii} of the previous posts.

Recurrent and transient states

Throughout, (Xn)n≥0(X_n)_{n \ge 0} is a Markov chain on the state space II with transition matrix P=(pij),{P = (p_{ij}),} defined on a probability space with probability P.{\mathbb{P}.}

Definition 3.1. A state ii is called recurrent if

P(⋃n=1∞{Xn=i} ∣ {X0=i})=1,\mathbb{P}\Big( \bigcup_{n=1}^{\infty} \{ X_n = i \} \,\Big|\, \{ X_0 = i \} \Big) = 1,

otherwise it is called transient.

According to Definition 3.1, ii is recurrent if, starting from the state ii at time 0, the Markov chain returns to the state ii almost surely in a finite time. In particular, if pii=1,{p_{ii} = 1,} then ii is recurrent; such a state is called absorbing, or a trap.

First entrance times

Definition 3.2 (First entrance time). Let jj be a state. The first entrance time in j,j, or first visit time in j,j, is the random variable with values in N∪{+∞}{\mathbb{N} \cup \{+\infty\}}

Tj(ω)={min⁡{n≥1:Xn(ω)=j}if {n≥1:Xn(ω)=j}≠∅,+∞otherwise.T_j(\omega) = \begin{cases} \min\{ n \ge 1 : X_n(\omega) = j \} & \text{if } \{ n \ge 1 : X_n(\omega) = j \} \neq \emptyset, \\ +\infty & \text{otherwise.} \end{cases}

Note that, for every state j,j,

{Tj<+∞}=⋃1≤n<+∞{Xn=j},{Tj=1}={X1=j},{Tj=n}={Xn=j}∩⋂1≤m≤n−1{Xm≠j},n>1.\begin{aligned} \{ T_j < +\infty \} &= \bigcup_{1 \le n < +\infty} \{ X_n = j \}, \\ \{ T_j = 1 \} &= \{ X_1 = j \}, \\ \{ T_j = n \} &= \{ X_n = j \} \cap \bigcap_{1 \le m \le n-1} \{ X_m \neq j \}, \qquad n > 1. \end{aligned}
12301234567891011121314T₁ = 6n

Figure 1. An instance: a path X0,…,X14{X_0, \dots, X_{14}} of the chain of Example 2.1, started at X0=1.{X_0 = 1.} The buttons choose j;{j;} the first n≥1{n \ge 1} with Xn=j,{X_n = j,} that is Tj,{T_j,} is marked, and the last button draws another path.

Notation. For simplicity we denote by Pi\mathbb{P}_i the conditional probability

Pi(⋅)=P(⋅∣{X0=i}),\mathbb{P}_i(\cdot) = \mathbb{P}(\cdot \mid \{ X_0 = i \}),

and by Ei\mathbb{E}_i the expectation with respect to Pi.{\mathbb{P}_i.}

For all n>0{n > 0} and all i,j∈I{i, j \in I} let

fij(n)=Pi{Tj=n},fij(0)=0,f^{(n)}_{ij} = \mathbb{P}_i\{ T_j = n \}, \qquad f^{(0)}_{ij} = 0,

and also

fij∗=∑1≤n<+∞fij(n)=Pi{Tj<+∞}.f^*_{ij} = \sum_{1 \le n < +\infty} f^{(n)}_{ij} = \mathbb{P}_i\{ T_j < +\infty \}.

The Markov chain (Xn)n≥0(X_n)_{n \ge 0} is time-homogeneous, therefore, for every m≥0{m \ge 0} with P{Xm=i}>0,{\mathbb{P}\{ X_m = i \} > 0,}

fij(n)=P({Xm+n=j}∩⋂1≤ν≤n−1{Xm+ν≠j} ∣ {Xm=i}).f^{(n)}_{ij} = \mathbb{P}\Big( \{ X_{m+n} = j \} \cap \bigcap_{1 \le \nu \le n-1} \{ X_{m+\nu} \neq j \} \,\Big|\, \{ X_m = i \} \Big).

Indeed, conditional on Xm=i,{X_m = i,} the chain (Xm+n)n≥0(X_{m+n})_{n \ge 0} is Markov(δi,P)\mathrm{Markov}(\delta_i, P) by the Markov property, so the event on the right has the probability that {Tj=n}{\{ T_j = n \}} has under Pi.{\mathbb{P}_i.} Note that a state ii is recurrent if fii∗=1{f^*_{ii} = 1} and transient if fii∗<1.{f^*_{ii} < 1.}

The renewal equation

Theorem 3.3 (Renewal equation). Let i,j∈I.{i, j \in I.} For all n≥1{n \ge 1} we have

pij(n)=∑ν=1nfij(ν)pjj(n−ν).(6)p^{(n)}_{ij} = \sum_{\nu=1}^{n} f^{(\nu)}_{ij} p^{(n-\nu)}_{jj}. \tag{6}

Proof (complete). Recall that Pi=P(⋅∣{X0=i}){\mathbb{P}_i = \mathbb{P}(\cdot \mid \{ X_0 = i \})} by definition. Since

{Xn=j}=⋃ν=1n({Xn=j}∩{Tj=ν}),\{ X_n = j \} = \bigcup_{\nu=1}^{n} \big( \{ X_n = j \} \cap \{ T_j = \nu \} \big),

by the Markov property

pij(n)=Pi{Xn=j}=∑1≤ν≤nPi{Xn=j,Tj=ν}=Pi{Xn=j,Xn−1≠j,…,X2≠j,X1≠j}+∑1≤ν≤n−1Pi{Xn=j,Xν=j,Xν−1≠j,…,X1≠j}\begin{aligned} p^{(n)}_{ij} &= \mathbb{P}_i\{ X_n = j \} = \sum_{1 \le \nu \le n} \mathbb{P}_i\{ X_n = j, T_j = \nu \} \\ &= \mathbb{P}_i\{ X_n = j, X_{n-1} \neq j, \dots, X_2 \neq j, X_1 \neq j \} \\ &\quad + \sum_{1 \le \nu \le n-1} \mathbb{P}_i\{ X_n = j, X_\nu = j, X_{\nu-1} \neq j, \dots, X_1 \neq j \} \end{aligned}

and

pij(n)=fij(n)+∑1≤ν≤n−1Pi{Xn=j∣Xν=j,Xν−1≠j,…,X1≠j}⋅Pi{Xν=j,Xν−1≠j,…,X1≠j}=fij(n)+∑1≤ν≤n−1Pi{Xn=j∣Xν=j} Pi{Tj=ν}=fij(n)+∑1≤ν≤n−1fij(ν)pjj(n−ν).\begin{aligned} p^{(n)}_{ij} &= f^{(n)}_{ij} + \sum_{1 \le \nu \le n-1} \mathbb{P}_i\{ X_n = j \mid X_\nu = j, X_{\nu-1} \neq j, \dots, X_1 \neq j \} \\ &\qquad \cdot \mathbb{P}_i\{ X_\nu = j, X_{\nu-1} \neq j, \dots, X_1 \neq j \} \\ &= f^{(n)}_{ij} + \sum_{1 \le \nu \le n-1} \mathbb{P}_i\{ X_n = j \mid X_\nu = j \} \, \mathbb{P}_i\{ T_j = \nu \} \\ &= f^{(n)}_{ij} + \sum_{1 \le \nu \le n-1} f^{(\nu)}_{ij} p^{(n-\nu)}_{jj}. \end{aligned}

This proves (6). Indeed, the event {Xν−1≠j,…,X1≠j}{\{ X_{\nu-1} \neq j, \dots, X_1 \neq j \}} is determined by X0,…,Xν,{X_0, \dots, X_\nu,} so the Markov property removes it from the condition, and fij(n)f^{(n)}_{ij} is the term ν=n{\nu = n} of (6) because pjj(0)=1.{p^{(0)}_{jj} = 1.} ■\blacksquare

A criterion for recurrence

The proof of Theorem 3.5 uses Lemma 3.4, also known as Abel’s lemma. It could be proved directly, but it is an immediate consequence of the monotone convergence theorem, and its proof is skipped.

Definition (Radius of convergence). Let (an)n≥0(a_n)_{n \ge 0} be a sequence of real numbers. The radius of convergence of the power series ∑n≥0ansn{\sum_{n \ge 0} a_n s^n} is

r=sup⁡{ρ≥0:∑n=0∞∣an∣ρn<+∞}∈[0,+∞].r = \sup \Big\{ \rho \ge 0 : \sum_{n=0}^{\infty} |a_n| \rho^n < +\infty \Big\} \in [0, +\infty].

For every real ss with ∣s∣<r{|s| < r} the series converges absolutely. By the definition of the supremum there is ρ>∣s∣{\rho > |s|} with ∑n∣an∣ρn<+∞,{\sum_n |a_n| \rho^n < +\infty,} and ∣ansn∣≤∣an∣ρn{|a_n s^n| \le |a_n| \rho^n} for every n.n. For ∣s∣>r{|s| > r} the series diverges.

Lemma 3.4. Let (an)n≥0(a_n)_{n \ge 0} be a sequence of nonnegative real numbers such that the power series

A(s)=∑n=0∞ansnA(s) = \sum_{n=0}^{\infty} a_n s^n

has radius of convergence r≥1.{r \ge 1.} Then, with both sides possibly equal to +∞,{+\infty,}

lim⁡s→1−A(s)=∑n=0∞an.\lim_{s \to 1^-} A(s) = \sum_{n=0}^{\infty} a_n.

Theorem 3.5. For every state ii the following are equivalent.
(a) The state ii is recurrent.
(b) The series ∑n≥0pii(n)\sum_{n \ge 0} p^{(n)}_{ii} is divergent.

If ii is transient, then

∑n=0∞pii(n)=11−fii∗=1Pi{Ti=∞}.\sum_{n=0}^{\infty} p^{(n)}_{ii} = \frac{1}{1 - f^*_{ii}} = \frac{1}{\mathbb{P}_i\{ T_i = \infty \}}.

Proof (complete). Consider the generating functions of the sequences (pii(n))n≥0(p^{(n)}_{ii})_{n \ge 0} and (fii(n))n≥0,{(f^{(n)}_{ii})_{n \ge 0},}

Pii(s)=∑n=0∞pii(n)sn,Fii(s)=∑n=0∞fii(n)sn.P_{ii}(s) = \sum_{n=0}^{\infty} p^{(n)}_{ii} s^n, \qquad F_{ii}(s) = \sum_{n=0}^{\infty} f^{(n)}_{ii} s^n.

In both cases the radius of convergence is r≥1,{r \ge 1,} because the sequences (pii(n))n≥0(p^{(n)}_{ii})_{n \ge 0} and (fii(n))n≥0(f^{(n)}_{ii})_{n \ge 0} are bounded. In detail, every term is a probability, so 0≤pii(n)≤1{0 \le p^{(n)}_{ii} \le 1} and 0≤fii(n)≤1{0 \le f^{(n)}_{ii} \le 1} for all n.n. Hence, for every ρ∈[0,1),{\rho \in [0, 1),} the geometric series bounds both series of absolute values:

∑n=0∞pii(n)ρn≤∑n=0∞ρn=11−ρ<+∞,∑n=0∞fii(n)ρn≤11−ρ<+∞.\sum_{n=0}^{\infty} p^{(n)}_{ii} \rho^n \le \sum_{n=0}^{\infty} \rho^n = \frac{1}{1 - \rho} < +\infty, \qquad \sum_{n=0}^{\infty} f^{(n)}_{ii} \rho^n \le \frac{1}{1 - \rho} < +\infty.

Every ρ∈[0,1){\rho \in [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),{s \in (-1, 1),} the range of ss used in the rest of the proof. By the renewal equation (6) of Theorem 3.3 with j=i,{j = i,} for all n≥1{n \ge 1} we have

pii(n)sn=sn∑ν=1nfii(ν)pii(n−ν)=∑ν=1nfii(ν)sνpii(n−ν)sn−ν.p^{(n)}_{ii} s^n = s^n \sum_{\nu=1}^{n} f^{(\nu)}_{ii} p^{(n-\nu)}_{ii} = \sum_{\nu=1}^{n} f^{(\nu)}_{ii} s^\nu p^{(n-\nu)}_{ii} s^{n-\nu}.

The second equality brings sns^n inside the sum and writes it as sn=sνsn−ν.{s^n = s^\nu s^{n-\nu}.} Summing over n≥1,{n \ge 1,} we obtain

Pii(s)−1=∑n=1∞pii(n)sn=∑n=1∞∑ν=1nfii(ν)sνpii(n−ν)sn−ν=∑ν=1∞fii(ν)sν∑n=ν∞pii(n−ν)sn−ν=∑ν=1∞fii(ν)sν∑n=0∞pii(n)sn=Fii(s)Pii(s).\begin{aligned} P_{ii}(s) - 1 &= \sum_{n=1}^{\infty} p^{(n)}_{ii} s^n \\ &= \sum_{n=1}^{\infty} \sum_{\nu=1}^{n} f^{(\nu)}_{ii} s^\nu p^{(n-\nu)}_{ii} s^{n-\nu} \\ &= \sum_{\nu=1}^{\infty} f^{(\nu)}_{ii} s^\nu \sum_{n=\nu}^{\infty} p^{(n-\nu)}_{ii} s^{n-\nu} \\ &= \sum_{\nu=1}^{\infty} f^{(\nu)}_{ii} s^\nu \sum_{n=0}^{\infty} p^{(n)}_{ii} s^n \\ &= F_{ii}(s) P_{ii}(s). \end{aligned}

The first equality holds because pii(0)=Pi{X0=i}=1,{p^{(0)}_{ii} = \mathbb{P}_i\{ X_0 = i \} = 1,} so the term n=0{n = 0} of Pii(s)P_{ii}(s) is 1. The second replaces each pii(n)snp^{(n)}_{ii} s^n with the previous display. The third exchanges the order of summation: the pairs (n,ν){(n, \nu)} with 1≤ν≤n{1 \le \nu \le n} are exactly the pairs with ν≥1{\nu \ge 1} and n≥ν.{n \ge \nu.} The fourth renames n−ν{n - \nu} as nn in the inner sum, which then runs from 0 and no longer depends on ν.\nu. The fifth takes out the common factor Pii(s)P_{ii}(s) and uses fii(0)=0,{f^{(0)}_{ii} = 0,} so that the sum over ν≥1{\nu \ge 1} is Fii(s).{F_{ii}(s).}

The exchange in the third equality is allowed because the double series converges absolutely for ∣s∣<1.{|s| < 1.} Indeed, the numbers fii(ν)f^{(\nu)}_{ii} and pii(m)p^{(m)}_{ii} are nonnegative, so replacing ss with ∣s∣|s| replaces each term with its absolute value. By the first two equalities, applied at ∣s∣,|s|, the double series of absolute values sums to Pii(∣s∣)−1,{P_{ii}(|s|) - 1,} which is finite because ∣s∣<1≤r.{|s| < 1 \le 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),{P_{ii}(s) - 1 = F_{ii}(s) P_{ii}(s),} that is Pii(s)(1−Fii(s))=1.{P_{ii}(s) (1 - F_{ii}(s)) = 1.} To divide by 1−Fii(s){1 - F_{ii}(s)} it must be nonzero. Since fii(0)=0{f^{(0)}_{ii} = 0} and ∣s∣n≤∣s∣{|s|^n \le |s|} for n≥1,{n \ge 1,}

∣Fii(s)∣≤∑n=1∞fii(n)∣s∣n≤∣s∣∑n=1∞fii(n)=∣s∣fii∗≤∣s∣<1,|F_{ii}(s)| \le \sum_{n=1}^{\infty} f^{(n)}_{ii} |s|^n \le |s| \sum_{n=1}^{\infty} f^{(n)}_{ii} = |s| f^*_{ii} \le |s| < 1,

where fii∗≤1{f^*_{ii} \le 1} because it is a probability. Hence 1−Fii(s)>0,{1 - F_{ii}(s) > 0,} and therefore, for all s∈(−1,1),{s \in (-1, 1),}

Pii(s)=11−Fii(s).P_{ii}(s) = \frac{1}{1 - F_{ii}(s)}.

The conclusion follows from an application of Abel’s lemma, noting that

lim⁡s→1−Fii(s)=fii∗,lim⁡s→1−Pii(s)=∑n=0∞pii(n).\lim_{s \to 1^-} F_{ii}(s) = f^*_{ii}, \qquad \lim_{s \to 1^-} P_{ii}(s) = \sum_{n=0}^{\infty} p^{(n)}_{ii}.

Both limits follow from Lemma 3.4, applied to an=fii(n){a_n = f^{(n)}_{ii}} and to an=pii(n):{a_n = p^{(n)}_{ii}{:}} 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∗,{\sum_{n \ge 1} f^{(n)}_{ii} = f^*_{ii},} because fii(0)=0;{f^{(0)}_{ii} = 0;} the second limit may be +∞.{+\infty.}

Now let s→1−{s \to 1^-} in Pii(s)=1/(1−Fii(s)).{P_{ii}(s) = 1/(1 - F_{ii}(s)).} Recall that ii is recurrent if fii∗=1{f^*_{ii} = 1} and transient if fii∗<1.{f^*_{ii} < 1.} If ii is recurrent, then 1−Fii(s){1 - F_{ii}(s)} is positive and tends to 0, so Pii(s)P_{ii}(s) tends to +∞;{+\infty;} by the second limit the series ∑n≥0pii(n)\sum_{n \ge 0} p^{(n)}_{ii} diverges. If ii is transient, then 1−Fii(s){1 - F_{ii}(s)} tends to 1−fii∗>0,{1 - f^*_{ii} > 0,} so ∑n≥0pii(n)=1/(1−fii∗)<+∞.{\sum_{n \ge 0} p^{(n)}_{ii} = 1/(1 - f^*_{ii}) < +\infty.} 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=∞}{\{ T_i = \infty \}} is the complement of {Ti<+∞},{\{ T_i < +\infty \},} we have Pi{Ti=∞}=1−fii∗,{\mathbb{P}_i\{ T_i = \infty \} = 1 - f^*_{ii},} which gives the formula for transient i.i. ■\blacksquare

01020304005101520Ni = 1: the partial sum at N = 40 is 3.000

Figure 2. Theorem 3.5 on the chain of Example 2.5, an instance: the partial sums ∑n=0Npii(n){\sum_{n=0}^{N} p^{(n)}_{ii}} for N=0,…,40.{N = 0, \dots, 40.} The buttons choose i.i.

Classes and visits

Corollary 3.6. Let JJ be a class of states and j∈J.{j \in J.} If jj is recurrent (respectively, transient), then all elements of JJ are recurrent (respectively, transient).

Proof (complete). Let k∈J∖{j}.{k \in J \setminus \{j\}.} Since kk and jj communicate, there exist l,m≥1{l, m \ge 1} such that

pjk(l)>0,pkj(m)>0.p^{(l)}_{jk} > 0, \qquad p^{(m)}_{kj} > 0.

For every integer n≥1{n \ge 1} we have

pkk(l+n+m)≥pkj(m)pjj(n)pjk(l),pjj(l+n+m)≥pjk(l)pkk(n)pkj(m),\begin{aligned} p^{(l+n+m)}_{kk} &\ge p^{(m)}_{kj} p^{(n)}_{jj} p^{(l)}_{jk}, \\ p^{(l+n+m)}_{jj} &\ge p^{(l)}_{jk} p^{(n)}_{kk} p^{(m)}_{kj}, \end{aligned}

so that the series ∑n≥0pkk(n)\sum_{n \ge 0} p^{(n)}_{kk} and ∑n≥0pjj(n)\sum_{n \ge 0} p^{(n)}_{jj} are both convergent or both divergent. The conclusion follows from Theorem 3.5. ■\blacksquare

For every state j,{j,} the sum of the series ∑n≥0pij(n)\sum_{n \ge 0} p^{(n)}_{ij} is the average sojourn time in j,j, the average number of visits to j,{j,} starting from i.i. The random variable ∑n≥01{Xn=j}\sum_{n \ge 0} \mathbf{1}_{\{ X_n = j \}} represents the random time spent in j,{j,} because it counts how many times the event {Xn=j}{\{ X_n = j \}} occurs, and its expectation is

Ei[∑n≥01{Xn=j}]=∑n≥0Ei[1{Xn=j}]=∑n≥0Pi{Xn=j}=∑n≥0pij(n).(7)\mathbb{E}_i\Big[ \sum_{n \ge 0} \mathbf{1}_{\{ X_n = j \}} \Big] = \sum_{n \ge 0} \mathbb{E}_i\big[ \mathbf{1}_{\{ X_n = j \}} \big] = \sum_{n \ge 0} \mathbb{P}_i\{ X_n = j \} = \sum_{n \ge 0} p^{(n)}_{ij}. \tag{7}

Corollary 3.7. If jj is a transient state, then for every state ii the series

∑n=0∞pij(n)(8)\sum_{n=0}^{\infty} p^{(n)}_{ij} \tag{8}

is convergent. In particular, starting from any state i,{i,} the Markov chain visits jj only a finite number of times almost surely.

Proof (complete). If i=j,{i = j,} convergence follows from Theorem 3.5. If i≠j,{i \neq j,} then, by the renewal equation (6),{(6),} we have

∑n=1∞pij(n)=∑n=1∞∑ν=1nfij(ν)pjj(n−ν)=∑ν=1∞fij(ν)∑n=ν∞pjj(n−ν)=fij∗∑n=0∞pjj(n)<∞.\begin{aligned} \sum_{n=1}^{\infty} p^{(n)}_{ij} &= \sum_{n=1}^{\infty} \sum_{\nu=1}^{n} f^{(\nu)}_{ij} p^{(n-\nu)}_{jj} \\ &= \sum_{\nu=1}^{\infty} f^{(\nu)}_{ij} \sum_{n=\nu}^{\infty} p^{(n-\nu)}_{jj} \\ &= f^*_{ij} \sum_{n=0}^{\infty} p^{(n)}_{jj} < \infty. \end{aligned}

In particular, by (7),{(7),} the random variable ∑n≥01{Xn=j}\sum_{n \ge 0} \mathbf{1}_{\{ X_n = j \}} has finite expectation under Pi.{\mathbb{P}_i.} It follows that it is almost surely finite, and so only a finite number of the events {Xn=j}{\{ X_n = j \}} occur. Indeed, the sums can be exchanged because their terms are nonnegative, the last series converges by Theorem 3.5 because jj is transient, and pij(0)=0{p^{(0)}_{ij} = 0} for i≠j.{i \neq j.} ■\blacksquare

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 II has at least one recurrent state.

Proof (complete). Suppose, by contradiction, that all states are transient. For all i,j{i, j} the series (8) is convergent; in particular

lim⁡n→∞pij(n)=0.\lim_{n \to \infty} p^{(n)}_{ij} = 0.

The matrix P(n)P^{(n)} is stochastic, and so, for all n≥1,{n \ge 1,} we also have

∑j∈Ipij(n)=1.\sum_{j \in I} p^{(n)}_{ij} = 1.

Taking the limit as nn goes to infinity and exchanging limit and sum on j,{j,} we find the contradiction 0=1.{0 = 1.} ■\blacksquare

00.510.229j = 10.146j = 20.125j = 30.167j = 40.167j = 50.167j = 6row i = 1 of P4

Figure 3. Corollaries 3.7 and 3.8 on the chain of Example 2.5, an instance: the entries pij(n)p^{(n)}_{ij} of the row ii of Pn,{P^n,} one bar for each state j.j. The slider sets nn and the buttons choose i.i.