Written and maintained by CASRAI Editorial Board
Published
On this page
Definition in one paragraph
An epidemiology model is a mathematical and computational framework designed to simulate infectious disease transmission dynamics in populations, project epidemic curves, and evaluate public health interventions. Grounded in compartmental disease partitioning—formalized in the landmark Susceptible-Infectious-Recovered (SIR) framework by Kermack and McKendrick (1927)—mathematical epidemiology models track population flows across mutually exclusive health states using nonlinear ordinary differential equations. By estimating core transmission parameters including the basic reproduction number (R₀) and time-varying effective reproduction number (Rₜ), these models define epidemic thresholds, herd immunity requirements, and healthcare resource demands during outbreaks.
Formula with every symbol explained
In the standard SIR formulation for a closed population, transmission dynamics follow three coupled ordinary differential equations (ODEs):
dS/dt = - (β × S × I) / N
dI/dt = (β × S × I) / N - (γ × I)
dR/dt = γ × I
Every mathematical symbol in this system is defined as follows:
- S(t): Susceptible individuals vulnerable to infection at time t.
- I(t): Infectious individuals actively transmitting pathogen at time t.
- R(t): Removed individuals with immunity or deceased at time t (dS/dt + dI/dt + dR/dt = 0).
- N: Total population size (N = S + I + R).
- β (Transmission coefficient): Daily transmission rate (days⁻¹), where β = c × p (contact rate c times transmission probability p).
- γ (Recovery rate): Removal rate (days⁻¹), defined as γ = 1 / D (mean infectious duration D).
- t: Time in days.
The Basic Reproduction Number (R₀)
Factoring the infected equation: dI/dt = [(β × S / N) - γ] × I. In a completely susceptible population (S/N ≈ 1), infection expands if dI/dt > 0, requiring β / γ > 1. This defines the basic reproduction number (R₀):
R₀ = β / γ = β × D
Effective Reproduction Number (Rₜ) and Herd Immunity
As susceptibles deplete, the effective reproduction number (Rₜ) tracks ongoing transmission potential: Rₜ = R₀ × (S(t) / N). The herd immunity threshold (H_IT) and critical vaccination coverage (V_c) with vaccine efficacy ε are:
H_IT = 1 - (1 / R₀)
V_c = [1 - (1 / R₀)] / ε
Next-Generation Matrix Method
For structured models (such as SEIR), R₀ is derived via the Next-Generation Matrix method (van den Driessche & Watmough, 2002) as the dominant eigenvalue of FV⁻¹: R₀ = ρ(F × V⁻¹), where F captures new infections and V captures compartmental transitions.
Worked example with real numbers and arithmetic shown
Consider an outbreak in a closed population of N = 10,000 individuals: mean infectious duration D = 4.0 days (γ = 1 / 4.0 = 0.25 day⁻¹), transmission coefficient β = 0.50 day⁻¹ (5 daily contacts at 10% transmission probability), Day 0 state I₀ = 10, R₀_rec = 0, S₀ = 9,990, and vaccine efficacy ε = 0.85.
Step 1: Calculate the Basic Reproduction Number (R₀)
R₀ = β / γ = 0.50 / 0.25 = 2.00
Each primary case produces 2.00 secondary infections.
Step 2: Calculate Initial Transmission Velocity on Day 0
dS/dt = - (0.50 × 9,990 × 10) / 10,000 = - 49,950 / 10,000 = - 4.995 people/day
dR/dt = 0.25 × 10 = 2.500 people/day
dI/dt = 4.995 - 2.500 = + 2.495 people/day
Check: dS/dt + dI/dt + dR/dt = 0.000. On Day 0, active cases rise by ~2.5 people/day.
Step 3: Calculate Herd Immunity and Vaccination Targets
H_IT = 1 - (1 / 2.00) = 1 - 0.500 = 0.500 (50.0%)
V_c = 0.500 / 0.85 = 0.5882... ≈ 58.82%
Halting transmission requires 50.0% immunity, or 58.82% vaccination coverage (5,883 individuals) at 85% efficacy.
Step 4: Dynamic Tracking of Effective Reproduction Number (Rₜ)
- Early Phase (S = 8,000; 80% susceptible):
Rₜ = 2.00 × 0.80 = 1.60(Outbreak accelerates). - Peak Inflection (S = 5,000; 50% susceptible):
Rₜ = 2.00 × 0.50 = 1.00(Peak prevalence at Day 27.0 with 1,539 active cases; dI/dt = 0). - Decay Phase (S = 3,500; 35% susceptible):
Rₜ = 2.00 × 0.35 = 0.70(Outbreak decays; cumulative attack rate reaches 79.2% due to epidemic overshoot).
Interpretation (what the result means, with a small table of reading guidance)
Interpreting an epidemiology model requires distinguishing between baseline potential (R₀) and realized transmission (Rₜ). When evaluating surveillance data alongside clinical risk measures such as the relative risk definition or an odds ratio vs. risk ratio comparison, model outputs contextualize individual risk within population curves.
| Metric Value | Epidemic State | Trajectory | Public Health Implication |
|---|---|---|---|
| R₀ < 1.0 | Subcritical | Decay to zero | Infection cannot cause an epidemic; chains self-terminate. |
| R₀ = 1.0 | Endemic equilibrium | Stable | Each case replaces itself; infection stabilizes. |
| 1.0 < R₀ < 2.0 | Moderate epidemic | Growth | Controllable via contact tracing, targeted interventions, and vaccination. |
| R₀ ≥ 2.0 | Rapid surge | Surge | High saturation risk; requires population-wide mitigation and high immunization. |
| Rₜ > 1.0 | Active expansion | Rising | Interventions insufficient; transmission multiplying. |
| Rₜ = 1.0 | Epidemic peak | Peak | Maximum concurrent clinical demand (dI/dt = 0). |
| Rₜ < 1.0 | Outbreak decay | Falling | Transmission successfully curtailed. |
Comparative Model Architectures
| Model | Compartments | Latent Stage | Immunity | Examples |
|---|---|---|---|---|
| SIR | S, I, R | No | Permanent | Measles, Rubella, Mumps |
| SEIR | S, E, I, R | Yes | Long-term | SARS-CoV-2, Influenza, Smallpox |
| SIS | S, I | No | None | Rhinovirus, Gonorrhea, Chlamydia |
| SIRS | S, I, R | No | Waning | Respiratory Syncytial Virus (RSV) |
Assumptions and common mistakes
Epidemiological models simplify biological and social dynamics. Understanding their constraints prevents analytical errors:
Core Modeling Assumptions
- Homogeneous Mixing: Standard models assume panmixia. Accounting for socioeconomic stratification via social epidemiology methods refines transmission heterogeneity.
- Closed Population: Basic models assume no migration or demographic turnover over acute epidemic periods.
- Exponential Residence Times: Differential equations assume exponentially distributed compartment duration, whereas clinical infectious periods often follow gamma distributions.
Common Analytical Mistakes
- Conflating R₀ with Rₜ: Misapplying baseline R₀ to mature outbreaks with accumulated immunity instead of tracking real-time Rₜ.
- Treating R₀ as a Biological Constant: R₀ reflects pathogen biology interacting with population contact patterns, varying across regions.
- Equating Herd Immunity to Final Outbreak Size: Overlooking epidemic overshoot, where active transmission causes final cumulative cases to substantially exceed the herd immunity threshold.
- Ignoring Incubation Periods: Applying SIR instead of SEIR to pathogens with latent stages overestimates initial epidemic acceleration.
- Confounding in Observational Calibration: When fitting models to empirical data, failing to adjust for effect modification and confounding produces biased parameters.
How to report it (APA example)
When reporting results from an epidemiology model in APA 7th edition style, state parameters, credible intervals, calibration methods, and sensitivity analyses. For testing frameworks, consult how to choose a statistical test, and quantify uncertainty using a confidence interval for a proportion.
Sample APA 7th Edition Reporting Paragraph
A deterministic SIR model was calibrated to daily incident case data across a population of N = 10,000 individuals over 60 days. MCMC estimation yielded transmission coefficient β = 0.50 day⁻¹ (95% CrI [0.46, 0.55]) and recovery rate γ = 0.25 day⁻¹ (95% CrI [0.23, 0.27]), corresponding to mean infectious duration D = 4.00 days (95% CI [3.70, 4.35]). The estimated basic reproduction number was R₀ = 2.00 (95% CrI [1.78, 2.24]), with a herd immunity threshold of 50.0% (95% CrI [43.8%, 55.4%]). Peak prevalence occurred on Day 27.0 with 1,539 active cases. The effective reproduction number fell below unity (Rₜ = 0.98) on Day 27.2. Cumulative attack rate reached 79.2% (7,918 cases) at Day 60, reflecting an epidemic overshoot of 29.2%.
How to calculate it in Excel, R or Python
Below are computational implementations for solving a standard SIR epidemiology model across three computing platforms.
1. Python Implementation (SciPy Integration)
import numpy as np
from scipy.integrate import solve_ivp
N, beta, gamma = 10000, 0.50, 0.25
def sir_ode(t, y, beta, gamma, N):
S, I, R = y
return [- (beta * S * I) / N, (beta * S * I) / N - (gamma * I), gamma * I]
sol = solve_ivp(sir_ode, (0, 60), [9990.0, 10.0, 0.0], args=(beta, gamma, N),
t_eval=np.linspace(0, 60, 601), method='RK45')
peak_idx = np.argmax(sol.y[1])
print(f"R0: {beta/gamma:.2f} | Peak Day: {sol.t[peak_idx]:.1f} | Peak Active Cases: {sol.y[1][peak_idx]:.0f}")
2. R Implementation (deSolve Package)
library(deSolve)
sir_ode <- function(t, y, p) {
with(as.list(c(y, p)), {
list(c(- (beta * S * I) / N, (beta * S * I) / N - (gamma * I), gamma * I))
})
}
p <- c(beta = 0.50, gamma = 0.25, N = 10000)
out <- ode(y = c(S = 9990, I = 10, R = 0), times = seq(0, 60, 0.1), func = sir_ode, parms = p)
df <- as.data.frame(out)
cat(sprintf("R0: %.2f | Peak Day: %.1f | Peak Cases: %.0fn",
p["beta"]/p["gamma"], df$time[which.max(df$I)], max(df$I)))
3. Excel Implementation (Euler Method)
To simulate an SIR model in Excel, apply Euler’s numerical method with step size Δt = 0.1 days:
- Cells:
G1= 10000 (N),G2= 0.50 (β),G3= 0.25 (γ),G4= 0.1 (Δt). - Row 2 (Day 0): A2 =
0.0, B2 =9990, C2 =10, D2 =0, E2 ==($G$2/$G$3)*(B2/$G$1). - Row 3 (Step t + Δt): A3 =
=A2+$G$4; B3 ==B2-($G$2*B2*C2/$G$1)*$G$4; C3 ==C2+(($G$2*B2*C2/$G$1)-($G$3*C2))*$G$4; D3 ==D2+($G$3*C2)*$G$4; E3 ==($G$2/$G$3)*(B3/$G$1). - Propagation: Fill Row 3 down through Row 602 (60 days). Locate peak cases via
=MAX(C2:C602).
FAQ
What is the difference between an SIR model and an SEIR model?
The primary difference is the Exposed (E) compartment. While the basic SIR model assumes immediate infectiousness, the SEIR model accounts for an incubation period during which an infected host cannot yet transmit.
Why is R₀ not a fixed biological constant?
R₀ depends on pathogen biology and population contact patterns (density, ventilation), varying across geographic and social contexts.
How does the effective reproduction number (Rₜ) differ from R₀?
R₀ measures baseline transmission potential in a completely susceptible population without immunity or interventions. In contrast, Rₜ tracks real-time transmission during an active outbreak, accounting for changing immunity and interventions.
What causes an epidemic curve to turn downward before everyone is infected?
An epidemic curve turns downward when susceptibles deplete below the transmission threshold (S/N < 1/R₀). Once Rₜ falls below 1, active infections decrease.
Sources
- Kermack, W. O., & McKendrick, A. G. (1927). A contribution to the mathematical theory of epidemics. Proc. R. Soc. Lond. A, 115(772), 700–721. DOI: 10.1098/rspa.1927.0118 (Accessed: 2026-11-10).
- Anderson, R. M., & May, R. M. (1991). Infectious Diseases of Humans: Dynamics and Control. Oxford University Press. ISBN: 9780198540403 (Accessed: 2026-11-10).
- van den Driessche, P., & Watmough, J. (2002). Reproduction numbers and sub-threshold endemic equilibria for compartmental models. Math. Biosci., 180(1–2), 29–48. DOI: 10.1016/S0025-5564(02)00108-6 (Accessed: 2026-11-10).
- CDC Center for Forecasting and Outbreak Analytics (CFA). (2024). Outbreak Analytics and Disease Modeling Framework. CDC. Available at: cdc.gov/cfa/php/about/index.html (Accessed: 2026-11-10).







