Continuous-Time Markov Chains

From Discrete Time to Continuous Time

In Chapter 17, the Markov chain {Xn}\{X_n\} evolves at integer time steps. Many systems — a queue with random arrivals, a channel that switches between states, a molecule transitioning between energy levels — change state at random continuous-time instants. The continuous-time Markov chain (CTMC) is the natural extension: a process {X(t):t0}\{X(t) : t \geq 0\} that holds in each state for an exponentially distributed time, then jumps to a new state according to a fixed probability distribution.

The memoryless property of the exponential distribution is what makes the CTMC Markovian: knowing X(t)X(t) tells you everything about the future, regardless of when the current state was entered.

Definition:

Continuous-Time Markov Chain

A stochastic process {X(t):t0}\{X(t) : t \geq 0\} with countable state space S\mathcal{S} is a continuous-time Markov chain (CTMC) if for all 0s<t0 \leq s < t and all states i,jSi, j \in \mathcal{S}: P(X(t)=jX(s)=i,X(u)=x(u),0u<s)=P(X(t)=jX(s)=i).\mathbb{P}(X(t) = j \mid X(s) = i, X(u) = x(u), 0 \leq u < s) = \mathbb{P}(X(t) = j \mid X(s) = i). The chain is time-homogeneous if P(X(t)=jX(s)=i)\mathbb{P}(X(t) = j \mid X(s) = i) depends only on tst - s. In this case, define the transition probabilities: Pij(t)=P(X(t)=jX(0)=i),P(t)=[Pij(t)].P_{ij}(t) = \mathbb{P}(X(t) = j \mid X(0) = i), \qquad \mathbf{P}(t) = [P_{ij}(t)].

,

Definition:

Generator (Rate) Matrix

The generator matrix (also called the rate matrix or QQ-matrix) of a time-homogeneous CTMC is the matrix G=[gij]\mathbf{G} = [g_{ij}] defined by: gij=limh0+Pij(h)h,ij,gii=jigij.g_{ij} = \lim_{h \to 0^+} \frac{P_{ij}(h)}{h}, \quad i \neq j, \qquad g_{ii} = -\sum_{j \neq i} g_{ij}. The off-diagonal entries gij0g_{ij} \geq 0 are transition rates from state ii to state jj. The diagonal entry gii0g_{ii} \leq 0 ensures that each row sums to zero: G1=0\mathbf{G}\mathbf{1} = \mathbf{0}.

The holding time in state ii is Exp(qi)\text{Exp}(q_i) where qi=gii=jigijq_i = -g_{ii} = \sum_{j \neq i} g_{ij}. Upon leaving state ii, the chain jumps to state jij \neq i with probability gij/qig_{ij}/q_i.

The generator matrix plays the same role for CTMCs that the transition matrix P\mathbf{P} plays for DTMCs. The key structural property is that rows sum to zero (not to one): G\mathbf{G} generates probability flow rather than directly assigning probabilities.

,

Theorem: Kolmogorov Forward and Backward Equations

Let P(t)\mathbf{P}(t) be the transition matrix and G\mathbf{G} the generator of a time-homogeneous CTMC with finite or countably infinite state space. Then:

Forward equation (Kolmogorov): P(t)=P(t)G.\mathbf{P}'(t) = \mathbf{P}(t) \mathbf{G}.

Backward equation (Kolmogorov): P(t)=GP(t).\mathbf{P}'(t) = \mathbf{G} \mathbf{P}(t).

Both hold with the initial condition P(0)=I\mathbf{P}(0) = \mathbf{I}.

The forward equation describes how the state probabilities evolve by looking at what happens in the last infinitesimal interval before time tt. The backward equation conditions on the first infinitesimal step from the initial state. In both cases, G\mathbf{G} plays the role of a "derivative" of the transition probability at t=0t=0.

,

Theorem: Matrix Exponential Solution

The unique solution to both Kolmogorov equations with P(0)=I\mathbf{P}(0) = \mathbf{I} is: P(t)=eGt=k=0(Gt)kk!.\mathbf{P}(t) = e^{\mathbf{G} t} = \sum_{k=0}^{\infty} \frac{(\mathbf{G} t)^k}{k!}. If G\mathbf{G} has a spectral decomposition G=SΛS1\mathbf{G} = \mathbf{S}\boldsymbol{\Lambda}\mathbf{S}^{-1} (where Λ=diag(μ1,,μn)\boldsymbol{\Lambda} = \text{diag}(\mu_1, \ldots, \mu_n) are the eigenvalues), then: P(t)=Sdiag(eμ1t,,eμnt)S1.\mathbf{P}(t) = \mathbf{S}\,\text{diag}(e^{\mu_1 t}, \ldots, e^{\mu_n t})\,\mathbf{S}^{-1}. Since G1=0\mathbf{G}\mathbf{1} = \mathbf{0}, one eigenvalue is always μ=0\mu = 0, and all other eigenvalues have non-positive real part.

