Author-reviewedEvidence: highv1.0.2

Markov Chain

A Markov chain is a random process moving between states in which the next state depends only on the current state. It underlies Markov cohort models.

Download concept guide
Last reviewed byDr Darrin Baines

Concept Architecture

Markov Chain as the Probability Model Behind Markov Cohort Models

Every Markov cohort model used in economic evaluation runs on a Markov chain, made up of health states, a starting distribution and the probabilities of moving between states each cycle. Treated as a mathematical object, the chain is separate from the costs, utilities and strategies that turn it into a Markov model for cost-effectiveness analysis. In the older medical decision-making literature "Markov chain" means a constant-probability process, which is not its meaning in probability theory. For an absorbing chain, the fundamental matrix gives expected time to absorption, which is life expectancy in the model. Markov chain Monte Carlo, a general simulation method used mainly for Bayesian estimation, has its own page.

The Markov property in a health state model

A Markov chain follows a cohort member who occupies exactly one of a finite set of states at each cycle boundary and moves between them at random. What makes it Markov is that the next state depends on the current state and on nothing earlier in the path. In symbols, the Markov property reads as follows.

Pr⁡(Xt+1=j∣Xt=i,Xt−1,…,X0)=Pr⁡(Xt+1=j∣Xt=i)=pij(t)\Pr(X_{t+1} = j \mid X_t = i, X_{t-1}, \dots, X_0) = \Pr(X_{t+1} = j \mid X_t = i) = p_{ij}(t)

where XtX_t is the state occupied at cycle tt, ii and jj index the states, and pij(t)p_{ij}(t) is the transition probability from state ii to state jj in cycle tt. Sonnenberg and Beck, in their practical guide to Markov models in medical decision making, put the consequence plainly. The process has no memory for earlier cycles, so everyone in a given state has the same prognosis whatever their history. A chain is fully defined by the distribution among the starting states and the probabilities of the allowed transitions, which for constant probabilities form an n×nn \times n transition matrix.

The property describes the model's states, and says nothing about whether the disease has a history. Sonnenberg and Beck noted that the assumption is not followed strictly in medical problems but is needed to model prognosis with a finite number of states, which is why the choice of states carries so much weight; the Markov assumption page covers how to judge it.

Two meanings of "Markov chain"

The term is used in two ways, and the difference matters when reading methods papers. In probability theory the general definition requires only the Markov property; many texts, Grinstead and Snell among them, then define or study only the time-homogeneous case, in which pij(t)=pijp_{ij}(t) = p_{ij} for every cycle. Durrett's graduate probability text, for example, restricts its Markov chain chapter to temporally homogeneous chains and in an exercise describes a temporally inhomogeneous Markov chain. On this usage a chain whose mortality rises with age is still a Markov chain, a time-inhomogeneous model in the site's terms.

The medical decision-making literature drew the line differently. Sonnenberg and Beck called the general process, in which transition probabilities may change over time, a Markov process, and reserved "Markov chain" for the special type with constant transition probabilities, the case now called a time-homogeneous model. They tied the term to a practical advantage, since a Markov chain with an absorbing state can be solved exactly by matrix algebra, so in older sources the term usually signals that solution. More recent tutorials state the condition directly; Alarid-Escudero and colleagues describe the simplest cohort models as time-independent (time-homogeneous). Jones, Epstein and García-Mochón use "chain" for discrete-time and continuous-time processes alike.

This page follows the probability-theory usage and says "time-homogeneous" wherever constancy matters.

From chain to cost-effectiveness model

The chain and the model built on it answer different questions. The chain says where the cohort is expected to be at each cycle; the Markov model adds what that occupancy is worth, through costs and utilities, discounting, a time horizon and a separate chain for each strategy. Sonnenberg and Beck described three ways to evaluate the process, of which only the simulations allow probabilities that change over time; the usual one is cohort simulation.

Absorbing chains and expected time to absorption

Chains in lifetime health economic models are usually absorbing. In Grinstead and Snell's definition, a state is absorbing if it cannot be left, and a chain is absorbing if every state can reach an absorbing state, not necessarily in one step; the other states are transient. With death as the absorbing state, every living state is a transient state. For a time-homogeneous chain, ordering the transient states first gives the canonical form shown below.

