Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Continuous-Time Markov Chains

A continuous-time Markov chain (CTMC) is the continuous-time analog of a discrete-time Markov chain: the state takes values in a finite set X\cX, but transitions can occur at any real-valued time rather than at discrete steps. CTMCs appear across scientific modeling — in queueing theory, population genetics, chemical reaction networks, and, more recently, as the noising processes in discrete diffusion models.

Definition

A CTMC is a stochastic process {xt:t[0,T]}\{x_t : t \in [0, T]\} taking values on a finite state space X\cX such that:

  1. Right-continuity: sample paths txtt \mapsto x_t are right-continuous with finitely many jumps on any bounded interval.

  2. Markov property: for all t>st > s,

    Pr(xt=j{xu:us})=Pr(xt=jxs).\Pr(x_t = j \mid \{x_u : u \leq s\}) = \Pr(x_t = j \mid x_s).

The Markov property says the future depends on the past only through the present state — exactly as in a discrete-time chain, but now holding at any continuous time ss.

Transition Probabilities

A CTMC is uniquely characterized by its transition probabilities qts(ji)=Pr(xt=jxs=i)q_{t|s}(j \mid i) = \Pr(x_t = j \mid x_s = i) for tst \geq s. These satisfy the Chapman–Kolmogorov equations: for all suts \leq u \leq t,

qts(ji)=kXqus(ki)qtu(jk).q_{t|s}(j \mid i) = \sum_{k \in \cX} q_{u|s}(k \mid i)\, q_{t|u}(j \mid k).

Writing QtsQ_{t|s} for the X×X|\cX| \times |\cX| matrix with (i,j)(i, j) entry qts(ji)q_{t|s}(j \mid i), this is the matrix product Qts=QusQtuQ_{t|s} = Q_{u|s}\, Q_{t|u}. The marginal distribution πt(j)=Pr(xt=j)\pi_t(j) = \Pr(x_t = j) evolves according to πt=πsQts\pi_t^\top = \pi_s^\top Q_{t|s}.

Rate Matrices

The local behavior of a CTMC is captured by its rate matrix (also called the generator):

Rs(ij)=tqts(ji)t=s.R_s(i \to j) = \frac{\partial}{\partial t} q_{t|s}(j \mid i) \bigg|_{t=s}.

Intuitively, Rs(ij)R_s(i \to j) is the instantaneous probability flow from state ii to state jj at time ss. Every rate matrix satisfies:

  1. Rs(ij)0R_s(i \to j) \geq 0 for iji \neq j — probability flow between distinct states is non-negative.

  2. jRs(ij)=0\sum_j R_s(i \to j) = 0 — probability is conserved, so Rs(ii)=jiRs(ij)R_s(i \to i) = -\sum_{j \neq i} R_s(i \to j).

Define Rs(i)=jiRs(ij)R_s(i) = \sum_{j \neq i} R_s(i \to j) as the total outward rate from state ii at time ss. A homogeneous CTMC has a time-invariant rate matrix RsRR_s \equiv R.

Given RR, the transition matrix satisfies the Kolmogorov forward equation tQts=QtsR\partial_t Q_{t|s} = Q_{t|s} R, which for a homogeneous chain has the matrix exponential solution Qts=e(ts)RQ_{t|s} = e^{(t-s)R}.

Simulation: Gillespie’s Algorithm

A homogeneous CTMC can be simulated exactly using Gillespie’s algorithm Gillespie, 1977.

Initialize x0π0x_0 \sim \pi_0, set t0=0t_0 = 0, i=0i = 0.

While ti<Tt_i < T:

The exponential waiting time follows from the Markov property: given the current state, the time until the next jump must be memoryless, and the exponential distribution is the unique continuous memoryless distribution.

Connection to Poisson Processes

A CTMC can be recast as a marked Poisson process with event times {ti}\{t_i\} and marks {xi}X\{x_i\} \subseteq \cX. Given the history Ht\cH_t (which includes the current state xtx_t via right-continuity), the conditional intensity for a jump to state jj is

λ(t,jHt)=Rt(xtj)I[jxt].\lambda(t, j \mid \cH_t) = R_t(x_t \to j) \cdot \bbI[j \neq x_t].

Gillespie’s algorithm is then a direct application of two Poisson process properties:

Rao & Teh (2013) exploited this Poisson representation to develop an efficient Gibbs sampler for CTMCs.

Conclusion

A CTMC is fully specified by its rate matrix, which governs instantaneous probability flow between states. The Chapman–Kolmogorov equations, Kolmogorov forward equation, and matrix exponential carry over from the discrete-time theory with minimal modification. Gillespie’s algorithm provides exact simulation by drawing exponential holding times and categorical jumps — a construction that is transparent once the Poisson process connection is made.

References
  1. Gillespie, D. T. (1977). Exact stochastic simulation of coupled chemical reactions. The Journal of Physical Chemistry, 81(25), 2340–2361.
  2. Rao, V., & Teh, Y. W. (2013). Fast MCMC sampling for Markov jump processes and extensions. The Journal of Machine Learning Research, 14(1), 3295–3320.