Francesco Castaldi
Loading constellation...
Francesco Castaldi
← Back to blogData Science

SIR Epidemiological Models as Markov Chains

2025-06-10·6 min read

From Differential Equations to Discrete Steps

The classic SIR model uses differential equations to describe how a population moves between Susceptible, Infected, and Recovered states. While elegant mathematically, this continuous formulation can be less intuitive for modeling real-world outbreaks where interventions happen at discrete time points.

Markov Chain Formulation

By treating the SIR model as a discrete-time Markov chain, each time step represents a fixed interval (typically one day), and transition probabilities govern movement between compartments. This approach naturally accommodates time-varying parameters — for example, reducing the contact rate when social distancing measures are introduced.

Monte Carlo simulation then generates distributions of possible outcomes rather than a single deterministic trajectory, providing a range of estimates for peak infection rates, outbreak duration, and total cases.

Sensitivity Analysis

Parameter uncertainty is a known challenge in epidemiological modeling. Running thousands of simulations while varying R₀, recovery rates, and intervention timing reveals which parameters most influence outcomes. This helps public health officials prioritize data collection efforts on the most impactful variables.

← Back to blogReturn to constellation →
FC
GitHub·LinkedIn·Email
© 2026