P=(QR0I)P = \begin{pmatrix} Q & R \\ \mathbf{0} & I \end{pmatrix}

where QQ holds the transition probabilities among transient states, RR those from transient to absorbing states, 0\mathbf{0} is a block of zeros and II is an identity matrix for the absorbing states. Absorption is certain, so QnQ^{n} shrinks towards zero as nn grows, and for the same time-homogeneous chain the fundamental matrix below collects the expected visits.

N=(I−Q)−1=I+Q+Q2+⋯ ,t=Nc,B=NRN = (I - Q)^{-1} = I + Q + Q^{2} + \cdots, \qquad \mathbf{t} = N \mathbf{c}, \qquad B = N R

where NN is the fundamental matrix, whose entry nijn_{ij} is the expected number of cycles spent in transient state jj by a chain starting in transient state ii (the starting cycle counted), II is here the identity matrix of the size of QQ, t\mathbf{t} is the vector of expected cycles before absorption from each starting state, c\mathbf{c} is a column vector of ones, and BB gives the probability of ending in each absorbing state. BB matters when a model keeps several death states, which Sonnenberg and Beck allow when causes of death are tracked.

When death is the only absorbing state, t\mathbf{t} is life expectancy in cycles, counted at the start of each cycle, so Sonnenberg and Beck subtract half a cycle from the starting state.

Worked example with a three-state chain and recovery

The figures below are illustrative. A cohort moves each year between Well and Ill, with Dead absorbing. Unlike the progressive examples on neighbouring pages, people can recover, so they can fall ill more than once.

From \ ToWellIllDeadRow total
Well0.850.100.051.00
Ill0.200.700.101.00
Dead001.001.00

1. Split the matrix. QQ has rows (0.85, 0.10) and (0.20, 0.70), and RR is the column (0.05, 0.10) of death probabilities.

2. Invert I−QI - Q. I−QI - Q has rows (0.15, −0.10) and (−0.20, 0.30), so det⁡(I−Q)=0.15×0.30−0.10×0.20=0.025\det(I - Q) = 0.15 \times 0.30 - 0.10 \times 0.20 = 0.025. Swapping the diagonal entries, changing the sign of the others and dividing by the determinant gives the inverse below.

N=10.025(0.300.100.200.15)=(12486)N = \frac{1}{0.025} \begin{pmatrix} 0.30 & 0.10 \\ 0.20 & 0.15 \end{pmatrix} = \begin{pmatrix} 12 & 4 \\ 8 & 6 \end{pmatrix}

where the rows are the starting states Well and Ill, and the columns are expected cycles in Well and in Ill.

3. Sum the rows. Expected cycles before absorption are tWell=12+4=16t_{\mathrm{Well}} = 12 + 4 = 16 and tIll=8+6=14t_{\mathrm{Ill}} = 8 + 6 = 14. With one absorbing state, B=NRB = NR is 1 from both, since 12 × 0.05 + 4 × 0.10 = 1 and 8 × 0.05 + 6 × 0.10 = 1.

4. Interpret. The 4 years Ill from a Well start decompose into episodes. A person spends 12 expected years at risk in Well, and 10% fall ill each year, giving 12 × 0.10 = 1.2 expected episodes; each episode lasts 1/(1 − 0.70) = 3.33 years on average, and 1.2 × 3.33 = 4. The probability of ever falling ill from Well is 0.10/(0.10 + 0.05) = 0.67, or two in three. Recovery shortens time Ill. If the 0.20 recovery probability were added to staying Ill, giving an Ill row of (0, 0.90, 0.10), a Well start would spend 6.67 years Ill. Subtracting half a cycle gives life expectancy of 15.5 years from Well and 13.5 years from Ill. With illustrative utilities of 0.85 for Well and 0.60 for Ill, quality-adjusted life expectancy from Well is 12 × 0.85 + 4 × 0.60 = 12.6, or 12.175 after subtracting 0.5 × 0.85.

