Understanding flattening the curve

I was talking to a couple of people and it became clear that people don’t completely grok what flattening the curve means. If you like it in the form of an aphorism, it means (to quote some unnamed wit): “Look you idiot, flattening the curve doesn’t mean you won’t get sick, it means there will be room for you in the ICU when you do”.

If you like to think in pictures, imagine a rectangle, the area of the rectangle is the number of cases. Here is the same rectangle shown two ways. Looking at it vertically is when you don’t flatten the curve, lots of cases in a short amount of time. Oriented horizontally, you get fewer cases in any given time, it just takes longer to have the same number of cases. (Thus buying you space in the ICU and hopefully enough time to develop treatments and vaccines):

Added: when people want to refer to shrinking the number of cases they should say “bending the curve” and not “flattening the curve”!

Simple Extrapolations, back of envelope calculation, scary number of deaths,

There are a lot of models of disease transmission out there, I hope to do multiple blog posts on them! But for now I want to point out a simple “back of envelope” calculation may give as good an estimate on the (scary) number of deaths as far more complicated models. All you have to do is do some simple arithmetic combined with the notion of herd immunity . Herd immunity is a fundamental concept in epidemiology, it means that enough people are immune so that the disease will no longer grow exponentially. I promise to do a post on herd immunity and how you can calculate at what percentage of the population herd immunity happens. (Turns out, though it uses only simple arithmetic, you can prove a theorem that lets you calculate at what percentage of the population herd immunity occurs. Because it only uses simple arithmetic plus some insightful thinking, I think that the proof of the “threshold theorem” as it is called, is a triumph of the mathematical way of thinking.)

Hint of things to come-because we use the threshold theorem number here: First off, recall that the fundamental number r0 is how many people an infected person will infect on average. The higher r0, the faster exponential growth (see my Lilly Pond blog entry) occurs. The threshold theorem says herd immunity occurs when the percentage of immune people is > 1-(1/r0). This means that if you assume Covid-19 has an r0 of 3, herd immunity occurs when more than 2/3rds of the population is immune.

As I write this on May 3, 2020, there are 65,735 confirmed deaths. Absent a proven therapy that reduces infection rates or a vaccine, the likeliest scenario is that there will continue to be waves upon waves of infection – well until enough people have had the disease so that we reach herd immunity. I believe with the current level of testing, no truly effective drugs and the lack of effective contact tracing, there is simply no escaping this. And, unfortunately, to be blunt, it’s not something one hears often enough on the news. There are about 330 million people in the United States. Herd immunity, using an r0 of 3 occurs (roughly) when 220 million people are immune.

Now we get to the back of envelope calculation. The CDC reports as of May 3, 2020 there are about 1.12 million cases. Given how bad testing is, this is horribly off. When one does sampling on, for example, pregnant women entering the hospital in a city like NYC or a random sample of a hard hit population, one gets estimates of between 10% and 20% of the population has been infected. But since that percentage is likely true only in hard hit areas, it seems reasonable to me to assume that between 5 and 10% of the population has been infected. Assuming as I mentioned that:

  1. No drug is discovered that lowers the risk of death significantly
  2. That everyone who gets infected is now immune (which hasn’t yet been proven – just to be even scarier)
  3. Herd immunity occurs at 67%
    1. we will have between 6.7x and 13.4x (67/10, 67/5) more deaths. That gives us a back of envelope calculation of between 440,000 and 880,00 deaths. I’m not a religious person, but sometimes the phrase “God help us” slips out.

      Added: someone asked me after reading a first draft whether there is anything that could change my analysis. The answer is yes, as I mentioned above in passing, three things come to mind. The most likely, is that we find a drug that significantly lowers the risk of death. The next most likely is we start doing both quick testing and effective (and quick) contact tracing. That could by itself bring the r0 in the modified population (which is usually called rt) to be < 1! Finally, because each successive wave takes time, if we lengthen the time between wave by social distancing, using masks etc., we gain more time to develop a vaccine. My scenario makes the assumption that no vaccine exists before herd immunity develops and r0 stays at 3, good testing and contact tracing lowers that significantly! But to reiterate, if we end up relying only on the development of herd immunity, absent a drug to lower the risk of death significantly, that means way way too many deaths.)

      Further Added: clarified that testing and contact tracing changes the original notion of r0 in the modified population to what is usually called rt.

What it would take to get me (and I think many other people) on a plane, train or bus

