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 , 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 taking values on a finite state space such that:
Right-continuity: sample paths are right-continuous with finitely many jumps on any bounded interval.
Markov property: for all ,
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 .
Transition Probabilities¶
A CTMC is uniquely characterized by its transition probabilities for . These satisfy the Chapman–Kolmogorov equations: for all ,
Writing for the matrix with entry , this is the matrix product . The marginal distribution evolves according to .
Rate Matrices¶
The local behavior of a CTMC is captured by its rate matrix (also called the generator):
Intuitively, is the instantaneous probability flow from state to state at time . Every rate matrix satisfies:
for — probability flow between distinct states is non-negative.
— probability is conserved, so .
Define as the total outward rate from state at time . A homogeneous CTMC has a time-invariant rate matrix .
Given , the transition matrix satisfies the Kolmogorov forward equation , which for a homogeneous chain has the matrix exponential solution .
Simulation: Gillespie’s Algorithm¶
A homogeneous CTMC can be simulated exactly using Gillespie’s algorithm Gillespie, 1977.
Initialize , set , .
While :
Draw the waiting time .
If , return .
Otherwise, set and draw the next state,
Increment .
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 and marks . Given the history (which includes the current state via right-continuity), the conditional intensity for a jump to state is
Gillespie’s algorithm is then a direct application of two Poisson process properties:
Superposition: the total rate gives the intensity of the next-event process, whose inter-arrival times are exponential.
Thinning: given a jump occurs at time , the destination state is sampled proportionally to the individual rates , recovering the categorical draw.
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.
- Gillespie, D. T. (1977). Exact stochastic simulation of coupled chemical reactions. The Journal of Physical Chemistry, 81(25), 2340–2361.
- 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.