The matrix exponential eGte^{\mathbf{G} t} is the continuous-time analog of the matrix power Pn\mathbf{P}^{n} for DTMCs. The eigenvalue μ=0\mu = 0 corresponds to the stationary distribution; the remaining eigenvalues govern the rate of convergence to stationarity.

,

Example: Two-State CTMC (On-Off Channel)

A wireless channel alternates between "good" (state 0) and "bad" (state 1). The channel stays good for an Exp(α)\text{Exp}(\alpha) time, then switches to bad; it stays bad for an Exp(β)\text{Exp}(\beta) time, then returns to good. (a) Write the generator matrix G\mathbf{G}. (b) Find the transition matrix P(t)=eGt\mathbf{P}(t) = e^{\mathbf{G} t}. (c) Find the stationary distribution.

Example: Three-State CTMC: Channel Quality Levels

A channel has three quality levels: excellent (0), good (1), poor (2). The generator matrix is: G=(211352123).\mathbf{G} = \begin{pmatrix} -2 & 1 & 1 \\ 3 & -5 & 2 \\ 1 & 2 & -3 \end{pmatrix}. Find the stationary distribution π\boldsymbol{\pi}.

CTMC State Probabilities: P(t)=eGt\mathbf{P}(t) = e^{\mathbf{G} t}

Visualize the evolution of state probabilities Pij(t)P_{ij}(t) for a two-state or three-state CTMC. Adjust the generator rates and starting state to see how the transition probabilities converge to the stationary distribution.

Parameters
2
3
0
5

Quick Check

Which of the following is a valid generator matrix G\mathbf{G}?

(312242112)\begin{pmatrix} -3 & 1 & 2 \\ 2 & -4 & 2 \\ 1 & 1 & -2 \end{pmatrix}

(312232112)\begin{pmatrix} -3 & 1 & 2 \\ 2 & -3 & 2 \\ 1 & 1 & -2 \end{pmatrix}

(0.50.30.20.10.60.30.20.20.6)\begin{pmatrix} 0.5 & 0.3 & 0.2 \\ 0.1 & 0.6 & 0.3 \\ 0.2 & 0.2 & 0.6 \end{pmatrix}

Common Mistake: Generator Matrix vs. Transition Matrix

Mistake:

Confusing the generator G\mathbf{G} (rows sum to 0, diagonal entries negative) with the transition matrix of the embedded DTMC (rows sum to 1, all entries non-negative). Students sometimes try to find π\boldsymbol{\pi} by solving πG=π\boldsymbol{\pi}\mathbf{G} = \boldsymbol{\pi} instead of πG=0\boldsymbol{\pi}\mathbf{G} = \mathbf{0}.

Correction:

The balance equations for a CTMC are πG=0\boldsymbol{\pi}\mathbf{G} = \mathbf{0} (not πG=π\boldsymbol{\pi}\mathbf{G} = \boldsymbol{\pi}). The latter is the DTMC equation πP=π\boldsymbol{\pi}\mathbf{P} = \boldsymbol{\pi}. Also note: the stationary distribution of the embedded DTMC is generally different from the CTMC stationary distribution (they are related by weighting with the holding times).

Historical Note: Kolmogorov's 1931 Paper

20th century

Andrey Kolmogorov derived the forward and backward equations in his landmark 1931 paper "Über die analytischen Methoden in der Wahrscheinlichkeitsrechnung" (On analytical methods in probability theory). This paper, written when Kolmogorov was 28, laid the foundation for the theory of continuous-time Markov processes and, more broadly, for the general theory of diffusion processes. The forward equation is sometimes called the Fokker-Planck equation in the physics literature, where it was discovered independently. The backward equation is uniquely associated with Kolmogorov.

Continuous-time Markov chain (CTMC)

A continuous-time stochastic process with countable state space satisfying the Markov property: the future depends on the past only through the present state. Characterized by a generator matrix G\mathbf{G} with rows summing to zero.

Related: Generator matrix

Generator matrix

The matrix G=[gij]\mathbf{G} = [g_{ij}] where gij0g_{ij} \geq 0 (iji \neq j) are transition rates and gii=jigijg_{ii} = -\sum_{j \neq i} g_{ij}. Determines all finite-time transition probabilities via P(t)=eGt\mathbf{P}(t) = e^{\mathbf{G} t}.

Related: Continuous-time Markov chain (CTMC)