Not a math related post, just common sense this time. (It is inspired by WHO (which has great scientists if lousy leaders no matter what our both scientifically illiterate and innumerate president says), pointing out there is no evidence yet that having the virus means you would have enough antibodies to prevent another infection. Sure, you may have a milder case but they can’t confirm that you can’t become an asymptomatic carrier if you get infected again. That means the whole notion of an “immunity certificate” is not going to happen anytime soon.

So what does this mean for travel for me (and I think many other people in “high risk” groups). Since there won’t be an immunity certificate, I won’t travel on public transportation unless everybody I’m going to encounter is certified virus free. We need to institute a system of travel where not only are masks required for everybody, social distancing maintained, you also need a special travel document that certifies you are virus free.

My first question is how long will a certificate be good for? The problem is the time between when you test negative and when you get to the airport!

Suppose someone tests negative for the virus. For how long are they safe? After all, they could get infected after their negative test but before they get to the airport. So we need to know how long could it take if you get infected before you start shedding virus. Is it 12 hours, 24 hours, 48 hours? Haven’t seen this answered anywhere, we need to know the answer to this! Anyway, once we know a person’s “safe interval”, we would know how long a certificate is good for and so how long before your flight you will have to line up to be tested.

This will no doubt add a couple of hours to the time needed to travel and remember you will probably need a new certificate for the flight back. How can the need for a certificate coming and going not make air and other forms of travel far less pleasant – perhaps to the point where, if you can afford to do so, you would drive more, take a train or bus never and so only get on a plane for special occasions. Airlines (and train and bus – where travel certificates are also going to be necessary) companies aren’t going to get better anytime soon. This certificate requirement is probably hopeless for public transportation, so looks like I’m only using my car for the foreseeable future. And, of course prices will have to go up because fewer people will want to deal with certificates. And, so as usual, poorer people are so screwed.

Percentages – it’s all about the base

You know percentages are funny: it seems to be another one of those things (like exponential growth) where our first instincts are often wrong. The difference is that most people can do the calculations quickly enough so that they won’t persist in believing the wrong thing after you point the mistake out to them. Take what is needed for a stock price going back up to where it was after it went way down: As I recently pointed out to somebody who didn’t do the mental calculations before they spoke, if a stock price drops by 50% (say from $100 to $50), it has to double to get back to $100. Going up by 50% from the depressed price only gets you to $75. But, like I said, unlike exponential growth where it doesn’t seem quick fixes are possible i.e. only learning some more sophisticated math can help, percentage changes are taught early enough and are encountered often enough so a quick mid-course mental correction can happen. My friend immediately more or less said: “Oh that is true, oops”.

So the base (the denominator as it is called in mathematics) you use to take the percentage is all important. It is too easy to mislead people by choosing the wrong number as the base for calculating the percentage or even worse to use “absolute” numbers instead of a percentage. Take testing for Covid 19, I can’t be sure if it is because he doesn’t get percentages or because he realizes how bad they make him look, but only talking about the absolute number of tests done rather than the percentage of people in the United States who have had a test is really really wrong. (Oh, in case you are wondering, on a percentage basis using our population of roughly 330 million people as the base, we are nowhere near the top 10 of countries.)

But what is interesting is that with a little bit of outside the box thinking we can use a different percentage to get a much better picture of where we stand. How? Don’t chose the number of people in the United States as the base (denominator) but use the number of tests done as the base and use the number of positive tests as the top number (the “numerator”). This is sometimes called the test positivity rate. This lets you get a handle on how many asymptotic carriers you have found for example as well as get a better sense of how many non infected people in your country. So one statistic gives you two pieces of information that are both important. Our test positivity rate is nearly 20%. South Korea’s is about 2%. Or in other words, using a test positivity ratio, we are so far behind the curve, we are sitting in the parking lot. (Oh and what’s worse is this ratio hasn’t gotten any better in the last month. Being charitable one might say we are treading water, being realistic we are drowning slowly.)

But in any case when encountering a percentage, remember it’s all about the base.

Multiplication of probabilities – or what to do when you have to go shopping.

My last blog said “you should stay at home damn it.” Problem is, unless you are a millionaire survivalist, we all have to go out occasionally to the supermarket. So the question is, how can you reduce the odds of catching Covid 19? How can you feel reasonably safe psychologically and in reality? The answer is: you need to keep (and apply) a simple, but fundamental principle of probability, in mind.

A fundamental probability principle says that when you want to find out the odds of two independent events happening, you multiply the probabilities of each one happening. Throw 1 die and ask for a 6, well the odds are 1/6. Throw one die after another and ask for sixes on both – well that is (1/6)*(1/6) or 1/36. Three dies it’s 1/(6*6*6) or 1/216 etc etc. When multiple independent events are involved, the probability of all of them happening goes down really fast. (But they can happen: I’m convinced Trump’s election required numerous independent events to have happened.) Anyway why is this relevant to our current horrid situation in general and shopping in particular?

The point is that each action you (and your fellow shoppers) can think of to lower your risk is almost certainly an independent event. Maintain 6 feet of distance from each person, risk of getting the virus goes down to 1/x. Wipe down your cart gets you 1/y. Wipe your hands after you leave the store with a wipe and wash your hands after you unpack (being careful to keep your hands away from your face until you wash them) 1/z. But most importantly: hope other shoppers wear masks themselves, pray your neighbor is “forced” to wear a mask by sane governors. That’s gets you 1/N for a pretty big N it seems. All these three taken together gets you to 1/(x*y*z*N), which is going to be pretty small for any reasonable projected values of x,y and z. (Take each one of them as 1/5 and having your neighbor wear a mask as 1/20, then you are at 1/2500 already.)

The moral: think of multiple actions that you and your fellow citizens can take to lower the risk in the outside world that are independent of each other for when you have to go out. Everyone wearing a mask is clearly #1 on that list…..

The parable of the lily pond-or why you should shelter in place

Behavioral economists have shown our brains are hard wired to certain ways of thinking that are “wrong” – well at least to people who still seem to believe in “homo economicus”. We seem to have have hard wired ways of thinking, like the “prospect theory” that won Kahneman the Nobel Prize in Economics that shows the pain of a loss far outweighs the pleasure of a gain. It’s not symmetric at all.

Anyway, back when I used to teach exponential growth, it quickly became obvious to me that human beings are also not wired to “grok” it. It is yet another hard wired thing: we jump to conclusions about exponential growth that are just wrong. Yea, if you are have enough mathematical training. you can do the calculations and so hold your instinctive jumps to the wrong conclusion in check, but to get it instantly, to “grok it” as the saying go, forget that. I really believe we are just not wired to understand exponential growth – perhaps because nothing that our distant ancestors on the savannas of Africa encountered was likely to involve it.

So that brings me to the parable of the Lily pond which I use to use to try to get my students to understand exponential growth. I told them “Imagine a giant lake, so large it dwarfs any of the  great lakes. Then a child throws a lily seed into the lake. The next day they come back and see a lily plant. The next day they come back and see 2 lily plants. The day after that 4 lily plants. Cool they think.” So the doubling continues every day. On the 30th and last day of the month this enormous lake is absolutely totally filled with lilies and what’s more, all the lilies are dying.

I then ask my students: “When was the lily pond ¼ full, when was it 10% full and so the lilies and so the lake seem to be thriving?

It was always surprising to me that only a few of my students get that the answer was the lily pond was a quarter full two days before. The 10% question is a little trickier though estimating it isn’t that difficult. You need to use logarithms to get the exact answer for when it was 10% full. It turns out it was 10% full about 80 hours before it was full.

Some people think of getting to this answer by asking what power of 2 is the same as multiplying by 10. That turns out to be (by definition) log2(10) which is about 3.322 as your calculator will tell you. So you go from .1 to 1 (10% full to completely full); in 3.32 days or about 80 hours. Other people like to think of it as moving backwards in time, so you are solving log2(.1) , which is -3.32.

In any case things happen fast with exponential growth. You go from ¼ full to all dead in just two more days and from 10% full to all dead takes around 2 days more than going from ¼ full to full.

In epidemiology, the doubling rate of a disease is determined by a number called R0 (pronounced “R nought or R zero”) which is the number of people a single person can infect together with how long it takes for that person to infect that many people – and when R0 is bigger than one you have exponential growth and eventually everybody who is susceptible will get the disease. Oh and pretty damn quickly when you have a doubling every three days – which seems to be how fast COVID 19 grows absent any social distancing into a population where almost everyone is susceptible. (A doubling rate of 3 in our lily pond means it doesn’t double every day, it does every three days. So instead of 30 days, it takes 90 days to death, because 30 doublings takes 30*3=90 days when a single doubling takes 3 days instead of one day…)

But if social distancing brings R0 to <1 , the disease dies out eventually.

So stay at home damn it.

Added: Fixed the mistake of conflating R0 with the doubling rate, it is a bit more complicated then that because R0 has to be combined with the time to infect to get the actual doubling rate. More on that later.

That (ex)Google Engineeer’s screed

The screed by the (now ex) Google software engineer is all over the news. While I might have more to say about it soon, I want to point out that his generalizations about the differences between the abilities of men and women are simply a rehashed, recycled and much dumbed down version of the research of people like Simon Baron-Cohen.

And, even if research1 like that of Baron-Cohen’s on the so-called “Essential Difference” is the whole story (about which I have my doubts), Mr. Damore’s problem, as I put it in an unpublished review of Baron-Cohen’s book, which I will post in a few days, is that even if these statistical statements are true: “I am firmly in the camp that feels that people who confuse statistical truths about groups with thinking that the same statements apply to individuals, should stop using up oxygen needlessly.” And while it is true that Damore’s pays lip service to this in his missive, he certainly doesn’t take it to heart!

Or, in other words, companies like Google can and will pick and choose from the very best and, at that level, individual differences will surely dwarf any hypothetical group differences. So my question to Damore is other than your biases and immaturity, what makes you think the “typical” women or African American software engineer at Google isn’t a whole lot smarter than you?

Anyway, Damore was fired by Google which has it’s plus and minuses. And, of course it will be hashed out in the courts and he may or may not have a case–the stories I have read seem to differ on his chances.

But my opinion? Google should not have fired him, instead they should have sent him for some training where he either would or would not learn to understand the effect his words would have on the unbelievably talented female and minority engineers that work at Google and why his screed was just wrong, wrong wrong in so many ways.