p is the share of meetings that people protect (staying home, masks, distance); e is how much protection cuts transmission.
Epidemic ModelingFoundations
Module 2Beyond the virus
An epidemic is more than a virus. We treat spread as a tug of war between transmission and interruption, see why the reproduction number depends on the setting, why uneven spread makes outbreaks rarer but more explosive, and why data lags behind reality; then the biology underneath (pathogens, the three clocks of infection, routes, immunity, spillover), the psychology and economics of how people react, and the role of governments in one coupled system with feedback loops and late data.
Key ideas, one per episode
- Ep. 4R depends on the setting: who meets whom, uneven spread, delays, and the order of the body’s clocks.
- Ep. 5Behavior is part of the epidemic: fear flattens the curve, fatigue brings it back, and money decides who can protect.
- Ep. 6Timing, packages and late data: governments shape what the virus needs, and models map futures, not one forecast.
Textbook: Chapter 2 of T. Lazebnik, Epidemic Modeling: Principles, Algorithms, and Applications (Academic Press, 2026). The episodes and slides follow the chapter’s topics in our own words, figures and simulations; nothing is copied from the book.
Watch
3 short episodes for this module. Pick one from the list, and open the transcript to read along: each timestamp plays the episode from there. The narration is generated with a voice clone of Teddy, used with his permission.
Episode 4 · 5:09
How infections spread, and the biology behind it
Two viruses can look almost the same and still write very different epidemics.
R depends on the setting: who meets whom, uneven spread, delays, and the order of the body’s clocks.
TranscriptEpisode 4
Same virus, different epidemics. Two viruses can look almost the same in a clinic, and still write completely different epidemics. This module is about why. Module two is everything beyond the virus itself. Today: how infections spread through a population, and the biology underneath.
Transmission vs interruption. Think of an epidemic as a tug of war. On one side, transmission: an infectious person meets a susceptible one, and the germ gets across. On the other side, interruption: people become immune, cases are isolated sooner, or contacts change. We sum up the balance with one number, the reproduction number: how many people one typical case goes on to infect. At 1.5, one case grows to about eleven in six generations. At 0.7, the same chain shrinks to almost nothing. And that number is not a property of the virus alone. It depends on how people mix, how fast cases are found, and what is in place to stop them.
Who meets whom. So how do people mix? Not evenly. The same few people at home every day, groups at school and work, strangers now and then. Contact surveys show strong patterns by age. Children mostly meet children, working adults meet each other, and homes mix everyone. That's why closing schools and closing offices are different levers. They cut different parts of the contact network.
Uneven spread. People are uneven in another way, too. Some places, like a crowded indoor party, let one person infect many. We simulated two outbreaks with the same average, two new infections per case. In one, cases are all alike. In the other, very uneven. In the uneven one, three in four cases infect nobody, and just nine percent of cases cause eighty percent of all infections. And a single imported case dies out on its own eighty nine percent of the time, against twenty percent when cases are alike. So uneven spread makes outbreaks rarer, but more explosive when they take off. The average hides that.
Space, and what we see. Epidemics move through space as well. Commuters tie nearby towns together, and long trips seed outbreaks far away. In our two-town run, if two people in a thousand commute, the second town peaks twenty days after the first. At twenty in a thousand, nine days after. Then there's the gap between what happens and what we see. First infection, then symptoms, then a test, then a report. Every step adds delay. In our run, the reported curve peaks eight days after the real one, and shows only the thirty percent of infections that ever get tested. So the data is always a bit late and a bit partial. Remember that whenever someone shows you a case chart.
Kinds of germs. Now, one level deeper: biology. Germs come in several kinds: viruses, bacteria, fungi, single-celled parasites, worms, and misfolded proteins called prions. And being infected is not the same as being sick. Infection means the germ is in you, multiplying. Disease means symptoms. You can have the first without the second, and still pass it on.
Three clocks. Three clocks start at infection. The latent period ends when you become infectious. The incubation period ends when symptoms start. The infectious period is the window for spreading. Each clock varies from person to person, so think of them as distributions, not single numbers. What matters most is their order. In our toy numbers, R₀ is 2.5, and eight in ten sick people isolate. If almost all spread comes after symptoms, R drops to about 0.8. But if forty percent of spread happens before symptoms, the very same isolation only gets R down to about 1.4. Same effort, opposite outcomes. Timing inside the body becomes timing in policy.
Routes and defenses. To spread, a germ has to leave one body, survive the trip, and reach another in a big enough dose. The main routes are the air, touch, shared objects, water and food, blood or sex, and insects like mosquitoes. Each route points to its own defense. Air means ventilation and less crowding. Water means sanitation. Mosquitoes mean bed nets.
Immunity and spillover. Immunity is why epidemics slow down, and why they come back. It is not an on-off switch. It can block infection, cut spread, or soften the illness. And it can fade. In our run, when protection fades after about half a year, a second wave arrives around day two hundred forty. Smaller, but it comes back. And many pandemics begin with spillover, a germ jumping from animals to people. Human activity can lower each barrier along the way.
Recap. So: spread is a tug of war, shaped by who meets whom, where, and how fast we notice. Biology sets the clocks, the routes and the immunity. Next time, the people: fear, trust and money. Because what people do moves an epidemic as much as the virus does.
The difference is us. Same virus, same city, same season. And yet the epidemic can rise, plateau, or come back in waves. The difference is us. Today, the psychology and the economics of pandemics. Fear, trust and money.
The behavior loop. The core idea is a loop. Disease changes behavior, and behavior changes disease. When people see cases rising, many stay home, avoid crowds, wear masks, get tested. Transmission drops. Then cases fall, and people relax.
Perceived risk. But people don't react to the true risk. They react to the risk they perceive, and our minds take shortcuts. Vivid, recent, heavily covered events feel more likely than they are. Slow, quiet risks feel smaller, until they hit close to home. So two towns facing the same epidemic can behave very differently, depending on what they believe is happening.
From belief to action. Belief alone isn't enough, either. A classic model of behavior says intention comes from three things: your attitude, what you think others expect, and whether you feel able to do it. If masks feel useless, or staying home means losing your job, intention never turns into action. And we copy each other. A visible, normal habit spreads through offices and schools. When it becomes rare, or a badge of one side, people drop it.
Trust and misinformation. Trust sits in the middle. When people trust health authorities and local messengers, they follow advice, and accept it when advice changes. Being open about uncertainty is how that trust is built. And misinformation spreads like a pathogen of its own. A large study of Twitter found that false stories spread farther and faster than true ones, mostly because people share what feels new. So in a pandemic two things spread at once: the virus, and beliefs about the virus.
Fatigue: our behavior model. Then there's fatigue. The World Health Organization calls pandemic fatigue an expected response to long restrictions. Motivation wears down. We built a small model of all this. Protection cuts transmission, people react to cases reported a week late, and they remember them for about five weeks. With no reaction at all, thirty percent of the town is infected at once at the peak, and ninety four percent get infected overall. Add fear, and the peak drops below one percent. After a year and a half, only about nine percent have been infected. Now add fatigue, so protection slowly wears off. The first wave falls, then the curve climbs back into a second, bigger wave around month nine. Forty percent infected. Fear flattens the curve. Fatigue brings the wave back. You'll play with this exact model in the lab.
Work, externalities, sick pay. Now, money. Most infections happen during ordinary economic life: working, shopping, commuting, caring for others. Someone who can work from home cuts contacts and keeps their pay. Someone whose job is on site faces a hard choice between health and rent. Economists call the core problem an externality. If I go to work sick, I keep my pay, but my coworkers carry the risk. Sick pay changes the math. In our toy numbers, with R₀ of 2.5, if four in ten sick workers can afford to stay home, R is about two. If eight in ten can, it drops to about 1.4. And a study of the 2020 emergency sick leave law in the United States linked it to slower case growth.
Pulling back, shocks, inequality. People also pull back on their own. Early in COVID-19, visits to shops fell sharply, and studies found that official orders explained only part of the drop. So a pandemic hits supply and demand at once. Workers get sick or stay home with kids. Restaurants and travel collapse, while delivery and video calls boom. And one closed factory can stall many others down the supply chain. The costs aren't shared equally. Jobs that can't be done from home, little savings, crowded housing. Those groups carry more risk, and more loss.
Targeting and what counts. That unevenness can also be a tool. In our toy town, a fifth of people work in busy settings, with four times the contacts. Remove a quarter of all contacts across the board, and R goes from 2.5 to about 1.9. Remove the same quarter only in the busy settings, and R drops to about 1.3. Targeting isn't always easy or fair. But ignoring differences gives policies that cost more and work less. And deaths are only one outcome. Long illness, mental health, lost schooling and delayed care all count.
Recap. So behavior is part of the epidemic. Perception, norms, trust and fatigue move contacts up and down, and money decides who can actually protect themselves. Next time: governments, and the big loop that ties biology, people, money and policy together.
What governments shape. No government can stop a virus by decree. But governments shape almost everything a virus needs: how often we meet, where, and how fast cases are found. Today, the last part of Module two: the role of government, and the loop that ties everything together.
A collective action problem. A pandemic is a collective action problem. Even when everyone knows what helps, it's hard to keep up without coordination, good information and practical support. So governments provide what individuals and markets can't: surveillance, lab networks, emergency logistics, clear rules, and shared resources like hospitals.
Built before the crisis. Much of it has to exist before the crisis. Legal authority to act, trained public health staff, labs that can test and sequence, data systems that share, and agencies that already know each other. Internationally, under the International Health Regulations, countries have agreed to build these capacities and to report unusual outbreaks quickly. And legitimacy matters. When people see the system as competent and fair, the same effect needs much less force. Trust is a variable that changes transmission.
During the crisis. Early in an outbreak, the first job is to reduce uncertainty fast: testing, case definitions, reporting pipelines, and data people can actually read. Once spread is sustained, the job becomes interruption: support for isolation, contact tracing, testing, cleaner indoor air, masks, limits on crowding, and protecting hospitals. And here's the catch. The effect depends on timing and adherence, not on the announcement.
Timing decides. We tested timing in our model. The same measure, halving transmission for sixty days, started on different days. Start on day twenty, and the wave just waits. When the measure lifts, it comes back, with about twenty three percent of the town infected at once. Start on day sixty, and the peak has already passed. Start on day forty, and the same sixty days cut the peak from thirty percent to about eighteen, and total infections from ninety four percent to seventy seven. Same measure, same length. The calendar decided the outcome.
Policies interact. Policies also interact. Testing only helps if people can isolate, and isolation needs support, like paid leave and food delivery. In our toy numbers, R₀ is 2.5. More testing alone brings R to about 2.1. Isolation support alone, about the same. Both together, about 1.5. So good governance is less about one perfect measure, and more about a package that fits together, and can actually be delivered.
Delivery, equity, supplies. Delivery is the hard part. Tests that people can't reach. Isolation advice without pay. Tracers overwhelmed. Beds without staff. The virus finds every gap. Equity is part of this. If the most exposed groups can't protect themselves, transmission stays high for everyone. And strong measures must be justified, proportionate and safeguarded. Then supplies: tests, protective gear, vaccines, cold chains, and fast but careful approvals. When cases double every three and a half days, one week of delay means four times as many cases. And pandemics cross borders, while governments answer first to their own people. That makes global sharing hardest exactly when it's needed most.
The loop, and late data. Now let's tie Module two together. Biology sets the clocks. Contacts turn biology into spread. Psychology changes contacts. Money decides who can change. Government coordinates, and sends signals. And government reacts to data that arrives late, after incubation, testing and reporting. Decisions always look a little into the past. In our model, restrictions switch on when infections pass one percent, and off below 0.3 percent. Acting on true numbers, the peak stays near two percent. Acting on data ten days late, the peak is about three times higher.
What models can honestly do. This coupling makes epidemics sensitive. Early on, exponential growth turns small timing gaps into big differences, and chance, like one superspreading event, can decide what happens next. It also makes modeling hard. Key quantities aren't observed directly, like true infections, or how many people really isolate. And different assumptions can fit the same data. Here are two of our runs, one with R₀ two, one with R₀ three. For the first month they're almost identical. Then one peaks at fifteen percent, the other at thirty. So the honest job of a model is not to predict one future. It's to map plausible futures, say what must be true for a policy to work, and show which unknowns matter.
Recap. That's Module two. The virus is one part of a coupled system of biology, people, money and government. Next, in Module three, we start writing that system in mathematics, with compartmental models. See you there.
5:09Episode 4 · 2.1How infections spread, and the biology behind itR depends on the setting: who meets whom, uneven spread, delays, and the order of the body’s clocks.
5:03Episode 5 · 2.2Fear, trust and moneyBehavior is part of the epidemic: fear flattens the curve, fatigue brings it back, and money decides who can protect.
5:08Episode 6 · 2.3Governments and feedback loopsTiming, packages and late data: governments shape what the virus needs, and models map futures, not one forecast.
Interactive lab
Fear, fatigue and waves
Run the behavior model from Episode 5 and the Module 2 slides: an SIR town where people protect themselves when they see infections, and slowly tire of it.
Change how fast news arrives, how long people remember, and how quickly fatigue builds and fades. Watch the peak, the number of waves and the total. Three challenges check your run as you go.
An SIR town that reacts
A town of S, I and R. Each infected person meets others at rate β₀ = 0.3 per day and recovers after 10 days on average (γ = 0.1), so R₀ = 3. One person in 10,000 is infected on day 0.
P is perceived risk: infections reported d days late, remembered for about m days. When P equals h, half of people protect.
Fatigue F builds while people protect (rate φ) and fades when they stop (rate ρ). It limits how much fear can do.
Running…
Infected right now
Share of the town infected on each day. A wave is a peak above 0.03%, at least 30 days after the previous one.
Protection and fatigue
Protection p (green) and fatigue F (navy, dashed), from 0 to 100%.
Challenges
Each one is checked on your current run.
- With fear on, keep the peak below 1% of the town.
- With fatigue on, get three or more waves.
- With fatigue on, keep total infections under 25%.
Hints: what happens when the news comes later, or people forget faster? Does a quicker recovery from fatigue help or hurt?
