Chapter 1 — Discrete-Time Markov Chains (DTMC)
This page presents the mathematical development of discrete-time Markov chains and keeps the mathematical discussion separate from the Python API and worked examples.
1. Stochastic processes
A stochastic process is a family of random variables defined on the same probability space and indexed by a parameter, usually time. It can be viewed as a mapping
with a random variable \(X_t\) for every instant \(t\). Processes may be classified according to whether time and the state space are discrete or continuous. A DTMC corresponds to discrete time and a discrete state space.
2. Homogeneous Markov chain
Let \((X_n)_{n\in\mathbb N}\) be a discrete-time process with discrete state space \(S\). The Markov property is
The chain is homogeneous when the transition probabilities do not depend on time:
We write
3. Transition matrix and associated graph
The probabilities are collected in
with
The associated graph is directed: states are vertices and a possible transition is represented by an edge weighted by its probability.
Random walk on \(\mathbb Z\)
A standard form is
4. Initial law and characterization
The initial law is
A homogeneous chain is fully characterized by \(P\) and \(\mu_0\). For a path \(i_0,\ldots,i_n\),
5. Multi-step transitions
The probability of going from \(i\) to \(j\) in \(n\) transitions is
and
The matrix \(P^{(n)}\) is stochastic.
6. Chapman–Kolmogorov equations
For \(m,n\ge0\),
In matrix form,
Since \(P^{(1)}=P\),
The element \(p_{ij}^{(n)}\) must be distinguished from the scalar power \((p_{ij})^n\).
7. Recursive construction
If \((\xi_n)\) is an i.i.d. sequence, if \(X_0\) is independent of that sequence, and if
then, under the assumptions of the corresponding result, the process constructed this way is a homogeneous Markov chain.
8. State distribution
Let
The total-probability formula gives
9. First visit
The probability of a first visit to \(j\) from \(i\) at time \(n\) is
The total probability of ever visiting \(j\) is
For \(i=j\), \(f_{ii}^{(n)}\) is a first-return probability.
10. Accessibility, communication, and classes
State \(j\) is accessible from \(i\) if there exists \(n\ge0\) such that
Two states communicate when each is accessible from the other. Communication is an equivalence relation; its classes form a partition of \(S\).
A chain is irreducible when it has only one communication class. A class is closed when it is impossible to leave it. A state is absorbing if
11. Recurrence and transience
State \(j\) is recurrent if
and transient if \(f_{jj}<1\).
The number of returns to \(i\), starting from \(i\), is associated with
The expected number of returns satisfies
Thus,
while convergence of the series characterizes transience. Recurrence is a class property.
12. Hitting time and mean return time
The first hitting time of \(j\), starting from \(i\), is
Then
and
The mean return time to \(j\) is
The multi-step transition probabilities satisfy the decomposition
13. Null and positive recurrence
A recurrent state is positive recurrent if
and null recurrent if
The three categories can also be characterized using the series \(\sum p_{ii}^{(n)}\) and the limit of \(p_{ii}^{(n)}\): transience when the series converges; null recurrence when the series diverges but \(p_{ii}^{(n)}\to0\); and positive recurrence when the series diverges and the limit is strictly positive.
14. Periodicity and ergodicity
The period of a state is
A state is aperiodic when \(d(i)=1\). Periodicity is a class property.
A state is ergodic when it is positive recurrent and aperiodic. A chain is ergodic when all its states are ergodic. In a finite state space, an irreducible chain is positive recurrent and, if it is also aperiodic, it is ergodic.
15. Stationary distribution
A distribution \(\pi\) is stationary if
State by state,
A stationary distribution therefore also satisfies \(\pi=\pi P^n\) for every \(n\ge1\).
Several cases arise: uniqueness for some irreducible chains, multiple distributions when several closed classes exist, and absence of a stationary distribution for some transient models.
If a stationary distribution exists, it assigns zero mass to transient or null-recurrent states.
If the chain is irreducible and positive recurrent, there is a unique stationary distribution and
The values \(\pi_j\) represent the long-run proportion of time spent in each state.
16. Limiting distribution
The law of \(X_n\) is
One then studies the conditions under which the limit \(\lim_{n\to\infty}\mu_n\) exists. For an ergodic chain, \(P^n\) converges to a matrix whose rows are identical, and the limiting distribution coincides with the stationary distribution.
17. Absorbing chains
The absorbing case is obtained when some classes are absorbing. Reordering the states makes it possible to separate transient states from absorbing states and study absorption probabilities and absorption times through the corresponding matrix blocks.