Safe Mustafa
MathEnglishScienceSocial StudiesLibraryDiagnosticsContact
© 2026 Safe Mustafa LLCContact
← Biology
Ecology

Disease Spread and Epidemics

A live SEIR simulation with real disease data: watch an outbreak actually unfold agent by agent, and see for yourself why masks, distancing, and prior immunity each work through completely different mechanisms.

Day0
Infected2
Recovered0
Deaths0
New today0
Susceptible Infected Recovered + deceased

Epidemiologists model an outbreak by sorting a population into compartments: Susceptible (can still catch the disease), Exposed (infected, but not yet contagious — the incubation period), Infectious (actively contagious), and Recovered (immune, or in this simulation’s case, sometimes deceased instead). This is the SEIR model, and it’s exactly what’s running above with five real diseases’ actual published parameters — COVID-19, seasonal flu, measles, SARS, and tuberculosis each have a genuinely different R0 (how many new people one case infects on average), incubation period, and case fatality rate.

Notice that masks and social distancing help for different reasons. Masks lower the probability of transmission during a given contact. Distancing instead reduces how often and how closely people come into contact at all. Starting immunity (from vaccination or prior infection) works differently still — it simply shrinks the pool of people left to infect in the first place. All three slow an outbreak, but none of them do it the same way, and a real public health response usually needs more than one at once.

Measles’ R0 of about 15 versus flu’s roughly 1.3 explains something important: the herd immunity threshold — roughly 1 minus 1 divided by R0 — comes out to about 93% for measles but only about 23% for flu. A disease that spreads far more easily needs dramatically more of the population immune before outbreaks reliably stop on their own. And tuberculosis’s real incubation period can stretch for months — far longer than this simulation actually animates it, since watching that unfold in real time would take forever — which is exactly why TB remains so hard to contact-trace even though its R0 isn’t especially high.

Question 1 of 9easy
In the SEIR model, a person in the 'Exposed' compartment is: