Science Wonders
Epidemiology · Kermack & McKendrick 1927 · Smallpox eradicated 1980

How an outbreak spreads, and stops

Each dot is a person. Infection jumps when people meet, and every sick person recovers after a while. One number, R0, decides whether a handful of cases fizzles or sweeps through everyone, and vaccination can push it below the tipping point.

Day 0 Susceptible 0 Infected 0 Recovered 0 Vaccinated 0 Peak infected 0 Herd-immunity threshold –
Disease
Theory
Run

Five people start out infected in a crowd with no immunity. Let it run, then set vaccination just above the herd-immunity threshold and start a new outbreak.

What you're seeing

400 people wander about. Blue are susceptible, red are infected, grey have recovered and are immune, green were vaccinated. Each time an infected person meets a susceptible one there is a fixed chance of passing it on, set so that one case in a fully susceptible crowd infects R0 others on average. Each infected person recovers at random, after 10 days on average.

On the chart, solid lines are the dots and dashed lines are the 1927 SIR equations for the same R0, which treat the crowd as perfectly mixed.

Try this

  • Watch the dashed line at 1/R0. Infections peak exactly when the susceptible share falls through it, because from then on each case infects fewer than one new person.
  • Set vaccination a little below the threshold, then a little above. Below, the outbreak still spreads. Above, it sputters out with a few cases.
  • Pick Measles. The threshold jumps to 93%. Compare 90% and 95% vaccinated: at 90% the equations still predict an outbreak.
  • Turn up social distancing. The peak drops and arrives later: the curve flattens, and the dots fall well below the equations, which know nothing about distancing.

Why it's strange

Vaccinating enough people protects people who are not vaccinated. Once more than 1 − 1/R0 of the crowd is immune, each case infects fewer than one other on average, so chains of infection die out before they reach most unprotected people. The threshold is a tipping point, not a gradual slope: a few percent either side of it changes everything.

The threshold formula assumes a well-mixed crowd and a vaccine that fully blocks infection. Real vaccines and real social networks move the number, which is why targets are set a little above it.

Real-world applications

Models that change policy

The same ideas, made more detailed with real data on ages, households and travel, guide vaccination targets and outbreak responses around the world.

Public health

Vaccination targets

Measles is one of the most contagious diseases known, with an R0 of about 12 to 18. Plugging that into 1 − 1/R0 gives roughly 92 to 94%, which is why health agencies aim for about 95% coverage with two doses. When local coverage slips below that, outbreaks return.

In the demo: choose Measles and find the vaccination level that stops it.
History

Eradicating smallpox

Smallpox was declared eradicated by the World Health Organization in 1980, the first human disease ever wiped out. The final push used ring vaccination: find each case and vaccinate everyone around it, cutting the chains of infection without needing to reach every person on Earth.

In the demo: chains that cannot reach susceptible people die out.
Pandemics

Flattening the curve

In March 2020, an Imperial College London model that simulated individual people moving between homes, schools and workplaces projected how many COVID-19 deaths different policies might prevent. It helped shift UK and US policy toward distancing measures to keep hospitals from being overwhelmed.

In the demo: social distancing lowers and delays the red peak.
Outbreak response

Ebola

During the 2014 to 2016 West African Ebola epidemic, case projections helped decide how many treatment beds to build. In 2015 a trial in Guinea used ring vaccination with a new Ebola vaccine and found it highly protective. That vaccine is now licensed.

In the demo: a lower R0 and fewer susceptible contacts shrink the outbreak.
Forecasting

Flu season forecasts

Each winter the US Centers for Disease Control and Prevention collects forecasts of flu hospitalisations from many research teams in its FluSight project, running since the 2013 to 2014 season. Many of the models are descendants of the SIR equations, fitted to the latest data.

In the demo: the dashed curves are the simplest such forecast.
Computing

Computer worms

Self-spreading computer programs follow the same maths. In July 2001 the Code Red worm infected more than 359,000 computers in under 14 hours, and its rise fitted an epidemic curve. Patching works like vaccination: a machine that cannot be infected also stops passing it on.

In the demo: vaccinated dots are patched machines.