5. Check and discount. A cohort run from Well for 3,000 cycles, counted at the start of each cycle, gives 12 years in Well and 4 in Ill. Sonnenberg and Beck wrote that discounting cannot be used with the fundamental matrix because of its time variance, but a geometric discount multiplies every cycle by the same factor, so it folds into QQ. Counting membership at the start of cycle kk and discounting it by the factor (1+r)−k(1 + r)^{-k}, so that the first cycle is undiscounted, gives (I−Q/(1+r))−1(I - Q/(1 + r))^{-1}, where rr is the annual discount rate; with cycles of Δ\Delta years the factor per cycle is (1+r)Δ(1 + r)^{\Delta}. At an illustrative 3.5%, the Well row of (I−Q/1.035)−1(I - Q/1.035)^{-1} sums to 10.73 discounted years without a half-cycle correction, matching a discounted cohort run, and to 10.23 years with it.

6. Long run. The proportion alive from Well is 0.95 after one year, 0.535 after 10 years and 0.036 after 50, and high powers of PP send every row towards (0, 0, 1).

The long run of an absorbing chain

A stationary distribution is a set of state proportions that one more cycle of a time-homogeneous chain leaves unchanged. For an absorbing chain the long-run distribution is everyone absorbed, (0, 0, 1) in the example, so the informative quantities in a lifetime model are NN and t\mathbf{t}. Stationary distributions of chains without death are covered on the steady state page, and Markov chain Monte Carlo builds a chain whose stationary distribution is a chosen target.

Continuous-time chains and generator matrices

Jones, Epstein and García-Mochón distinguish discrete-time chains, described by probabilities, from continuous-time chains, described by rates, and note that medical decision models are usually analysed in discrete periods because that is more practical in spreadsheets. A time-homogeneous continuous-time chain is specified by a constant rate matrix, or generator, from which the cycle matrix follows as a matrix exponential; the transition matrix page, which writes the generator as QQ, covers the conversion.

When the Markov property fails

The property fails whenever two people in the same state face different futures because of something the state does not record, and the usual fix is to enlarge the state space until the chain is Markov again. The two common fixes affect the chain differently. Tunnel states, which Alarid-Escudero and colleagues use for state-residence time dependence, keep the expanded matrix time-homogeneous when the other probabilities are constant, so the fundamental matrix still applies. Probabilities that change with age make the chain time-inhomogeneous, unless age or cycle is itself written into the states.

Common misreadings

Four errors recur. One is reading "Markov chain" as always meaning constant probabilities, or never, without checking the source's convention. Another is treating the fundamental matrix as exact for the disease rather than for the discrete-time chain. A third is expecting a lifetime model with death to settle into a meaningful steady state. The last is reading the Markov property as a claim that illness has no history, when it claims only that the chosen states carry the history that matters. A hidden Markov model, whose states are not observed, is a different object.

Sources

  • Alarid-Escudero F, Krijkamp E, Enns EA, Yang A, Hunink MGM, Pechlivanoglou P, Jalal H. A tutorial on time-dependent cohort state-transition models in R using a cost-effectiveness analysis example. Medical Decision Making. 2023;43(1):21-41. https://doi.org/10.1177/0272989X221121747
  • Durrett R. Probability: Theory and Examples. 5th ed. Cambridge: Cambridge University Press; 2019. Chapter 5.
  • Grinstead CM, Snell JL. Introduction to Probability. 2nd rev. ed. Providence, RI: American Mathematical Society; 1997. Chapter 11.
  • Jones E, Epstein D, García-Mochón L. A procedure for deriving formulas to convert transition rates to probabilities for multistate Markov models. Medical Decision Making. 2017;37(7):779-789. https://doi.org/10.1177/0272989X17696997
  • Sonnenberg FA, Beck JR. Markov models in medical decision making: a practical guide. Medical Decision Making. 1993;13(4):322-338. https://doi.org/10.1177/0272989X9301300409

