Contagion
A virus does not spread through a crowd; it spreads through a network of contacts. One number tells you whether an outbreak grows or fizzles, but the shape of the network bends that number, and protecting the hubs can stop an epidemic that protecting the same number of random people barely slows.
A new infection arrives in town with one traveller. The traveller meets people; some of them catch it; they meet people; some of them catch it. Whether this chain fizzles after a few links or sweeps through the whole town is one of the most consequential questions in science, and by now you have almost every tool needed to answer it.
Susceptible, infected, recovered
The classic way to think about an epidemic sorts people into three boxes, an idea introduced in 1927 by William Kermack and Anderson McKendrick:
- Susceptible (S): has not had it and can catch it.
- Infected (I): has it and can pass it on.
- Recovered (R): has had it and can no longer catch it or pass it on (in the simplest version of the model, recovery gives lasting immunity).
People only ever move one way: S to I to R. And the single most important number is the basic reproduction number, R0 (“R-nought”): the average number of new infections caused by one infected person in a population where everybody is still susceptible.
If that sounds familiar, it should. It is the branching argument from Chapter 5. If each case causes fewer than one new case on average, the chain of infection dwindles and dies. If each causes more than one, it can snowball. Watch the family tree of an outbreak:
Outbreak family tree
Set R0 and grow one outbreak generation by generation, then run hundreds at once to see how often they die out.
R0 is the average number of new infections caused by one case in a fully susceptible population; above 1 an outbreak can grow, below 1 it must eventually die out.
Herd immunity
Now suppose some share of the population is immune, through vaccination or past infection. Each case still meets as many people, but only the susceptible ones can catch it. If a share v is immune, a case causes on average R0 × (1 − v) new cases. As soon as that drops below 1, outbreaks cannot take off, even though not everyone is protected. This is herd immunity.
The herd immunity line
Set R0, then move the vaccinated share. Dots are averages of simulated outbreaks in a well-mixed town of 1,000.
The tidy 1 − 1/R0 rule assumes a well-mixed population and immunity handed out at random. Change either assumption and the threshold moves. Real contact patterns are networks, with clusters, bridges and hubs; and, as the next figure shows, who is immune can matter as much as how many.
Contagion on a network
On a network, an infected person can only infect the people they are linked to. Each step, every infected person gets a chance to pass it along each of their links to a susceptible neighbour, and a chance to recover. The shape of the network then decides almost everything. Here is the full laboratory: you can rebuild the network, cut links, choose who is immune, and seed the outbreak yourself.
The contagion lab
Choose a network and a tool, then Play. With “Link / cut” you can click two nodes to link them and click a line to cut it. Run silent trials to compare strategies fairly.
Why the hubs matter so much
Remember the friendship paradox from Chapter 2: following a link lands you on well-connected nodes far more often than picking a node at random. An infection travels by following links, so it reaches hubs early, and every hub it reaches has many more links to pass it along. That is why, for a network that is not too loopy, the effective reproduction number depends not just on the average degree but on how spread out the degrees are:
For networks with extremely heavy-tailed degrees, theory (Romualdo Pastor-Satorras and Alessandro Vespignani, 2001) even suggests the epidemic threshold can become very low, because every hub the infection reaches passes it to so many others. The same fact cuts the other way: remove the hubs from the chain and the network falls below threshold. That is the robust-yet-fragile story of Chapter 7, turned into a public-health strategy. Since in real life nobody has the full contact map, in 2003 Reuven Cohen, Shlomo Havlin and Daniel ben-Avraham proposed a clever workaround: pick random people and immunise a random friend of each. By the friendship paradox, the friends are disproportionately hubs.
On a network, infection follows links and so reaches hubs early; heavy-tailed networks spread disease more easily, and immunising hubs (or random friends, who are often hubs) is far more effective than immunising the same number of people at random.
The lab is a deliberately simple SIR model on a fixed network. Real diseases have incubation periods, people who never show symptoms, immunity that can fade, and contact networks that change daily as people change their behaviour. Models like this one are for building intuition about mechanisms, such as why hubs and thresholds matter, not for predicting any real outbreak.
Intuition check
In a well-mixed population, a disease has R0 = 4 and immunity is handed out at random. Roughly what share must be immune to stop outbreaks from taking off?
Intuition check
On a hub-heavy contact network you have vaccine for 10% of people, and no map of the network. Which plan is likely to protect the population best?
What you now see
- The SIR model moves people from susceptible to infected to recovered; R0 decides whether an outbreak can grow.
- Even above 1, many single introductions die out by chance; the survivors grow explosively.
- Herd immunity needs a share 1 − 1/R0 immune in a well-mixed population, not everyone.
- On networks, infection follows links and reaches hubs early, so immunising hubs (or random friends) beats immunising at random.