Markov Model — Probabilistic State-Transition Modeling

Simulation
Introduced by
Andrei Markov
Year
1906
Type
Probabilistic state-transition model
Family
Simulation / optimization

What does it do?

A Markov Model represents a system as a finite set of states and specifies the probability of moving from one state to another at each time step.

By capturing only the current state — not the full history — it enables tractable analysis of complex dynamic processes across health economics, engineering reliability, operations research, and social-science modeling.

The intuition behind the method

Imagine a patient who can be healthy, sick, or deceased. A Markov Model says that the chance of becoming sick tomorrow depends only on whether the patient is healthy today, not on the entire medical history. This memoryless property makes the mathematics tractable while still capturing realistic dynamics. At each step, a transition probability matrix governs how the population distributes across states, and analysts can ask where the system ends up in the long run and how quickly it gets there. In a Markov model the state at each time is observed directly. When the states are unobserved and must be inferred from indirect observations, a hidden Markov model is the appropriate method.

History

Andrei Markov introduced the framework for dependent random sequences in 1906. The theory was developed further by later mathematicians. Markov models subsequently entered operations research and queueing theory, and later health-economic modelling.

When to use it

Choose a Markov model when the process can be described as movement among a small set of distinct, mutually exclusive states, when the memoryless assumption is defensible (the next transition depends only on the current state), and when the question concerns long-run proportions, expected time in each state, or expected values such as costs or quality-adjusted life years. It is a common structure in health-technology assessment and in reliability engineering. Do not use it when history clearly alters future transitions (a higher-order chain or semi-Markov model may fit better), when the number of states would grow too large to specify and estimate (individual-level simulation may be more practical), when transition probabilities cannot be estimated from data or credible expert judgement, or when the state space is continuous and does not discretise naturally.

Limitations and considerations

  • The Markov property is a strong assumption. Sojourn times that do not follow the memoryless pattern cannot be represented exactly by a standard chain, and semi-Markov or phase-type extensions are needed.
  • Recording history, age, or patient heterogeneity in the state definition multiplies the number of states. Each new state adds transition probabilities that must be estimated and checked, so model complexity and data needs grow together.
  • Sparse transition data produce wide uncertainty in individual rows of P, and in cohort analyses this uncertainty can dominate the conclusions.
  • Time-homogeneous chains hold transition probabilities constant. This is often unrealistic for ageing cohorts, where risks change with age, and a time-inhomogeneous chain with a different matrix per cycle is then required.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • The transition matrix is the whole model, so every assumption about movement between states is visible in one table that clinicians or engineers can check row by row.
  • Each row of P must sum to 1, which gives a built-in consistency check on the input probabilities.
  • For ergodic chains, the steady-state vector follows from solving pi P = pi with the sum-to-one constraint, so long-run proportions can be obtained without simulation.
  • The same matrix supports transient analysis at any step t through P^t and long-run analysis through the stationary distribution.
  • Adding actions and rewards turns the model into a Markov Decision Process, so an analysis can move from describing a process to choosing a policy.

Applications

  • Health-technology assessment: modeling disease progression and computing quality-adjusted life years (QALYs) and incremental cost-effectiveness ratios (ICERs).
  • Reliability engineering: computing failure rates, maintenance schedules, and mean time between failures for multi-component systems.
  • Natural language processing: language models, part-of-speech tagging, and text generation based on n-gram transition probabilities.
  • Finance and actuarial science: credit-rating migration models and insurance claim frequency analysis.
  • Ecology: population viability analysis and habitat suitability transition modeling.
  • Operations management: inventory control and customer lifetime value estimation using purchase-state transition matrices.

How it works

How it works

1

Enumerate all mutually exclusive, collectively exhaustive states the system can occupy. States must be defined precisely enough that membership is unambiguous at any point in time, for example disease stages, inventory levels, or operational modes.

2

Construct the transition probability matrix P where each entry p_ij gives the one-step probability of moving from state i to state j. Every row must sum to 1. Probabilities are estimated from empirical data (cohort studies, historical records) or expert elicitation and should be reported with uncertainty ranges. The standard estimate is the maximum-likelihood proportion p_ij = n_ij / n_i, where n_ij is the number of observed one-step moves from i to j and n_i is the total number of transitions out of state i. If transitions are specified as constant rates over a cycle of length t, the probability of leaving a state within one cycle is 1 - exp(-R t), where R is the total exit rate; this total is shared among the exit routes in proportion to their individual rates. Rows with few observed transitions are unstable: pool them with related states or estimate them with a Bayesian Dirichlet prior.