Institutional Perspectives (2)

  • NICE Decision Support Unit

    Markov Label Kept for Memoryless State-Transition Models

    TSD 15 notes that state-transition models are often called Markov models, but that the term should strictly be limited to models with the Markovian property, in which transitions depend only on the current state and not on earlier events or time already spent in that state. A fixed transition matrix applied every cycle gives a time-homogeneous Markov chain, which can be extended to a Markov process with time-varying matrices. Once transitions depend on a patient's earlier history, the Markovian assumption no longer holds and the model cannot be called Markov.

    NICE DSU Technical Support Document 15: Cost-effectiveness modelling using patient-level simulation (Davis, Stevenson, Tappenden and Wailoo, April 2014), sections 2.4 and 4.6View source →
  • PBAC

    Cohort Models Must Respect the Memoryless Assumption

    PBAC's guidelines advise using cohort-based state transition, or Markov, models for longer time horizons when the problem can be represented by a manageable number of health states under the constraints of the Markovian, or memoryless, assumption. Sponsors should ask whether transition probabilities from each state are independent of states experienced earlier, and whether a heterogeneous population needs separate model runs whose outputs are then aggregated. The least complicated feasible technique should be chosen, with individual-level models used only when a cohort model cannot represent the structure.

    Guidelines for preparing a submission to the Pharmaceutical Benefits Advisory Committee, version 5.0 (September 2016), subsection 3A.2.3View source →

Functions & Formulae (2)

N_disc = sum_(k=0)^inf (Q / (1 + r)^Delta)^k = (I - Q / (1 + r)^Delta)^(-1)

Maps the transient block Q of a time-homogeneous absorbing Markov chain to the expected number of cycles spent in each transient state, either with each cycle discounted at a constant rate or split into separate episodes of a state that can be left and re-entered. The undiscounted fundamental matrix N, the expected cycles before absorption t = Nc and the absorption probabilities B = NR are HE-FM-ABS-001 and HE-FM-ABS-002, the cohort update s_(t+1) = s_t P is HE-FM-MM-001 and a cohort trace with counting weights and discounting is HE-FM-CSIM-001. Notation follows the Markov Chain article.

  • Discounted fundamental matrix of a time-homogeneous Markov chain at a constant discount rate

    N_disc = (I - Q / (1 + r)^Delta)^(-1); t_disc = N_disc * c

    Discounting membership at the start of cycle k by (1 + r) to the power minus k Delta multiplies every cycle by the same factor, so the discount folds into Q and the series of discounted powers of Q sums to a matrix inverse. Entry i, j of N_disc is the expected discounted number of cycles spent in transient state j by a person starting in transient state i, with the starting cycle counted in full and undiscounted. The row sums t_disc are the discounted expected cycles before absorption, which with death as the only absorbing state is discounted life expectancy in cycles. With r equal to zero the formula returns the fundamental matrix of HE-FM-ABS-001.

  • Episode decomposition of time in a re-enterable state of a Markov chain

    e_ij = n_ii * p_ij; L_j = 1 / (1 - p_jj); T_ij = e_ij * L_j; h_ij = p_ij / (1 - p_ii)

    Splits the expected time that a person starting in transient state i spends in another transient state j into the expected number of separate episodes in j and the mean length of each episode, and gives the probability of ever entering j. Each cycle begun in i leads into j with probability p_ij, so the expected number of entries is n_ii, the expected cycles in i from the fundamental matrix of HE-FM-ABS-001, times p_ij; n_ii already includes the cycles spent in i after each return from j. Each episode lasts a geometric number of cycles with mean 1 divided by 1 minus p_jj.

View all formulae

Library

Publications

7
  • Book

    Introduction to Probability — Grinstead CM, Snell JL, 2nd revised edition ed., 1997 (American Mathematical Society)

    Textbook on probability, cited from chapter 11 for absorbing Markov chains, including the canonical form of the transition matrix, the fundamental matrix, expected steps before absorption and absorption probabilities, and for the unique stationary vector of an ergodic chain.

  • Book

    Probability: Theory and Examples — Durrett R, 5th edition ed., 2019 (Cambridge University Press)

    Textbook on probability theory, cited from chapter 5 for its study of temporally homogeneous Markov chains and an exercise describing a temporally inhomogeneous chain, which shows that time-homogeneity is an extra condition beyond the Markov property.

  • Journal article

    State-Transition Modeling: A Report of the ISPOR-SMDM Modeling Good Research Practices Task Force-3 — Siebert, Alagoz, Bayoumi, Jahn, Owens, Cohen & Kuntz, Task Force Report 3 ed., 2012 (Value in Health / Medical Decision Making)

    Best-practice guidance for cohort and individual-based state-transition (Markov) models, covering development, analysis, validation and reporting.

  • Book

    Markov Chain Monte Carlo in Practice — W. R. Gilks, S. Richardson & D. J. Spiegelhalter (editors), 1st Edition ed., 1996 (Chapman & Hall)

    A foundational collection on Markov chain Monte Carlo methodology and practice, linking stochastic simulation with Bayesian inference and Gibbs sampling.

  • Book

    Markov Chains — J. R. Norris, 1st Edition ed., 1997 (Cambridge University Press)

    A rigorous introduction to discrete- and continuous-time Markov chains, transition structures, recurrence and long-run behaviour.

  • Book

    Markov Processes for Stochastic Modeling — Masaaki Kijima, 1st Edition ed., 1997 (Chapman & Hall)

    An applied mathematical treatment of discrete- and continuous-time Markov processes for modeling the transient behaviour of stochastic systems.

  • Book

    The BUGS Book: A Practical Introduction to Bayesian Analysis — David Lunn, Chris Jackson, Nicky Best, Andrew Thomas & David Spiegelhalter, 1st Edition ed., 2012 (Chapman & Hall / CRC Press)

    A practical guide to Bayesian modeling with BUGS, covering prior specification, posterior simulation, model checking and Markov chain Monte Carlo computation.

