SimuVeda

Biology · Simulator 034

Epidemic Dynamics

Follow an infection through a population using the SIR model: susceptible, infected, recovered. Change how easily it spreads, how long people stay infectious, and how many are vaccinated. Compare the peak, its timing and how many are infected in total.

How the model works

The population is split into three compartments that change over time:

dS/dt = −β S I / N
dI/dt = β S I / N − γ I
dR/dt = γ I

β is the transmission rate and 1/γ the average infectious period. The basic reproduction number R₀ = β/γ is the number of people one case infects in a fully susceptible population. The epidemic grows while the effective number R_eff = R₀ · S/N is above 1. It peaks exactly when R_eff falls to 1.

Vaccinating a fraction v before the outbreak moves people straight to R. If v > 1 − 1/R₀, the herd-immunity threshold, the outbreak cannot grow at all. The final size z (fraction ever infected, without vaccination) solves z = 1 − e^(−R₀ z).

Educational compartment model: homogeneous mixing, lifelong immunity, no births, deaths or behaviour change. It is not a forecast for any real disease.

Guided experiments

  1. R₀ = 2.5. No vaccination. Prediction: the peak arrives when 40% are still susceptible (S/N = 1/R₀). About 89% are eventually infected.
  2. Flatten the curve. Halve β so R₀ = 1.25. Prediction: a much lower, later peak, and about 37% infected in total.
  3. Herd immunity. R₀ = 2.5, vaccinate 65%. Prediction: the threshold is 1 − 1/2.5 = 60%. At 65% the initial cases fizzle out.

Challenge

Measles has R₀ around 15. What vaccination coverage is needed for herd immunity? Why is that much harder than for a disease with R₀ = 2?

Reveal the explanation

1 − 1/15 ≈ 93%, against 50% for R₀ = 2. Because the threshold approaches 100% as R₀ grows, small drops in measles coverage quickly allow outbreaks. Set β/γ = 15 and try 90% and 95%.

References

  • Kermack & McKendrick (1927), “A contribution to the mathematical theory of epidemics”, Proc. R. Soc. A 115: 700–721.
  • Keeling & Rohani, Modeling Infectious Diseases in Humans and Animals, ch. 2.