{"id":3694,"date":"2019-02-12T10:37:36","date_gmt":"2019-02-12T15:37:36","guid":{"rendered":"http:\/\/www.goodmath.org\/blog\/?p=3694"},"modified":"2019-02-12T17:37:13","modified_gmt":"2019-02-12T22:37:13","slug":"the-math-of-vaccinations-infection-rates-and-herd-immunity","status":"publish","type":"post","link":"http:\/\/www.goodmath.org\/blog\/2019\/02\/12\/the-math-of-vaccinations-infection-rates-and-herd-immunity\/","title":{"rendered":"The Math of Vaccinations, Infection Rates, and Herd Immunity"},"content":{"rendered":"\n<p>Here in the US, we are, horribly, in the middle of a measles outbreak. And, as usual,  anti-vaccine people are arguing that:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Measles isn&#8217;t really that serious;<\/li><li>Unvaccinated children have nothing to do with the outbreak; and<\/li><li>More vaccinated people are being infected than unvaccinated, which shows that vaccines don&#8217;t help.<\/li><\/ul>\n\n\n\n<p>A few years back, I wrote a post about the math of vaccines; it seems like this is a good time to update it.<\/p>\n\n\n\n<p>When it comes to vaccines, there\u2019s two things that a lot of people don\u2019t understand. One is herd immunity; the other is probability of infection.<\/p>\n\n\n\n<p>Herd immunity is the fundamental concept behind vaccines.<\/p>\n\n\n\n<p>In an ideal world, a person who&#8217;s been vaccinated against a disease would have no chance of catching it. But the real world isn&#8217;t ideal, and vaccines aren&#8217;t perfect.  What a vaccine does is prime the recipient&#8217;s immune system in a way that reduces the <em>probability<\/em> that they&#8217;ll be infected.<\/p>\n\n\n\n<p>But even if a vaccine for an illness were perfect, and everyone was vaccinated, that wouldn&#8217;t mean that it was impossible for anyone to catch the illness. There are many people who&#8217;s immune systems are compromised &#8211; people with diseases like AIDS, or people with cancer receiving chemotherapy. (Or people who&#8217;ve had the measles within the previous two years!) And that&#8217;s not considering the fact that there are people who, for legitimate medical reasons, cannot be vaccinated!<\/p>\n\n\n\n<p>So individual immunity, provided by vaccines, isn&#8217;t enough to completely eliminate the spread of a contagious illness. To prevent outbreaks, we rely on an emergent property of a vaccinated population. If enough people are immune to the disease, then even if one person gets infected with it, the disease won&#8217;t be able to spread enough to produce a significant outbreak.<\/p>\n\n\n\n<p>We can demonstrate this with some relatively simple math.<\/p>\n\n\n\n<p>Let&#8217;s imagine a case of an infection disease. For illustration purposes, we&#8217;ll simplify things in way that makes the outbreak <em>more<\/em> likely to spread than reality. (So this makes herd immunity harder to attain than reality.)<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>There&#8217;s a vaccine that&#8217;s 95% effective: out of every 100 people vaccinated against the disease,  95% are perfectly immune; the remaining 5% have <em>no<\/em> immunity at all.<\/li><li>The disease is highly contagious: out of every 100 people who are exposed to the disease, 95% will be infected.<\/li><\/ul>\n\n\n\n<p>If everyone is immunized, but one person becomes ill with the disease, how many people do they need to expose to the disease for the disease to spread?<\/p>\n\n\n\n<p>Keeping things simple: an outbreak, by definition, is a situation where the number of exposed people is steadily increasing. That can only happen if every sick person, on average, infects more than 1 other person with the illness. If that happens, then the rate of infection can grow exponentially, turning into an outbreak.<\/p>\n\n\n\n<p>In our scheme here, only one out of 20 people is infectable &#8211; so, on average, if our infected  person has enough contact with 20 people to pass an infection, then there&#8217;s a 95% chance that they&#8217;d pass the infection on to one other person.  (19 of 20 are immune; the one remaining person has a 95% chance of getting infected). To get to an outbreak level &#8211; that is, a level where they&#8217;re probably going to infect more than one other person, they&#8217;d need expose something around 25 people (which would mean that each infected person, on average, could infect roughly 1.2 people). If they&#8217;re exposed to 20 other people on average, then on average, each infected person will infect roughly 0.9 other people &#8211; so the number of infected will decrease without turning into a significant outbreak.<\/p>\n\n\n\n<p>But what will happen if just 5% of the population doesn\u2019t get vaccinated? Then we&#8217;ve got 95% of the population getting vaccinated, with a 95% immunity rate &#8211; so roughly 90% of the population has vaccine immunity. Our pool of non-immune people has doubled. In our example scenario, if each person is exposed to 20 other people during their illness, then they will, on average, cause 1.8 people to get sick. And so we have a major outbreak on our hands!<\/p>\n\n\n\n<p>This illustrates the basic idea behind herd immunity. If you can successfully make a large enough portion of the population non-infectable by a disease, then the disease can&#8217;t spread through  the population, even though the population contains a large number of infectable people. When the population\u2019s immunity rate (either through vaccine, or through prior infection) gets to be high enough that an infection can no longer spread, the population is said to have herd immunity: even individuals who can\u2019t be immunized no longer need to worry about catching it, because the population doesn\u2019t have the capacity to spread it around in a major outbreak.<\/p>\n\n\n\n<p>(In reality, the effectiveness of the measles vaccine really is in the 95 percent range \u2013 actually slightly higher than that; various sources estimate it somewhere between 95 and 97 percent effective! And the success rate of the vaccine isn&#8217;t binary: 95% of people will be fully immune; the remaining 5% will have a varying degree of immunity And the infectivity of most diseases is lower than the example above. Measles (which is a highly, highly contagious disease, far more contagious than most!) is estimated to infect between 80 and 90 percent of exposed non-immune people. So if enough people are immunized, herd immunity will take hold even if more than 20 people are exposed by every sick person.)<\/p>\n\n\n\n<p>Moving past herd immunity to my second point: there\u2019s a paradox that some antivaccine people (including, recently, Sheryl Atkinson)  use in their arguments. If you look at an outbreak of an illness that we vaccinate for, you\u2019ll frequently find that more vaccinated people become ill than unvaccinated. And that, the antivaccine people say, shows that the vaccines don&#8217;t work, and the outbreak can&#8217;t be the fault of the unvaccinated folks.<\/p>\n\n\n\n<p>Let&#8217;s look at the math to see the problem with that.<\/p>\n\n\n\n<p>Let\u2019s use the same numbers as above: 95% vaccine effectiveness, 95% contagion. In addition, let\u2019s say that 2% of people choose to go unvaccinated.<\/p>\n\n\n\n<p>That means thats that 98% of the population has been immunized, and 95% of them are immune. So now 92% of the population has immunity.<\/p>\n\n\n\n<p>If each infected person has contact with 20 other people, then we can expect expect 8% of those 20 to be infectable \u2013 or 1.6; and of those, 95% will become ill \u2013 or 1.52. So on average, each sick person will infect 1 1\/2 other people. That\u2019s enough to cause a significant outbreak. Without the non-immunized people, the infection rate is less than 1 \u2013 not enough to cause an outbreak.<\/p>\n\n\n\n<p>The non-immunized population reduced the herd immunity enough to cause an outbreak.<\/p>\n\n\n\n<p>Within the population, how many immunized versus non-immunized people will get sick?<\/p>\n\n\n\n<p>Out of every 100 people, there are 5 who got vaccinated, but aren\u2019t immune. Out of that same 100 people, there are 2 (2% of 100) that didn\u2019t get vaccinated. If every non-immune person is equally likely to become ill, then we\u2019d expect that in 100 cases of the disease, about 70 of them to be vaccinated, and 30 unvaccinated.<\/p>\n\n\n\n<p>The vaccinated population is much, much larger \u2013 50 times larger! \u2013 than the unvaccinated.<br>\nSince that population is so much larger, we\u2019d expect more vaccinated people to become ill, even though it\u2019s the smaller unvaccinated group that broke the herd immunity!<\/p>\n\n\n\n<p>The easiest way to see that is to take those numbers, and normalize them into probabilities &#8211; that is, figure out, within the pool of all vaccinated people, what their likelihood of getting ill after exposure is, and compare that to the likelihood of a non-vaccinated person becoming ill after exposure.<\/p>\n\n\n\n<p>So, let&#8217;s start with the vaccinated people. Let&#8217;s say that we&#8217;re looking at a population of 10,000 people total. 98% were vaccinated; 2% were not.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The total pool of vaccinated people is 9800, and the total pool of unvaccinated is 200.<\/li><li>Of the 9800 who were vaccinated, 95% of them are immune, leaving 5% who are not &#8211; so<br>\n490 infectable people.<\/li><li>Of the 200 people who weren&#8217;t vaccinated, all of them are infectable.<\/li><li>If everyone is exposed to the illness, then we would expect about 466 of the vaccinated, and 190 of the unvaccinated to become ill.<\/li><\/ul>\n\n\n\n<p>So more than twice the number of vaccinated people became ill. <em>But<\/em>:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The odds of a vaccinated person becoming ill are 466\/9800, or about 1 out of every 21<br> people.<\/li><li>The odds of an unvaccinated person becoming ill are 190\/200 or 19 out of every 20 people! <em>(Note:\u00a0there\u00a0was\u00a0originally\u00a0a\u00a0typo\u00a0in\u00a0this\u00a0line,\u00a0which\u00a0was\u00a0corrected\u00a0after\u00a0it\u00a0was\u00a0pointed\u00a0out\u00a0in\u00a0the\u00a0comments.)<\/em><\/li><\/ul>\n\n\n\n<p>The numbers can, if you look at them without considering the context, appear to be deceiving.  The population of vaccinated people is so much larger than the population of unvaccinated that  the total number of infected can give the wrong impression. But the facts are very clear:  vaccination drastically reduces an individuals chance of getting ill; and vaccinating the  entire population dramatically reduces the chances of an outbreak.<\/p>\n\n\n\n<p>The reality of vaccines is pretty simple.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Vaccines are highly effective.<\/li><li>The diseases that vaccines prevent are not benign.<\/li><li>Vaccines are really, really safe. None of the horror stories told by anti-vaccine people have any basis in fact. Vaccines don\u2019t damage your immune system, they don\u2019t cause autism, and they don\u2019t cause cancer.<\/li><li>Not vaccinating your children (or yourself!) doesn\u2019t just put you at risk for illness; it dramatically increases the chances of other people becoming ill. Even when more vaccinated people than unvaccinated become ill, that\u2019s largely caused by the unvaccinated population.<\/li><\/ul>\n\n\n\n<p>In short: everyone who is healthy enough to be vaccinated should get vaccinated. If you don\u2019t, you\u2019re a despicable free-riding asshole who\u2019s deliberately choosing to put not just yourself but other people at risk.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here in the US, we are, horribly, in the middle of a measles outbreak. And, as usual, anti-vaccine people are arguing that: Measles isn&#8217;t really that serious; Unvaccinated children have nothing to do with the outbreak; and More vaccinated people are being infected than unvaccinated, which shows that vaccines don&#8217;t help. A few years back, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[2,6,8],"tags":[253,297],"class_list":["post-3694","post","type-post","status-publish","format-standard","hentry","category-bad-math","category-bad-probability","category-bad-statistics","tag-vaccination","tag-vaccines"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4lzZS-XA","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/3694","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/comments?post=3694"}],"version-history":[{"count":2,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/3694\/revisions"}],"predecessor-version":[{"id":3699,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/3694\/revisions\/3699"}],"wp:attachment":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/media?parent=3694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/categories?post=3694"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/tags?post=3694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}