Frequently Asked Questions (7)

  • What is a markov chain?

    A Markov chain is a random process moving between states in which the next state depends only on the current state. It underlies Markov cohort models.

    Source: Sonnenberg & Beck 1993

  • What is a Markov chain?

    A Markov chain is a mathematical sequence of states in which the probability of moving to any next state depends only on the current state, not on the sequence of states that preceded it. It describes a process that moves between states over time according to fixed transition probabilities, with the memoryless property that the present state alone determines the probabilities of the next. Markov chains are the mathematical basis of Markov models used in health economic evaluation to represent disease progression.

    Source: Sonnenberg & Beck 1993

  • Who developed the theory of Markov chains?

    Markov chains are named after the Russian mathematician Andrey Markov, who studied sequences of linked random events in the early twentieth century. He examined processes in which each outcome depends on the one immediately before it but not on the whole earlier sequence, and worked out their long-run behaviour. This idea of dependence limited to the present state is the property that defines a Markov chain and gives it its name. The theory now underlies models across many fields. Markov's work established it in the early 1900s.

    Source: Markov 1906

  • What are the elements of a Markov chain?

    A Markov chain consists of a set of possible states, transition probabilities specifying the chance of moving from each state to each other state in one step, and an initial distribution across the states. The transition probabilities from any state must sum to one, since the process must move to some state. Given these elements, the chain's evolution over time is determined probabilistically, with the distribution across states updated each step according to the transition probabilities.

    Source: Sonnenberg & Beck 1993

  • What is the defining property of a Markov chain?

    The defining property of a Markov chain is the Markov, or memoryless, property: the probability of moving to the next state depends only on the current state, not on the history of how it was reached. This means the future is conditionally independent of the past given the present state. Because of this property, the chain can be described entirely by its states and transition probabilities, without reference to history, which is what makes Markov chains tractable and underlies their use in modelling.

    Source: Sonnenberg & Beck 1993

  • How does a Markov chain evolve over time?

    A Markov chain evolves by moving between states step by step according to the transition probabilities, with the distribution across states updated at each step. Starting from an initial distribution, the probability of being in each state after one step is obtained by applying the transition probabilities, and repeating this traces the distribution over time. Over many steps, the distribution may settle toward a steady state or accumulate in absorbing states, depending on the chain's structure, describing the long-run behaviour of the process.

    Source: Sonnenberg & Beck 1993

  • How are Markov chains used in health economics?

    In health economics, Markov chains underlie Markov models, which represent disease progression as movement between health states over cycles according to transition probabilities. A cohort or individual is followed through the chain's states, accruing costs and health effects, to estimate expected outcomes over time. The memoryless property makes these models tractable for chronic and recurring conditions. Markov chains thus provide the mathematical framework for a widely used class of decision-analytic models in economic evaluation.

    Source: Sonnenberg & Beck 1993

Trust Record

Verified by Dr Darrin Baines

British health economist

Professional identity: darrinbaines.org

Verification date: 27 Oct 2026

Content version: 1.0.2

Canonical Identity

Term code
HE-EM-MM-011
Wikidata
Q176645

Stable URI · Machine-readable · Resolvable · CC BY 4.0