Academics · High School · Epidemiology

Model an outbreak.
Then find
its source.

Set the population, R0 and how many people are immune, and watch the epidemic curve rise, peak and burn out. Then work an attack rate table the way outbreak investigators do.

3groups in the SIR model, drawn day by day
60%immune stops R0 2.5 from spreading
5foods in the example potluck

The outbreak lab

Change one number at a time and watch what moves. Keep a run to compare against.

Loading the outbreak lab. If nothing appears, turn on JavaScript.

Six words an epidemiologist uses every day

The lab computes each of these. Here is what they mean.

R0, the basic reproduction number

How many people one case infects, on average, when no one is immune. It depends on the germ and on how people mix.

Effective R

R0 times the share of people who can still catch it. The outbreak grows while it is above 1 and shrinks once it falls below 1.

Herd immunity threshold

1 − 1/R0: the immune share at which effective R starts below 1. For R0 2.5 it is 60%; for R0 15 it is about 93%.

Attack rate

Of the people in a group, the share who got sick. Used when everyone at an event can be counted.

Risk ratio

Attack rate among those who ate a food divided by the attack rate among those who did not. 1 means no difference.

Odds ratio

Used when cases and healthy controls were chosen separately: the odds that a case ate it, divided by the odds that a control did.

What you get

Academics · High SchoolFree

What you finish with
A working feel for how an outbreak grows and ends: the peak, the share ever infected, effective R and the herd immunity threshold, each from your own numbers. A completed food-specific attack rate table with risk or odds ratios and the most likely source named. A printed outbreak report.
Who it is for
High school students in biology, health science, AP Biology or AP Statistics, and teachers who want a live model to project; also anyone who heard “R0” or “herd immunity” in the news and wants to see what the numbers do.
Format
Browser lab in two parts: Outbreak model and Find the source. Works on a phone, tablet or computer, by touch or keyboard. Prints an outbreak report; downloads the model’s days or the food table as a .csv.
Access
Free. No account, no sign-in and nothing to install. Everything you type stays in this browser; nothing is sent to Caveat.
Where it lives
The High School space in Caveat Academics.
Support
Questions, a correction or a request: team@caveatacademic.com.
Herd immunity, drawn. The same illness in the same town: the more people are immune, the later and lower the peak, until at 60% the outbreak never starts.

How to use it

  1. Load the example, or pick a starting point and change R0 with the slider.
  2. Drag the Day slider to read how many people are in each group on any day.
  3. Press Keep this run, raise the immune share, and read the comparison under the chart.
  4. Open Find the source, read which food the table points to, then try the same counts as a case-control study.

Open the outbreak lab

How the model works

Three groups, two arrows, and two formulas the page checks itself against.

Susceptiblecan catch itInfectiouscan pass it onRecoveredimmunenew infections a dayβ × S × I ÷ N, β = R0 ÷ daysrecoveries a dayI ÷ days infectiousSusceptiblecan catch itInfectiouscan pass it onRecoveredimmuneR0 ÷ days × S × I ÷ N each dayI ÷ days each day
The SIR model moves people between three groups. The arrows are the only two things that happen: a contact infects someone, and an infectious person recovers.

What the model assumes

Everyone mixes evenly, no one is born, dies or moves, a person who recovers stays immune, and no one changes behavior as cases rise. Real outbreaks break all of these, which is why public health agencies use larger models with age groups, places and changing contact. The SIR model is still the one every course starts with, because its three rules already explain the peak, the burnout before everyone is infected, and herd immunity.

How the page computes

The curves are integrated in steps of a tenth of a day (fourth-order Runge–Kutta). Two results have exact formulas, and the page reports the model next to them: the peak comes when the share not yet infected falls to 1/R0, and the total ever infected solves ln(S₀/S∞) = R0 × (share infected over the outbreak). For the example the integrated run and the exact formulas agree to within one person. The food table uses the standard 95% intervals for a risk ratio (on the log scale) and an odds ratio (Woolf’s method); for the chicken salad that is a risk ratio of 5.0, from 1.9 to 12.9.

Sources

  1. W. O. Kermack and A. G. McKendrick, “A contribution to the mathematical theory of epidemics,” Proceedings of the Royal Society A 115 (1927): the SIR model and its final-size relation.
  2. R. M. Anderson and R. M. May, Infectious Diseases of Humans: Dynamics and Control (Oxford University Press, 1991): R0, effective R, the herd immunity threshold 1 − 1/R0, and the R0 of 12 to 18 often quoted for measles.
  3. Centers for Disease Control and Prevention, Principles of Epidemiology in Public Health Practice, 3rd edition (2006, updated 2012), Lesson 3 (attack rate, risk ratio, odds ratio) and Lesson 6 (investigating an outbreak; food-specific attack rate tables).
  4. K. J. Rothman, S. Greenland and T. L. Lash, Modern Epidemiology, 3rd edition (2008): confidence intervals for the risk ratio (log scale) and the odds ratio (Woolf).

A teaching model, not a forecast: real illnesses, places and people do not mix evenly. The potluck, its foods and its counts are made up. Support: team@caveatacademic.com.