Skip to content
Tutorials Center
My learning

Topics

Lesson 30 of 46 ยท Infectious Disease Epidemiology

Vaccines and Herd Immunity

How vaccines work at population level: efficacy versus effectiveness, coverage needed for herd immunity, smallpox eradication, safety monitoring and the Wakefield retraction.

Vaccination is one of the most effective public health interventions ever developed. It prevents an estimated several million deaths every year according to WHO estimates, and it has eradicated one human disease (smallpox) and brought another (polio) close to eradication. It is also an excellent illustration of why epidemiology matters: the benefit of a vaccine depends not just on how well it works in one person, but on how many people receive it and how infection spreads among those who do not.

This lesson explains how vaccine protection is measured, how to calculate the coverage a population needs, what the smallpox campaign teaches, and how vaccine safety is monitored.

A grid of 100 people showing vaccinated people in green, unvaccinated in purple and an infection stopped at the edge of the immune group
Herd immunity: when enough neighbors are immune, an introduced infection runs out of susceptible people to reach.

What you will learn

  • Distinguish vaccine efficacy from vaccine effectiveness and compute each from a table.
  • Calculate the coverage needed for herd immunity when the vaccine is imperfect.
  • Explain direct, indirect and total effects of vaccination.
  • Describe how safety is monitored and why the Wakefield claim was rejected.
  • Summarize why smallpox could be eradicated.

Key terms

Vaccine efficacy (VE): the percentage reduction in disease among vaccinated people compared with unvaccinated people, measured in a randomized trial.

Vaccine effectiveness: the same quantity measured in routine use, in observational studies.

Herd (community) immunity: indirect protection of unvaccinated people when enough of the population is immune.

Coverage: the proportion of the target group that has been vaccinated.

Ring vaccination: vaccinating the contacts of a case, and their contacts.

Measuring protection

Vaccine efficacy is calculated from the attack rates in a trial:

Text
VE = (ARU - ARV) / ARU = 1 - RR

where ARU is the attack rate in the unvaccinated (placebo) group, ARV the rate in the vaccinated group and RR = ARV / ARU is their relative risk. If 100 of 10,000 placebo recipients become ill but only 10 of 10,000 vaccinated people, then ARU = 1%, ARV = 0.1%, RR = 0.1 and VE = 90%.

A VE of 90% does not mean "90% of vaccinated people are protected" in the sense that 10% are totally unprotected. It means the vaccinated group's risk is 90% lower than the unvaccinated group's. Real protection varies between people, and there are two common models: "all-or-nothing" (some are fully protected, others not at all) and "leaky" (everyone has partly reduced risk per exposure). The two give similar results in trials but different results over time in populations with repeated exposure.

Effectiveness is measured in routine use: older people, people with illness, different strains and imperfect storage all lower it compared with the idealized setting of a trial. Observational methods include cohort studies, case-control studies and the test-negative design, which compares vaccination status among people who sought care and tested positive with those who tested negative for the same disease. The latter design is widely used for influenza and COVID-19 vaccines and has its own bias risks (for example, health-care-seeking behavior).

Herd immunity with imperfect vaccines

From the SIR lesson, a disease with basic reproduction number R0 is stopped from spreading when the immune fraction exceeds 1 - 1/R0. If the vaccine has efficacy E (taken here as the fraction of recipients who become immune), the required coverage is

Text
Vc = (1 - 1/R0) / E

For measles with R0 = 15 and a vaccine that is 97% effective after two doses, Vc = (1 - 0.0667) / 0.97 = 0.962, about 96%. That is why public health targets for measles are typically 95% or more with two doses. For a pathogen with R0 = 2.5 and vaccine efficacy of 80%, Vc = 0.6 / 0.8 = 0.75. If the vaccine does not prevent transmission, only disease, herd immunity in this sense does not apply and the benefit is mainly individual. This is an important point: whether a vaccine reduces transmission is a separate question from whether it reduces disease.

Two more complications:

  • Clustering. Unvaccinated people tend to live near each other (in some communities, schools or regions). Average coverage can be high while local coverage in a pocket is too low, and outbreaks occur in those pockets.
  • Heterogeneous mixing and waning immunity. Real thresholds depend on who mixes with whom and on how long protection lasts.

Direct, indirect and total effects

  • Direct effect: protection of the vaccinated person.
  • Indirect effect: protection of others because there are fewer infectious people around.
  • Total effect: the combined effect on a vaccinated person in a vaccinated population.

Newborns, people with weakened immune systems and those who cannot be vaccinated rely on the indirect effect.

Smallpox: the eradication model

