Outbreak Lab · Unit 5 of 11
Unit 5: Modeling with SIR and SEIR
Compartment models, their equations in plain words, the peak and the limits of models.
Opens the first lesson of this unit in Outbreak Lab. Every lesson is open from the start.
Lesson 1: Boxes called compartments
Epidemiologists often model a population by sorting everyone into boxes called compartments. In the SIR model, S is Susceptible (can catch it), I is Infectious (can spread it), and R is Removed (recovered and immune, or otherwise out of the chain). SEIR adds E, Exposed: infected but not yet infectious.
People flow from box to box: S to E when infected, E to I when they become infectious, I to R when they recover. Nobody appears or disappears, so S + E + I + R always equals the population N. In our simulator, vaccinated people start in R because they are protected.
Models like this are simple on purpose. They help us reason about how outbreaks behave, test what-if questions and see which numbers matter most.
Key idea: SEIR sorts people into Susceptible, Exposed, Infectious and Removed. S + E + I + R = N at every moment.
- Compartment
- A box in a model that holds everyone in the same state, like Susceptible or Infectious.
- SIR model
- A compartment model with Susceptible, Infectious and Removed.
- SEIR model
- SIR plus an Exposed box for people infected but not yet infectious.
Try it in the SEIR model simulation: Use "Read the curves on day" to check that S + E + I + R stays 100,000.
Lesson 2: The equations in plain words
New infections per day = β × S × I ÷ N. In words: each infectious person makes β infecting contacts per day, but only the share S/N of those contacts are with people who can still catch it.
Exposed people become infectious at rate σ (sigma), which is 1 ÷ the latent period. Infectious people are removed at rate γ, which is 1 ÷ the infectious period. Each day, S loses the new infections, E gains them and loses σ × E, I gains σ × E and loses γ × I, and R gains γ × I.
Computers solve equations like these by taking many tiny time steps. The simulator here uses a standard method called Runge–Kutta, with steps of a small fraction of a day.
Key idea: New infections = β × S × I ÷ N. E becomes I at rate σ; I becomes R at rate γ.
- Rate of becoming infectious (σ)
- 1 ÷ the latent period: the share of exposed people who become infectious each day.
Try it in the SEIR model simulation: Make the latent period longer and watch the peak move later.
Lesson 3: Why outbreaks peak and turn around
As people are infected and recover, fewer susceptible people are left, so Rt = R0 × S/N falls. When S/N drops to 1/R0, Rt reaches 1 and the number of infected people stops growing: that is the peak.
The outbreak does not stop at the peak. Many people are still infected, so infections continue on the way down. This overshoot carries the final share ever infected well past the herd-immunity threshold. With R0 = 2.5 in the simple model, the peak comes once 60% have been infected, but by the end about 89% have been.
Higher R0 means an earlier and higher peak. Try R0 = 2 and then R0 = 4 in the simulator.
Key idea: The peak comes when S/N falls to 1/R0. Overshoot carries the total past the herd-immunity threshold.
- Epidemic peak
- The moment the number of infected people stops rising, when Rt reaches 1.
- Overshoot
- Infections that continue after the peak, carrying the total past the herd-immunity threshold.
- Attack rate
- The share of a population ever infected during an outbreak.
Try it in the SEIR model simulation: Compare R0 = 2 with R0 = 4.
Lesson 4: What models assume
Our simulator assumes a well-mixed town: anyone is equally likely to meet anyone. Real people live in households, schools and workplaces, so real spread is clumpier.
It also assumes fixed numbers: everyone has the same latent and infectious periods, immunity lasts, vaccines fully protect, and nobody is born, moves away or dies. Changing any of these changes the results.
So a model is a thinking tool, not a crystal ball. Every simulation in this lab uses a made-up town and is not a forecast of any real disease. Real forecasts are built by expert teams from real data, and they come with ranges of uncertainty.
Key idea: Models simplify on purpose. Use them to understand how spread works, not to predict a specific real outbreak.
- Well mixed
- A model assumption that anyone is equally likely to meet anyone.
Every lesson is free: no ads, no lives and no paywall.