Compartmental models (SIR, SEIR, SIRD) describe disease transmission by tracking individuals in disease states using differential equations to model transitions. Models predict epidemic trajectories, estimate R0, and evaluate intervention effects. Fitting models to observed data allows inference about unobserved transmission dynamics.
You already know the SIR and SEIR frameworks as conceptual tools for partitioning a population into disease states. Now the task is to see how those boxes and arrows translate into differential equations that generate quantitative predictions. The SIR model has three rates: β (transmission rate — how quickly susceptibles become infected per infectious contact), γ (recovery rate — the inverse of the average infectious period), and N (population size). The equations are: dS/dt = −βSI/N, dI/dt = βSI/N − γI, dR/dt = γI. Notice that the term βSI/N is the "engine" of the outbreak — it is the product of transmission rate, the fraction susceptible, and the number infectious. As S depletes, this term shrinks, which is why outbreaks eventually peak and decline even without intervention.
The basic reproduction number R₀ = β/γ emerges naturally from this structure. R₀ is the expected number of secondary cases generated by one infectious individual in a fully susceptible population. When R₀ > 1, dI/dt is initially positive — the epidemic grows. When R₀ < 1, the infectious class declines immediately — the pathogen cannot sustain transmission. The epidemic peak occurs when S/N = 1/R₀, the point where each case on average infects exactly one other. The herd immunity threshold (1 − 1/R₀) tells you what fraction of the population must be immune to prevent growth — it is derived directly from the condition that R₀ × (fraction susceptible) < 1.
The SEIR model adds an exposed (E) compartment to capture the latent period — the window between infection and infectiousness. For diseases like COVID-19, influenza, or measles, individuals spend days in E before entering I. Adding E slows the epidemic curve, reduces the peak, and delays it in time. SIRD extends the model by separating deaths (D) from recovered individuals, enabling estimates of infection fatality rates. More complex variants add age structure, spatial heterogeneity, vaccination compartments, waning immunity, or multiple transmission routes. Each addition increases realism but also multiplies parameters, requiring more data to identify.
Fitting models to outbreak data is how the parameters are estimated in practice. When an epidemic begins, you observe reported cases over time, but the true infection curve is broader and earlier — many infections are undetected, and reporting lags behind infection. By fitting the SIR or SEIR differential equations to the observed curve (using least-squares or maximum likelihood), you can estimate β, γ, and the fraction of infections that are reported. Crucially, this fitting allows you to infer unobserved dynamics — the total attack rate, when the peak truly occurred, and how many infections have already happened. Early in an outbreak, model-based estimates of R₀ and the effective reproductive number Rₜ (R₀ adjusted for current susceptibility and interventions) guide decisions about when and how aggressively to intervene. The skill of translating compartmental diagrams into differential equations, fitting them to noisy data, and reading out policy-relevant parameters is the core quantitative contribution of mathematical epidemiology.