State graph of the simple random walk: to the right with probability p, to the left with probability 1βp.
Discrete-Time Markov Chains (DTMC)
This lecture note is still being edited: the text may contain typos, inaccuracies, and locally unpolished spots. If you find something, please let the author know (contact details on the course page).
The simple random walk and the Galton-Watson branching process had the following property: conditionally on the value at step \(n\), their future values did not depend on the previous values. This property turned out to be very useful in their analysis, and we now turn to the general theory of processes with this property.
1 The Markov property
Let \((X_n \; : \; n \in \mathbb {Z}_+) = (X_0, X_1, \ldots )\) be a random process with values in some space \(\mathcal{X}\), where \(\mathcal{X}\) is a finite or countable set, called the state space or phase space. The process \((X_n)\) (with discrete time) is called a discrete-time Markov chain, abbreviated DTMC, if it has the Markov property: for a fixed present at an arbitrary point in time \(n\), the future of the process (an arbitrary number of steps \(m\) ahead) does not depend on the past (fixed at points \(n_{0} < n_{1} < \ldots < n_{k} < n\)). Formally:
\[ \mathbb {P}\left(X_{n+1} = i_{n+1} \quad \left| \quad \begin{array}{rl} X_{n} & = i_{n} \\ X_{n-1} & = i_{n-1} \\ \cdots & \cdots \\ X_{0} & = i_{0} \\ \end{array}\right.\right) \; = \; \mathbb {P}\left(X_{n+1} = i_{n+1} \mid X_{n} = i_{n}\right) \]
for all \(n\) and all states \(i_{0}, \ldots , i_{n+1} \in \mathcal{X}\) such that the expressions on the left and right make sense (the conditioning events have nonzero probability).
In other words, for a fixed present state \(X_{n} = i_{n}\), the future of the process \(1\) step ahead, \(X_{n+1} = i_{n+1}\), does not depend on the past \(X_{n-1} = i_{n-1}, \ldots , X_{0} = i_{0}\).
2 Distribution of the chain, transition probabilities
\(\mathcal{X}\) is finite or countable. If \(\mathcal{X}\) is finite, it can be identified with \(\left\{ 1, 2, \ldots , \left|\mathcal{X}\right|\right\}\). If \(\mathcal{X}\) is countable, it can be identified with \(\mathbb {N}\).
It is easy to show that the distribution of a DTMC is completely determined by
the initial distribution, i.e. the distribution of \(X_0\). It is usually denoted by the row vector \(\Pi^{(0)}\):
\[ \Pi ^{(0)} = \left(\mathbb {P}\left(X_0 = i\right)\right)_{i \in \mathcal{X}} = \left(\mathbb {P}\left(X_0 = 1\right), \mathbb {P}\left(X_0 = 2\right), \ldots \right) \]
the one-step transition probabilities, i.e. the probabilities \(\mathbb {P}\left(X_{n+1} = i \mid X_{n} = j\right)\). These can be combined into (possibly infinite) matrices \(\mathbf{P}_{0}\), \(\mathbf{P}_{1}\), \(\mathbf{P}_{2}\), \(\ldots\):
\[ \mathbf{P}_n = \bigg(\mathbb {P}\left(X_{n+1} = j \mid X_{n} = i\right)\bigg)_{i,j \in \mathcal{X}} \]
Namely, the distribution of the chain at time \(k\), denoted \(\Pi^{(k)} = \left(\mathbb {P}\left(X_k = i\right)\right)_{i \in \mathcal{X}}\), can be found as follows:
\[ \mathbb {P}\left(X_k = i\right) = \sum _{j\in \mathcal{X}} \mathbb {P}\left(X_{k-1} = j\right) \cdot \mathbb {P}\left(X_{k}= i \mid X_{k-1} = j\right) \]
that is,
\[ \Pi ^{(k)} = \Pi ^{(k-1)} \cdot \mathbf{P}_{k-1} \]
Continuing this process, we get the formula
\[ \Pi ^{(k)} = \Pi ^{(0)} \cdot \mathbf{P}_0 \cdot \mathbf{P}_1 \cdot \cdots \cdot \mathbf{P}_{k-1} \]
A discrete-time Markov chain is called homogeneous if all the transition matrices coincide: \(\mathbf{P} := \mathbf{P}_{0} = \mathbf{P}_{1} = \ldots\). For a homogeneous Markov chain finding the distribution becomes simpler:
\[ \Pi ^{(k)} = \Pi ^{(0)} \cdot \mathbf{P}^k \]
So far we have not used the Markov property. It is needed when trying to compute finite-dimensional distributions for a DTMC. Namely,
\[ \begin{align} \mathbb {P}\left(\left. \begin{array}{rl} X_{n} & = i_{n} \\ X_{n-1} & = i_{n-1} \\ X_{n-2} & = i_{n-2} \\ \cdots & \cdots \\ X_{0} & = i_{0} \\ \end{array}\right.\right) & = \underbrace{\mathbb {P}\left(X_{n} = i_{n} \quad \left| \quad \begin{array}{rl} X_{n-1} & = i_{n-1} \\ X_{n-2} & = i_{n-2} \\ \cdots & \cdots \\ X_{0} & = i_{0} \\ \end{array}\right.\right)}_{\substack {=\mathbb {P}\left(X_{n}= i_n \mid X_{n-1} = i_{n-1}\right) = \left(\mathbf{P}_{n-1}\right)_{i_{n-1},i_n},\\ \text{Markov property}}} \quad \cdot \quad \mathbb {P}\left(\left. \quad \begin{array}{rl} X_{n-1} & = i_{n-1} \\ X_{n-2} & = i_{n-2} \\ \cdots & \cdots \\ X_{0} & = i_{0} \\ \end{array}\right.\right) = \\ & = \left(\mathbf{P}_{n-1}\right)_{i_{n-1},i_n} \quad \cdot \quad \mathbb {P}\left(\left. \quad \begin{array}{rl} X_{n-1} & = i_{n-1} \\ X_{n-2} & = i_{n-2} \\ \cdots & \cdots \\ X_{0} & = i_{0} \\ \end{array}\right.\right) \end{align} \]
Continuing likewise
\[ \mathbb {P}\left(\left. \begin{array}{rl} X_{n-1} & = i_{n-1} \\ X_{n-2} & = i_{n-2} \\ \cdots & \cdots \\ X_{0} & = i_{0} \\ \end{array}\right.\right) = \left(\mathbf{P}_{n-2}\right)_{i_{n-2},i_{n-1}} \quad \cdot \quad \mathbb {P}\left(\left. \quad \begin{array}{rl} X_{n-2} & = i_{n-2} \\ \cdots & \cdots \\ X_{0} & = i_{0} \\ \end{array}\right.\right) \]
At the end we get \(\mathbb {P}\left(X_0 = i_0\right) = \Pi^{(0)}_{i_0}\). In the end we obtain the formula
\[ \mathbb {P}\left(\left. \begin{array}{rl} X_{n} & = i_{n} \\ X_{n-1} & = i_{n-1} \\ X_{n-2} & = i_{n-2} \\ \cdots & \cdots \\ X_{0} & = i_{0} \\ \end{array}\right.\right) = \begin{array}{cc}& \left(\mathbf{P}_{n-1}\right)_{i_{n-1},i_n} \times \\ \times & \left(\mathbf{P}_{n-2}\right)_{i_{n-2},i_{n-1}} \times \\ & \vdots \\ \times & \left(\mathbf{P}_{0}\right)_{i_{0},i_{1}} \times \\ \times & \Pi ^{(0)}_{i_0} \\ \end{array} \]
For a homogeneous DTMC the formula simplifies:
\[ \mathbb {P}\left(\left. \begin{array}{rl} X_{n} & = i_{n} \\ X_{n-1} & = i_{n-1} \\ X_{n-2} & = i_{n-2} \\ \cdots & \cdots \\ X_{0} & = i_{0} \\ \end{array}\right.\right) = (\mathbf{P})_{i_{n-1}, i_{n}} \cdot \ldots \cdot (\mathbf{P})_{i_{0}, i_{1}} \cdot \Pi ^{(0)}_{i_0} \]
From now on, unless stated otherwise, we consider only homogeneous chains.
States and the transition probabilities between them are conveniently depicted as a directed graph with weighted edges.
3 Finite number of states
Throughout this section the phase space is assumed to be finite.
3.1 Communicating states
In the theory of Markov chains, states \(i,j \in \mathcal{X}\) are called communicating if they are strongly connected in the transition graph: it is possible with positive probability (in some finite number of steps) to go from \(i\) to \(j\) and from \(j\) to \(i\). The strongly connected components are called communicating classes.
A state is called transient if it is possible to leave this state and, with some positive probability, never return to it. Otherwise, i.e. when starting from the state one returns to it eventually with probability \(1\), the state is called recurrent.
The numbering of states obtained in the example above is called canonical. This is a numbering under which the transition matrix has the block form \[ \mathbf{P} = \left( \begin{array}{c|c} \mathbf{T}_{11} & \mathbf{T}_{12} \\ \hline \mathbf{0} & \mathbf{T}_{22} \end{array} \right) \]
Block form of the transition matrix under the canonical numbering of states: \(\mathbf{T}_{11}\) is the transitions within and between transient classes, \(\mathbf{T}_{12}\) is the transitions from transient classes into recurrent ones, \(\mathbf{T}_{22}\) is the transitions within recurrent classes, and \(\mathbf{0}\) is the block accounting for the (impossible) transitions from recurrent classes into transient ones. The block sizes depend on the specific chain, so the matrix is shown schematically.
\(\mathbf{T}_{11}\) is responsible for transitions within transient classes and between transient classes. Let \(r\) be the number of transient classes. Then \(\mathbf{T}_{11}\) is a square matrix with block structure
\[ \mathbf{T}_{11} = \begin{pmatrix} \mathbf{P}_{11} & \mathbf{P}_{12} & \cdots & \mathbf{P}_{1r} \\ \mathbf{0} & \mathbf{P}_{22} & \cdots & \mathbf{P}_{2r} \\ \vdots & \ddots & \ddots & \vdots \\ \mathbf{0} & \cdots & \mathbf{0} & \mathbf{P}_{rr} \\ \end{pmatrix} \]
The matrix is upper triangular (viewed block-wise). Under the canonical numbering, transitions are only possible from a transient class of smaller number to one of larger number.
\(\mathbf{T}_{12}\) is responsible for transitions from transient classes to recurrent ones. Let \(m\) be the total number of classes. Then \(\mathbf{T}_{12}\) has the form
\[ \mathbf{T}_{12} = \begin{pmatrix} \mathbf{P}_{1,r+1} & \cdots & \mathbf{P}_{1m} \\ \vdots & \cdots & \vdots \\ \mathbf{P}_{r,r+1} & \cdots & \mathbf{P}_{rm} \\ \end{pmatrix} \]
\(\mathbf{T}_{22}\) is responsible for transitions within recurrent classes (transitions between recurrent classes are impossible by definition). It has block form
\[ \mathbf{T}_{22} = \begin{pmatrix} \mathbf{P}_{r+1,r+1} & \mathbf{0} & \mathbf{0} & \cdots & \mathbf{0} \\ \mathbf{0} & \mathbf{P}_{r+1,r+1} & \mathbf{0} & \cdots & \mathbf{0} \\ \vdots & \cdots & \cdots & \cdots & \vdots \\ \mathbf{0} & \mathbf{0} & \cdots & \mathbf{P}_{m-1,m-1} & \mathbf{0} \\ \mathbf{0} & \mathbf{0} & \cdots & \mathbf{0} & \mathbf{P}_{mm} \\ \end{pmatrix} \]
Any DTMC with a finite number of states can be brought to this form.
3.2 Limiting behavior
We are interested in the behavior of the chain as \(n\) grows. As we have already established, the distribution at step \(n\) is given by \(\Pi^{(n)} = \Pi^{(0)} \cdot \mathbf{P}^n\). Let us examine the behavior of the matrices \(\mathbf{P}^n\) as \(n\) grows, as well as the sequence of arithmetic means
\[ \frac{1}{n}\left(\mathbf{P}^0 + \mathbf{P}^1 + \ldots + \mathbf{P}^{n-1}\right) \]
(\(\mathbf{P}^0 = E\)).
We say the sequence of matrices \(\mathbf{P}^0, \mathbf{P}^1, \mathbf{P}^2, \ldots\) converges if each of its entries converges. We say the same sequence is CesΓ ro summable (CesΓ ro convergent) if the sequence of arithmetic means \(\frac{1}{n}\left(\mathbf{P}^0 + \mathbf{P}^1 + \ldots + \mathbf{P}^{n-1}\right)\) has an entrywise limit.
Recall that if a numerical sequence converges (in the ordinary sense), it also converges in the CesΓ ro sense, with the same limit. However, CesΓ ro convergence is a more general notion. For example, the sequence \(1,0,1,0,1,0, \ldots\) does not converge, yet the sequence of arithmetic means
\[ \frac{1}{1}, \frac{1}{2}, \frac{2}{3}, \frac{2}{4}, \frac{3}{5}, \frac{3}{6}, \ldots , \frac{n}{2n}, \frac{n+1}{2n+1}, \ldots \]
converges to \(\frac{1}{2}\). That is, the sequence is CesΓ ro summable. It is therefore convenient to first study the CesΓ ro limit, and then the ordinary limit.
Let us look at heat maps of the sequences \(\mathbf{P}^n\) and \(\frac{1}{n}(\mathbf{P}^0 + \ldots + \mathbf{P}^{n-1})\) for the example above.
Animation of the evolution of PβΏ for n = 0,1,2,β¦,40 (the same matrix as in the example above). Use the slider or the Play button to track how the matrix entries change as n grows.
The limit lim PβΏ (to 2 decimal places, where it exists). The diagonal blocks of the transient classes {1,2,3}, {4,5} tend to zero (the chain leaves the transient states almost surely). The block of the recurrent class {6,7,8} and the absorbing state {9} converge to their stationary values. But for the periodic (period 2) class {10,11,12,13}, as well as for all transitions from transient states into this class, the limit of PβΏ does not exist β the matrix merely oscillates between two limit points as n grows (see also the animation above and the CesΓ ro limit below, which always exists).
Animation of the evolution of the CesΓ ro averages Cβ = (1/n)(Pβ°+PΒΉ+β¦+PβΏβ»ΒΉ) for the same transition matrix P. Unlike PβΏ (see the animation above), this sequence converges entrywise as n β β for all blocks of the matrix, including the periodic recurrent class {10,11,12,13}.
The CesΓ ro limit lim(1/n)Β·(Pβ°+PΒΉ+β¦+PβΏβ»ΒΉ) for the transition matrix P from the example above. Unlike the ordinary limit of PβΏ, the CesΓ ro limit exists for all blocks β including the periodic recurrent class {10,11,12,13}. The values are computed exactly: for each recurrent class, the row of the limit coincides with its stationary distribution, and for transient states it is the absorption probability into the class multiplied by the stationary distribution within it.
As can be seen from the heat-map animations, some of the entries of the sequence \((\mathbf{P}^n, \; n \in \mathbb {Z}_+)\) converge, while others do not. At the same time \((\mathbf{P}^n, \; n \in \mathbb {Z}_+)\) is CesΓ ro summable. In fact, \(\mathbf{P}^n\) will always be CesΓ ro summable. See below.
What is the probabilistic meaning of the CesΓ ro limit? Let us examine \(\frac{1}{n}\sum_{k=0}^{n-1}\mathbf{P}^{k}\). Its \(i,j\) entry equals
\[ \begin{align} \left(\frac{1}{n}\sum _{k=0}^{n-1}\mathbf{P}^{k}\right)_{ij} & = \frac{1}{n}\bigg(\mathbb {P}_{i}\left(X_{0} = j\right) + \mathbb {P}_{i}\left(X_{1} = j\right) + \ldots + \mathbb {P}_{i}\left(X_{n-1} = j\right)\bigg) = \\ & = \frac{1}{n} \bigg( \mathbb {E}_{i}\left[\; \mathbb {1}_{X_{0} = j}\right] + \mathbb {E}_{i}\left[\; \mathbb {1}_{X_{1} = j}\right] + \ldots + \mathbb {E}_{i}\left[\; \mathbb {1}_{X_{n-1} = j}\right] \bigg) = \\ & = \mathbb {E}_{i}\left[\frac{\; \mathbb {1}_{X_0 = j} + \; \mathbb {1}_{X_1 = j} + \ldots + \; \mathbb {1}_{X_{n-1} = j}}{n}\right] = \\ & = \mathbb {E}_{i}\left[\frac{1}{n} \sum _{k=0}^{n-1} \; \mathbb {1}_{X_k = j}\right] \end{align} \]
Let us introduce the notation:
\[ V^{(n)}_{j} := \left|\left\{ 0 \leq k \leq n \; : \; X_{k} = j\right\} \right| = \sum _{k=0}^{n} \; \mathbb {1}_{X_k = j} \]
The sum of indicators \(V^{(n-1)}_j = \sum_{k=0}^{n-1} \; \mathbb {1}_{X_k = j}\) is the number of visits (hence the letter \(V\)) to state \(j\) at times \(0, 1, \ldots , n-1\). Dividing by \(n\), i.e. by the total time, gives the visit frequency of state \(j\). Hence the \(i,j\) entry of the matrix \(\frac{1}{n}\sum_{k=0}^{n-1}\mathbf{P}^{k}\) is the expected visit frequency of state \(j\) over \(n\) steps, given that the chain started at state \(i\).
Note that (for fixed \(j\)) the process \(V^{(n)}_{j}, n \geq 0\) is almost a renewal process. Namely, let \(\tau^{(k)}_j\) be the time of the \(k\)-th visit to state \(j\). These can be defined inductively:
\[ \begin{align} \tau _{j}^{(1)} & := \min \left\{ n \geq 0 \; : \; X_n = j\right\} \\ \tau _{j}^{(k)} & := \min \left\{ n > \tau _{j}^{(k-1)} \; : \; X_n = j\right\} , \; k \geq 2 \end{align} \]
In this case \(V^{(n)}_j\) is a visit counter built from
\[ \begin{align} \xi ^{(1)}_j & := \tau _{j}^{(1)}, \\ & \quad \xi ^{(2)}_j := \tau _{j}^{(2)} - \tau _{j}^{(1)}, \\ & \quad \xi ^{(3)}_j := \tau _{j}^{(3)} - \tau _{j}^{(2)}, \ldots \end{align} \]
We have already studied such processes in detail, renewal processes in particular. Letβs try to apply what we know!
Recall that in the definition of a renewal process we required \(\xi_1, \xi_2, \ldots\) to be nonnegative i.i.d. random variables with a nondegenerate distribution. We need to understand how \(\xi^{(1)}_j, \xi^{(2)}_j, \xi^{(3)}_j, \ldots\) are distributed. Are they i.i.d.?
What follows is a slightly informal argument, since writing it out formally would be long and tedious, and after all these are seminar notes rather than lecture notes. The Markov property: the process, upon entering state \(j\), forgets its previous behavior. Hence, for any initial distribution \(\Pi\) (i.e. under any \(\mathbb {P}_{\Pi }\)) these random variables are independent. Moreover, again due to the Markov property, \(\xi^{(2)}_j, \xi^{(3)}_j, \ldots\) will be identically distributed (and this distribution also does not depend on \(\Pi\), since it is characterized only by the fact that the process has entered state \(j\) at some fixed step, and hence it no longer matters how it got there). The distribution of \(\xi^{(1)}_j = \tau^{(1)}_j\), however, may differ from the rest. For example, if the process a.s. starts at \(j\), i.e. \(\Pi_i = \delta_i^j\), then \(\xi^{(1)}_j \equiv 0\),
\[ \mathbb {P}_{j}\left(\tau ^{(1)}_j = 0\right) = 1, \]
while \(\xi^{(2)}_j, \xi^{(3)}_j, \ldots\) will still have some nontrivial distribution.
So, \(\xi^{(1)}_j, \xi^{(2)}_j, \xi^{(3)}_j, \ldots\) are independent random variables, all identically distributed except for the first time. Recall that \(\tau^{(m)}_j = \xi^{(1)}_j + \ldots + \xi^{(m)}_j\). The process
\[ V^{(n-1)}_j = \max \left\{ m \geq 1 \; : \; \tau ^{(m)}_j \leq n-1\right\} = \sum _{k=0}^{n-1} \; \mathbb {1}_{X_k = j} , \qquad n \geq 1 \]
(the maximum over the empty set is taken to be \(0\)) is called a delayed renewal process.
What are the limiting properties of a delayed renewal process? It turns out that the elementary renewal theorem remains valid in many cases.
See the proof in (Grimmett and Stirzaker 2020, Theorem 10.4.15).
Let us first consider some special cases.
3.3 Irreducible chains
A Markov chain is called irreducible if all its states form a single communicating class (which in this case must be closed). Studying a chain with more than one communicating class essentially reduces to studying its βrestrictionsβ to the various classes.
One can show that if a chain is irreducible and has a finite number of states, then
\[ \mathbb {P}_{i}\left(\tau _j < \infty \right) = \mathbb {P}_{j}\left(T_j < \infty \right) = 1, \qquad \forall i,j \in \mathcal{X} \]
That is, from any state, any other state is reached in an a.s. finite time, and all states are recurrent. Such a chain is not transient2.
Returning to the delayed renewal process, in this case we have
\[ \mathbb {P}_{i}\left(\xi ^{(1)}_j < \infty \right) = 1 \]
(recall that \(\xi^{(1)}_j = \tau^{(1)}_j = \tau_j\)). That is, starting at state \(i\), the process reaches state \(j\) a.s. in finite time. The counter overcomes the first barrier \(\xi^{(1)}_j\) a.s. in finite time. In this case, \(\xi^{(2)}_j, \xi^{(3)}_j, \ldots\) then come into play, which are i.i.d., so the limiting properties of the process are the same as for the ordinary renewal process built from \(\xi^{(2)}_j, \xi^{(3)}_j, \ldots\). In particular, the elementary renewal theorem holds:
\[ \begin{align} \left(\frac{1}{n}\sum _{k=0}^{n-1}\mathbf{P}^{k}\right)_{ij} & = \frac{1}{n} \cdot \mathbb {E}_{i}\left[ V^{(n-1)}_j\right] \quad \xrightarrow [n \to \infty ]{} \\ & \quad \frac{1}{\mathbb {E}_{i}\left[\xi ^{(2)}_j\right]} \end{align} \]
Note that \(\xi^{(2)}_j = \tau^{(2)}_j - \tau^{(1)}_j\) is the time between the first and second visit to \(j\). Since the process has already visited \(j\), by the Markov property its distribution, in particular the distribution of \(\xi^{(2)}_j\), does not depend on the initial distribution. In other words,
\[ \mathbb {E}_{i'}\left[\xi ^{(2)}_j\right] = \mathbb {E}_{i''}\left[\xi ^{(2)}_j\right] = \mathbb {E}_{j}\left[\xi ^{(2)}_j\right] \]
for all \(i', i'' \in \mathcal{X}\). And if the chain started at \(j\), then \(\tau^{(1)}_j \equiv 0\) and
\[ \xi ^{(2)}_j = \tau ^{(2)}_j - \tau ^{(1)}_j = \tau ^{(2)}_j = T_j \]
is the return time to state \(j\). This brings us to the theorem.
3.4 Stationary distribution
For a homogeneous DTMC, an (initial) distribution \(\Pi\) is called stationary if it does not change with time, i.e.
\[ \Pi = \Pi \cdot \mathbf{P} \]
In essence this is a left eigenvector (i.e. a row vector) for the matrix \(\mathbf{P}\). Or, \(\Pi^T\) is a right eigenvector (column vector) for the matrix \(\mathbf{P}^T\). Note that the sum of all columns of the matrix \(\mathbf{P}\) itself equals the column of ones. That is, \((1,1,\ldots ,1)^T\) is a right eigenvector for the matrix \(\mathbf{P}\) with eigenvalue \(1\). The eigenvalues of \(\mathbf{P}\) and \(\mathbf{P}^T\) coincide, so for this eigenvalue there is also a left eigenvector. Moreover it can always be normalized, i.e. turned into a distribution. This brings us to the theorem.
How is the stationary distribution related to the CesΓ ro limit? Note that
\[ \begin{align} \Pi \cdot \left(\frac{1}{n}\sum _{k=0}^{n-1}\mathbf{P}^{k}\right) & = \frac{1}{n}\sum _{k=0}^{n-1}\Pi \cdot \mathbf{P}^{k} \\ & = \frac{1}{n}\sum _{k=0}^{n-1}\Pi = \Pi \end{align} \]
Suppose we have an irreducible chain, as in the previous section. Let us pass to the limit as \(n \to \infty\). We get
\[ \Pi \cdot \begin{pmatrix} \left(\mathbb {E}_{1}\left[T_1\right]\right)^{-1} & \left(\mathbb {E}_{2}\left[T_2\right]\right)^{-1} & \cdots & \left(\mathbb {E}_{\left|\mathcal{X}\right|}\left[T_{\left|\mathcal{X}\right|}\right]\right)^{-1} \\ \left(\mathbb {E}_{1}\left[T_1\right]\right)^{-1} & \left(\mathbb {E}_{2}\left[T_2\right]\right)^{-1} & \cdots & \left(\mathbb {E}_{\left|\mathcal{X}\right|}\left[T_{\left|\mathcal{X}\right|}\right]\right)^{-1} \\ \vdots & \vdots & \vdots & \vdots \\ \left(\mathbb {E}_{1}\left[T_1\right]\right)^{-1} & \left(\mathbb {E}_{2}\left[T_2\right]\right)^{-1} & \cdots & \left(\mathbb {E}_{\left|\mathcal{X}\right|}\left[T_{\left|\mathcal{X}\right|}\right]\right)^{-1} \end{pmatrix} = \Pi \]
Let us expand the left-hand side:
\[ \begin{pmatrix} \sum _{i=1}^{\left|\mathcal{X}\right|} \Pi _i \cdot \left(\mathbb {E}_{1}\left[T_1\right]\right)^{-1}, & \sum _{i=1}^{\left|\mathcal{X}\right|} \Pi _i \cdot \left(\mathbb {E}_{2}\left[T_2\right]\right)^{-1}, & \cdots , & \sum _{i=1}^{\left|\mathcal{X}\right|} \Pi _i \cdot \left(\mathbb {E}_{\left|\mathcal{X}\right|}\left[T_{\left|\mathcal{X}\right|}\right]\right)^{-1} \end{pmatrix} \]
But \(\sum_{i=1}^{\left|\mathcal{X}\right|} \Pi_i = 1\). In the end we obtain
\[ \begin{pmatrix} \left(\mathbb {E}_{1}\left[T_1\right]\right)^{-1} & \left(\mathbb {E}_{2}\left[T_2\right]\right)^{-1} & \cdots & \left(\mathbb {E}_{\left|\mathcal{X}\right|}\left[T_{\left|\mathcal{X}\right|}\right]\right)^{-1} \end{pmatrix} = \Pi \]
In other words, the CesΓ ro limit consists row by row precisely of stationary distributions! From this, incidentally, one can conclude that for an irreducible chain the stationary distribution can only be unique, since the limit is unique. In other words, the geometric multiplicity of the eigenvalue \(1\) for the matrix \(\mathbf{P}\) equals \(1\). Let us state the theorem.
3.5 Period of a state, ergodic chain
We have worked out in detail the CesΓ ro limit of the transition matrices \(\mathbf{P}^0, \mathbf{P}^1, \ldots\) for an irreducible DTMC with finitely many states. But what about the ordinary limit? It turns out this does not always exist.
What is the issue with the chain above? It has periodic behavior: starting from any state, one can return to it only after an even number of steps. An even simpler example of such a chain is:
The simplest periodic chain with 2 states: deterministic transitions 1β2β1ββ¦, with period 2.
Its transition matrix:
\[ \mathbf{P} = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \]
In this case
\[ \mathbf{P}^{2k} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}, \qquad \mathbf{P}^{2k + 1} = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \]
It has no entrywise limit. However, it does have a CesΓ ro limit:
\[ \frac{1}{n}\sum _{k=0}^{n-1}\mathbf{P}^k \quad \xrightarrow [n \to \infty ]{} \quad \begin{pmatrix} 1/2 & 1/2 \\ 1/2 & 1/2 \end{pmatrix} \]
The period of state \(j\) (notation: \(d(j)\)) is the gcd of all step counts at which one can, with positive probability, return to \(j\) after leaving \(j\). In other words,
\[ d(j) := \operatorname {gcd} \left\{ k \geq 1 \; : \; \mathbb {P}_{j}\left(T_j = k\right) > 0\right\} \]
A state is called aperiodic if \(d(j) = 1\).
In particular, all states of an irreducible chain have the same period. That is, one can speak of the period of the entire (irreducible) chain. For the chains above the period equals \(2\).
For an irreducible chain, periodicity arises, as we saw, when there is some nontrivial period (i.e. greater than \(1\)). It turns out that if an irreducible chain is aperiodic, then \(\mathbf{P}^{n}\) converges. An irreducible, aperiodic chain is called an ergodic chain.
Let us state the theorem.
The distribution \(\Pi\) from the ergodic theorem is itself called ergodic. Note that if \(\Pi^{(0)}\) is some other initial distribution, then
\[ \Pi ^{(0)} \cdot \mathbf{P}^{n} \quad \xrightarrow [n \to \infty ]{} \Pi ^{(0)} \cdot \begin{pmatrix} \Pi \\ \Pi \\ \vdots \\ \Pi \end{pmatrix} = \Pi \]
An ergodic chain, as time goes on, effectively forgets where it started, stabilizing at the stationary distribution.
For an irreducible chain (with a finite number of states) there is a useful criterion for ergodicity (i.e. aperiodicity).
See the proof in (Meyer 2001, 678).
3.6 Limiting and stationary distributions: the general case
Let us now consider chains consisting of several communicating classes.
4 Countably many states
The definitions for a DTMC with finitely many states carry over to a DTMC with countably many states: communicating states, classes of states, irreducible chains, recurrent/transient states, the period of a state, etc. Moreover, as in the finite case, recurrence and period are properties that are preserved within a given communicating class.
In this example we can see differences between a DTMC with countably many states and the finite case:
The chain may have no closed class at all (the simple random walk with \(p = 1\)).
An infinite class (and hence the chain itself) can be transient and closed at the same time (the simple random walk with \(p \in (0,1)\), \(p \neq \frac{1}{2}\)).
This means that determining the recurrence of a class of states is now more complicated: if it is not closed, then, as before, it is transient; but if the class is closed, it can be either recurrent or transient (in the finite case it would necessarily be recurrent).
Moreover, even if a class is transient and not closed, the chain need not leave this class with probability \(1\) when starting from it (the random walk with an absorbing barrier at \(1\)). Recall that in the finite case, a chain starting from a transient (and not closed, respectively) class would leave it with probability \(1\) (at some finite time).
Even if a state is recurrent, the mean return time can be infinite, even though it is a.s. finite by the very definition of recurrence (the simple random walk with \(p = \frac{1}{2}\), the walk with a reflecting barrier at \(1\) and \(p = \frac{1}{2}\)). In the finite case the mean return time for a recurrent state was always finite.
In connection with the last point, a new definition is introduced: a recurrent state \(i\) (i.e. one such that \(\mathbb {P}_{i}\left(T_{i} < +\infty \right) = 1\)) is called
positive recurrent if \(\mathbb {E}_{i}\left[T_{i}\right] < +\infty\);
null recurrent if \(\mathbb {E}_{i}\left[T_{i}\right] = +\infty\).
Let us give a useful table, valid both in the finite and in the infinite case. See the proofs in (Grimmett and Stirzaker 2020, chap. 6).
| State \(j\) transient | State \(j\) recurrent | ||
| Positive recurrent | Null recurrent | ||
| Equivalent condition via the return time \(T_j\) | \(\displaystyle \mathbb{P}_j\!\left(T_j = +\infty\right) > 0\) | \(\displaystyle \mathbb{P}_j\!\left(T_j = +\infty\right) = 0\) | |
| \(\displaystyle \mathbb{E}_j\!\left[T_j\right] < +\infty\) | \(\displaystyle \mathbb{E}_j\!\left[T_j\right] = +\infty\) | ||
| Equivalent condition via the transition matrix \(\mathbf{P}\). \(V_j = \left|\{n \geq 0 : X_n = j\}\right|\) is the total number of visits paid by the chain to state \(j\) | \(\displaystyle \underbrace{\sum_{n=0}^{+\infty} \left(\mathbf{P}^n\right)_{jj}}_{=\, \mathbb{E}_j[V_j]} < +\infty\) | \(\displaystyle \sum_{n=0}^{+\infty} \left(\mathbf{P}^n\right)_{jj} = +\infty\) | |
| \(\displaystyle \left(\mathbf{P}^n\right)_{jj} \not\to 0\) | \(\displaystyle \left(\mathbf{P}^n\right)_{jj} \xrightarrow[n \to \infty]{} 0\) | ||
| Equivalent condition via the number of returns | \(\displaystyle \mathbb{P}_j\!\left(X_n = j \text{ i.o.}\right) = 0\) | \(\displaystyle \mathbb{P}_j\!\left(X_n = j \text{ i.o.}\right) = 1\) | |
| Equivalent condition via communicating classes (for a finite number of states) | \(j\) lies in a non-closed class (i.e. is inessential) | \(j\) lies in a closed class | |
| For a chain with a finite number of states | At least one such state must exist | Does not exist | |
| Some properties. Notation: \(f_{ij} = \mathbb{P}_i\!\left(T_j < \infty\right)\) is the probability of reaching \(j\) from \(i\) in finite time | \(\displaystyle \underbrace{\sum_{n=0}^{+\infty} \left(\mathbf{P}^n\right)_{ij}}_{\mathbb{E}_i[V_j]} < +\infty\) for all \(i\) | \(\displaystyle \sum_{n=0}^{+\infty} \left(\mathbf{P}^n\right)_{ij} = +\infty\) for all \(i\) such that \(f_{ij} > 0\) | |
Table 1: Summary of equivalent conditions for recurrence/transience and positive/null recurrence of a state (j) of a discrete-time Markov chain.
4.1 Irreducible chains
For a DTMC with transition matrix \(\mathbf{P}\), a stationary measure \(\Psi\) is a measure on \(\mathcal{X}\) (i.e. a row of nonnegative numbers indexed by \(\mathcal{X}\)) such that
\[ \Psi \cdot \mathbf{P} = \Psi \]
See the proof in (Grimmett and Stirzaker 2020, sec. 6.4).
4.2 Limiting properties in the general case
Let us assemble the overall picture of limiting behavior for an arbitrary (possibly countable, consisting of several classes) DTMC. The key is still the representation \(\left(\frac{1}{n}\sum_{k=0}^{n-1}\mathbf{P}^k\right)_{ij} = \frac{1}{n}\mathbb {E}_{i}\left[V^{(n-1)}_j\right]\) in terms of mean visit frequencies, and the elementary renewal theorem for delayed processes (theorem Theorem 3), applied carefully: now the first interval \(\xi^{(1)}_j = \tau_j\) can be infinite with positive probability.
The idea: on the event \(\left\{ \tau_j = \infty \right\}\) there are no visits to \(j\) at all and the frequency is \(0\); on the event \(\left\{ \tau_j < \infty \right\}\) the argument for the delayed renewal process applies, giving frequency \(\frac{1}{\mathbb {E}_{j}\left[T_j\right]}\). The formula combines both cases. It also explains the upper-right corner of the CesΓ ro limit for the large chain from example Example 6: this is the probability of ever reaching the (recurrent) state \(j\) from the transient state \(i\), multiplied by the fraction of time \(\pi_j\) that the chain spends at \(j\) within its own class.
The ordinary (non-CesΓ ro) limit of \(\mathbf{P}^n\) exists if and only if every positive recurrent class is aperiodic: within a periodic class the diagonal entries \(\left(\mathbf{P}^n\right)_{jj}\) oscillate (vanishing for \(n\) not a multiple of the period), as we saw in the examples above. See the details in (Grimmett and Stirzaker 2020, chap. 6).
5 Proofs
5.1 Proof of lemma Lemma 1 (equivalence of forms of the Markov property)
5.2 Proof of lemma Lemma 2 (properties of \(\mathbf{P}_{k\to l}\))
5.3 Proof of theorems Theorem 1 and Theorem 2 (existence of a DTMC)
5.4 Proof of theorem Theorem 3 (elementary renewal theorem for the delayed process)
5.5 Proof of theorem Theorem 4 (CesΓ ro limit for an irreducible finite chain)
5.6 Proof of theorem Theorem 5 (existence of a stationary distribution)
5.7 Proof of theorem Theorem 6 (uniqueness = a row of the CesΓ ro limit)
5.8 Proof of lemma Lemma 3 (recurrence is a class property; a closed finite class is recurrent)
5.9 Proof of lemma Lemma 4 (the period is a class property)
5.10 Proof of theorem Theorem 7 (the ergodic theorem) and corollary Corollary 1
5.11 Proof of lemma Lemma 5 (Frobeniusβs aperiodicity criterion)
5.12 Proof of lemma Lemma 6 (positive/null recurrence is a class property)
5.13 Proof of theorem Theorem 8 (general theorem for a countable number of states)
References
Footnotes
This is true only when the chain has a finite number of states. If the chain has infinitely many states, it may contain a closed class of states that is transient. See the details below.β©οΈ
Again, this is true only when the number of states is finite. As paradoxical as it may seem, a chain with infinitely many states can consist of a single class that is transient. An example is the simple random walk with \(p\neq \frac{1}{2}\). See more below.β©οΈ