Three Compartments, One Epidemic
The SIR model is the workhorse of mathematical epidemiology. It divides a population into three compartments: Susceptible individuals who can catch the disease, Infected individuals who can transmit it, and Recovered individuals who are immune. Two coupled differential equations govern the flow between compartments — the transmission rate β moves people from S to I, and the recovery rate γ moves them from I to R. From these simple rules, the characteristic epidemic curve emerges.
R₀ Controls Everything
The basic reproduction number R₀ = β/γ is the single most important parameter in epidemiology. It represents the average number of secondary infections caused by one infected individual in a fully susceptible population. When R₀ > 1, the infected compartment grows initially. When R₀ < 1, the outbreak decays. The epidemic peaks when enough people have recovered that the effective reproduction number R_t = R₀ × S/N drops below 1 — this is the herd immunity threshold, reached when a fraction 1 - 1/R₀ of the population is immune.
The Epidemic Curve
The SIR model produces the familiar bell-shaped epidemic curve for the I compartment. The curve's height (peak prevalence) and timing (peak day) depend on R₀, the recovery rate, and the initial number of infections. Higher R₀ produces taller, earlier peaks. Longer infectious periods stretch the curve out but also increase total infections. The S curve monotonically decreases while R monotonically increases, and their final values reveal the total epidemic size.
From Theory to Intervention
This simulation integrates the SIR equations in real time, drawing all three compartments as animated curves. Drag the R₀ slider to see how transmissibility reshapes the epidemic. Increase the infectious period to see the curve broaden. The peak infected readout shows when healthcare capacity would be most stressed — the central concern of pandemic planning and the motivation behind curve-flattening interventions.