Edward Jenner published his work on cowpox as a protection against smallpox in 1798 (he began experimenting in 1796). In 1967 the World Health Organization began an intensified global eradication program, and the last natural case occurred in Somalia in 1977. WHO certified eradication in 1980. Why was smallpox such a good candidate?

  • Humans were the only reservoir, with no animal or environmental source.
  • No long-term carriers and no silent chains of transmission: infection was visible.
  • An effective, stable vaccine that gave long immunity (a single dose with a bifurcated needle).
  • Clear signs: the rash made cases easy to recognize.
  • The strategy of surveillance and containment (ring vaccination) concentrated on finding cases, vaccinating their contacts and isolating them, so universal coverage was not needed.

Polio and measles are harder because of asymptomatic infection (polio), very high R0 and other issues. This explains why eradication of other diseases has been far slower. Rinderpest, a cattle disease, was declared eradicated in 2011 using related methods.

Safety monitoring

Vaccines are given to healthy people, so the safety bar is high. Systems work in layers:

  • Pre-licensing trials detect common adverse events.
  • Passive reporting systems (for example VAERS in the United States, the Yellow Card scheme in the United Kingdom) collect reports of events after vaccination. These can raise signals, but a report does not prove cause, since many events would happen by coincidence.
  • Active surveillance and linked databases (such as the Vaccine Safety Datalink in the United States) compare event rates in vaccinated and unvaccinated people. Methods like the self-controlled case series compare a person's own risk in the weeks after vaccination with other times.

A well-known example: after the first rotavirus vaccine was introduced in the United States in 1998, surveillance detected a small increased risk of intussusception (a bowel obstruction in infants). The vaccine was withdrawn in 1999. Later vaccines were studied more carefully for this risk. The case shows the system working, and illustrates that "no safety signal" requires large and well-designed studies.

In 1998 Andrew Wakefield and colleagues published a small case series in The Lancet suggesting a link between the MMR vaccine and autism and bowel disease. The paper was later retracted (fully in 2010). An investigation by journalist Brian Deer and the UK General Medical Council found ethical violations and undisclosed financial conflicts, and Wakefield was struck off the medical register. Numerous large studies in several countries, involving millions of children, have since found no link between MMR and autism. The episode caused measurable harm: vaccine confidence fell, and measles outbreaks followed in several countries.

Common misconceptions

"A 95% effective vaccine means 5% of vaccinated people get the disease." It means the vaccinated group's risk is 95% lower than the unvaccinated group's, a statement about relative risk. The absolute risk depends on how common the disease is.

"If most cases occur in vaccinated people, the vaccine does not work." When coverage is very high, even a very effective vaccine can leave most remaining cases among the vaccinated, simply because almost everyone is vaccinated. Compare rates, not counts.

"Natural infection is always better than vaccination." Natural infection can carry serious complications (for example measles encephalitis or congenital rubella). Vaccines give protection without most of this risk.

"Herd immunity means everyone must be vaccinated." The threshold is below 100%, and the figure depends on R0 and on vaccine efficacy.

Try it

First, compute the coverage required for several diseases. The R0 values are rounded ranges for illustration, and the vaccine efficacy figures are assumptions for the demonstration.

Python Coverage needed for herd immunity

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Second, an interactive population of 100 people. Choose a coverage and watch a single introduced infection spread through a random mixing network. It is a toy model with random contacts and certain infection, so it only illustrates the idea of indirect protection.

One infection, different coverage (toy model)

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. In a trial, 100 of 10,000 placebo recipients and 20 of 10,000 vaccine recipients get the disease. What is the vaccine efficacy?

    RR = 0.2%/1% = 0.2, so VE = 1 - 0.2 = 0.8 or 80%.
  2. 2. Coverage needed for herd immunity is (1 - 1/R0) / E. What is it for R0 = 5 and E = 0.8?

    (1 - 0.2) / 0.8 = 1.0, so even universal coverage would just reach the threshold.
  3. 3. Which feature helped make smallpox eradicable?

    Easily recognized cases and no non-human reservoir allowed surveillance and containment.
  4. 4. What is the difference between vaccine efficacy and effectiveness?

    Trials measure protection under ideal conditions; real-world studies measure effectiveness.
  5. 5. Which statement about the 1998 MMR and autism paper is correct?

    The paper was retracted and many large studies found no association.

Summary

  • Vaccine efficacy is 1 minus the relative risk in a trial; effectiveness is the same measure in routine use.
  • Herd immunity needs coverage of (1 - 1/R0) divided by the vaccine's efficacy at preventing infection and transmission.
  • Smallpox was eradicated because of human-only reservoir, visible cases, a good vaccine and containment strategy.
  • Vaccine safety is monitored in layers; signals need careful testing, and the Wakefield claim was retracted and not supported by evidence.

Next: Chapter review: infectious disease epidemiology