Of course, it makes sense to mandate vaccination for measles; the disease can be deadly and its vaccine is lifesaving. In the 1950s, before vaccination became available, there were at least 319,000 infections and 345 deaths from measles each year. More recently there was a measles outbreak at Disneyland in 2014. The 667 cases of measles in the United States that year occurred largely because of anti-vaxxers. Fortunately, no one died. Indeed, in the past 15 years there has been only one confirmed death from measles in the entire country. The Disneyland episode propelled states to change their laws to make it much harder for parents to refuse vaccinations for their children.

Partly as a result, today the flu is much more dangerous than measles. Indeed, every year since 2004 there have been a minimum of 37, and as many as 171, pediatric deaths from the flu. In fact, the Centers for Disease Control and Prevention lists flu and pneumonia as the eighth leading causes of death in the United States, immediately after diabetes.

So why do we mandate the measles vaccine but not the flu vaccine? Perhaps because the flu vaccine must be given every year and is sometimes, like this year, not that effective. However, this is all the more reason to impose a mandate.

The relationship between the effectiveness of the vaccine, the number of people who need to be treated and herd immunity is complex — and perhaps counterintuitive. The less effective a vaccine is, the more people you need to treat to produce herd immunity. For instance, if the vaccine is 80 percent effective, then vaccinating just 25 percent of the population provides effective herd immunity. But if the vaccine is only 30 percent effective — just short of this year’s level — around 70 percent of the population must be vaccinated.