Formula
P = [p_{ij}], \quad p_{ij} = P(X_{t+1}=j \mid X_t=i), \quad \sum_j p_{ij} = 1
3

Confirm that the next state depends only on the current state and not on earlier history. This Markov (memoryless) assumption is the model's key requirement; for a first-order chain, the transition out of state i in period t depends only on the state occupied in period t-1. To check it from data, estimate the transitions out of each state separately according to the state occupied one period earlier and compare the resulting probabilities. Material differences indicate that earlier history matters, and a higher-order Markov chain or a semi-Markov extension may then fit better.

Formula
P(X_{t+1}=j \mid X_0,\ldots,X_t) = P(X_{t+1}=j \mid X_t)
4

Starting from an initial state distribution vector pi^(0), multiply by P^t to obtain the distribution at time t. This shows how a cohort or system evolves step by step, and summing these distributions over the cycles gives the expected total time spent in each state.

Formula
\pi^{(t)} = \pi^{(0)} P^t
5

For irreducible ergodic chains, solve the stationary distribution equation pi P = pi subject to the probabilities summing to 1. The stationary distribution pi is invariant: if the system starts in pi, its distribution remains pi at every later step. For an ergodic chain, the distribution converges to pi from any starting distribution, and the entries of pi give the long-run proportion of time spent in each state, which is a key output for reliability and long-run occupancy analyses. This result does not apply directly to chains with an absorbing state, such as death in a cohort cost-effectiveness model. There the stationary distribution is concentrated on the absorbing states, so cost-effectiveness results are taken from the cycle-by-cycle trace over the time horizon instead. Keep two concepts distinct: a stationary distribution concerns whether the state distribution stops changing, while time-homogeneity concerns whether the transition matrix P itself stays the same over time.

Formula
\pi P = \pi, \quad \sum_i \pi_i = 1

Common pitfalls

  • Collapsing clinically distinct stages into a single state to simplify the model can mask important differences in costs or outcomes — always validate state definitions against clinical or domain expert judgment.
  • Ignoring parameter uncertainty: reporting only point-estimate results without probabilistic sensitivity analysis (PSA) overstates confidence; always propagate uncertainty through the transition matrix.
  • Choosing a cycle length that is too coarse relative to the speed of state transitions introduces half-cycle correction issues and biases cumulative estimates.
  • Confusing absorbing states (e.g., death) with transient states can cause the model to produce infinite expected costs or times; verify that at least one absorbing state is reachable from every transient state.

Frequently asked questions

How many states should a Markov model have?

Use the fewest states that keep the distinctions which change costs, outcomes, or transition behaviour. Each added state needs its own transition probabilities, which must be estimated and checked, so extra states add data requirements as well as realism. When the state count grows to the point where the required transitions cannot be estimated credibly, individual-level simulation is usually the more practical choice.

What if my data suggest transition probabilities change over time?

A time-homogeneous Markov chain assumes constant transition probabilities. If probabilities vary with time or age, use a time-inhomogeneous chain (different P matrix per cycle), a semi-Markov model (sojourn-time-dependent transitions), or individual-level microsimulation.

How do I handle parameter uncertainty?

Fit Dirichlet distributions to each row of the transition matrix using observed counts, then sample from these distributions in a probabilistic sensitivity analysis (PSA). Report results as cost-effectiveness acceptability curves or credible intervals rather than point estimates.

What is the difference between a Markov model and a Markov Decision Process?

A Markov model describes a system passively — transitions are governed by fixed probabilities. A Markov Decision Process (MDP) extends this by adding actions and rewards, enabling optimization of decisions or policies over time.

When should I use a cohort Markov model versus individual-level microsimulation?

Cohort models track proportions across states and are computationally cheap and transparent; prefer them when the Markov assumption holds and heterogeneity is limited. Microsimulation tracks individual histories, making it suitable when memory effects, individual variability, or interaction between individuals matter, at the cost of greater computational and data demands.

Related methods

Sources

  1. Norris, J. R. (1997). Markov Chains. Cambridge University Press, Cambridge.

    ISBN: 9780521633963
  2. Markov chain. Wikipedia.

    Open publication reference
  3. Contemporary Bayesian Econometrics and Statistics (Wiley Series in Probability and Statistics), p. ?

  4. 2015_Book_DataMining, p. ?