Sunday, March 22, 2020


I must die, and must I die groaning too?–Be fettered. Must I be lamenting too?–Exiled. And what hinders me, then, but that I may go smiling, and cheerful, and serene?
—Epictetus, Discourses.
Some pandemics are mild. But some are fierce. If the virus replicates much faster than the immune system learns to defend against it, it will cause severe and sometimes fatal illness, resulting in a pestilence that could easily claim more lives in a single year than AIDS did in 25 [years]. Epidemiologists have warned that the next pandemic could sicken one in every three people on the planet, hospitalize many of those and kill tens to hundreds of millions. The disease would spare no nation, race or income group. There would be no certain way to avoid infection.
—“Preparing for a Pandemic,” W. Wayt Gibbs and Christine Soares, Scientific American 293(5), 44-54 (Nov. 2005).
TL;DR: A very good fit between data obtained on March 19 from Johns Hopkins University and a logistic+linear growth model indicates there there will nearly 60,000 reported cases of Covid-19 in the United States on March 24, around 300,000 cases eight days after that (4/3), and several million cases around mid April, with the numbers doubling every 5-6 days or so for at least another couple weeks. See the Nightmare Plot and the Disclaimer below.
Update, 3/22, 6:25 PM PDT: With the latest data from Johns Hopkins this evening, the latest NightMare Plot is not different enough from the one originally included with the post to warrant editing the post text. It’s been a long day spent with Covid-19. Today’s reported cases came in at 33,272, not significantly off from what the model had projected with yesterday’s data. The refined model parameters have caused a slight reduction in projected numbers more than a few days out, not by much. If anything, it continues to be very disturbing to see one’s modeling borne out by the relentless upward march of reported cases. Time for a break from this now.

I worked much of yesterday and this morning on a more sophisticated modeling approach than in my previous post, integrating a differential equation f(t,x) for the number of new cases per day, on each day, rather than the total number of reported cases each day.

Running the updated code with Johns Hopkins University data published yesterday (3/21) resulted in an updated Nightmare Plot.

Reported U.S. Covid-19 cases vs days since Jan. 22, 2020

Now, this is one really important plot. It shows up way too small in this blog post for you to be able to see its important details. So please click or tap on it to open it as an image by itself.

Please bear with me as I largely repeat a few paragraphs from the previous post. The upper subplot shows the best-fit logistic growth model in red, with the actual number of cumulative reported cases of Covid-19 in blue. The error between the model and the data is shown with each annotation. Look how small the residuals are compared to the exponentially rising numbers of cases. It’s a scarily impressive fit.

The lower subplot shows the number of cases expected to be reported over time, slightly in the past and then extrapolating to the future. Two hundred and fifty generations of running a differential evolution algorithm1 resulted in a 120-member population of combinations of parameters for the model.

I could have terminated the algorithm sooner, and then there would be some visible variation in the extrapolations. But I decided to just plow onwards for five times as many generations to be more certain of finding something really close to optimal. The black dots show expected reported-case values with each separate parameter combination represented by the 120-member population, plotted in bunches around each day from tomorrow out to mid-May.

Significantly, the subplots both have a logarithmic y-axis. Exponential growth is linear when viewed through a logarithmic lens. When you see that straight line marching steadily upward toward those massive numbers, you really want all your modeling to wind up an embarrassing public failure.

More Power to You

Now, the model includes:

  1. a logistic growth component, as before,

  2. a power-law with exponential decay component, as suggested by Anna L. Ziff and Robert M. Ziff (“Fractal kinetics of COVID-19 pandemic (with update 3/1/20)”),

  3. and a linear component with a small constant number of new cases being reported per day, which only helps improve the closeness of fit early on.2

I tried Ziff and Ziff’s approach by itself but was not impressed with the closeness of fit to the data thus far. This thing is still very much exponential.

With exponential growth, the power-law behavior is not some more-than-squared increase with time but with itself. When the number of cases grows exponentially, as it has been in the U.S. for about two weeks now, the rapidly increasing number of reported cases feeds on itself. Infected people result in infected people, who then result in still more infected (and infectious!) people.

A power-law approach is only nonlinear in time, not in itself. Sure, the number of new cases will increase dramatically as the days go on, this model says. But it won’t be feeding on itself. The increase is just a function of time passing, like the days suddenly getting longer in Spring. It’s not like an exponential forest fire where what is being consumed also takes its turns consuming.

I made a good-faith attempt to switch to the Vazquez (2006) “power-law with an exponential cutoff.” Any petty pride as a data modeler to have one’s first instincts bettered is pushed aside in the hope that it would prove more accurate and perhaps less scary than the logistic growth model I’d been using. Unfortunately, it didn’t seem to fit the data as well as the logistic growth model does. What I did find to be an improvement, however, was a blended model that included both.

So perhaps Ziff and Ziff are correct when they “tend to predict an S-shaped curve with a tapering off in the near future as is being seen.” Perhaps there are “fractal kinestics” at play that contribute some significant power-law behavior to the data we have now. It doesn’t have to mean that is the only biological or epidemiological factor at play.

The Pretty New Model

To repeat myself, I don’t have any expertise in the relevant areas. But I naively assume that a pandemic can have more than one driving factor. And so I now propose to simply add the power-law modeling as one of two components (plus a perhaps gratuitous constant) of a differential equation model for the number of new cases per day, each day. The other component is, of course the logistic growth model.

This results in a model with seven parameters. It’s a first-order differential equation:

xd(t, x) = curve_powerlaw(t) + curve_logistic(t, x) + b
curve_logistic(t, x) = x*r*(1 - x/L)
curve_powerlaw(t) = a * (t-ts)^n * exp(-(t-ts)/t0)

With any sort of modeling, one must guard against the temptation to overfit the data with ever more sophisticated models. But I believe these 7 parameters all earn their keep with the current behavior of COVID-19. More parameters are not necessarily bad; my MOSFET models have 40+ parameters, all necessary to simulate the behavior of a semiconductor device with very complex underlying physics.

Great (Actually, Shitty) Expectations

So, here’s what I personally expect, if the number of reported cases continues to match the model as well as it has in the past week or so. We will remain in full-on exponential growth for a few more days. Then, around the end of the month, we will see things starting to slowing down just a little. But the slowdown will only be in exponential terms, unfortunately, not in the linear way we usually think about things. There will still be more new cases every day then there were the previous day, for weeks to come. It’s just that the daily increases in the number of new cases will themselves stop increasing quite so fast.

I’m expecting a hundred thousand reported U.S. cases by 3/26. That’s up from the 60,000 that I was expecting–when I last updated my predictions two days ago–we would be seeing by then. My projection for 4/2 is essentially unchanged at around 400,000 cases, and I’m thinking the million-case mark will likely be reached by 4/7 instead of between 4/4 and 4/6. Again, this is still just modeling reported cases, not all of them.

There still does not seem to be any convincing upper limit before the population of the U.S. is approached, sometime in May. To put it in a purely technical way, that is really fucking scary.


Thanks again to my new Facebook friend Ng Yi Kai Aaron, an applied statistician in Singapore, for suggesting I look into the power-law modeling approach. Again, I’ve partially incorporated that into the model, but not entirely because it doesn’t seem to fit the data on its own, not for U.S. cases at least.

At the end of my last blog post, I got a little philosophical. I suggested that a front-row seat watching history get made in one of the shittiest ways imaginable is definitely something not to be passed up. Did you ever wonder what it would be like to watch (or feel socially compelled to watch) half-naked desperate men flail away at each other with weird instruments of death, until one of them was indeed dead? How about hearing the swoosh of the guillotine outside your Paris apartment, followed each time by the roar of an angry mob? Bracing stuff. Sucked to be there, actually, a detail which the history books tend to omit.

So here we are. The pandemic of 2020 is just getting underway. I hope you stocked up on popcorn. I also hope you carefully read my Disclaimer in the previous blog post, because it applies to everything I say here, too. And remember:

The model simply predicts what will happen if the data continues as it has for a little over a week now.

That’s it. The interpretation and explanation is up to you.

I want to add a couple of words about your behavior and the possibility of you having a response something like this: “Well, then I’ll get it anyhow so why bother being careful.”

First, you absolutely do not have to get it. I still believe that the model will have to be adjust in the future to reflect the then-apparent new reality that people finally got freaked out enough to take this seriously, deciding to risk boredom, a shortage of twinkies, or even getting minir health conditions addressed because it’s become apparent how much getting Covid-19 sucks, even for a younger person.

Or maybe we will have enforced lockdowns as this administration finally wakes up (but then see my history of blog and Facebook posts on Trump’s authoritarianism). It’s already starting to happen in the state level, not the shitty wannabe dictatorship I fear from the deranged narcissist but reasonable if drastic measures by grown adults who take their office seriously. Including, perhaps surprisingly, not a few Republicans.

If you can possibly wait this out for a while (of course you’ll need to get some things, see below for what I do), your statistics will start to look better as the number of new cases finally starts to drop each day. It will be a bit like getting to roll two dice instead of just one. Each passing week out of your self-imposed stay-healthy near-quarantine will get a little less nerve-wracking if things continue to go your way. As the saying went in Hunger Games, may the odds be ever in your favor.

And as for “Why bother if you get it anyway?”, I personally would rather have my hospital stay sometime in, say, June when the number of new cases is finally dropping. When doctors have gotten experienced with treating this thing and are recovered (the ones who make it) and immune. I want the people saving my life not to be fearing for their own. And if you are really into the hermit life, you could wait for that vaccine in about a year.

So, what is a reasonable action to take? Of course, we need to get stuff from time to time. There are very few true hermits anymore, and even preppers are going to find themselves wondering why they didn’t buy more Peanut M&Ms or tampons. I can just tell you what I do and you can laugh at me if you want, or perhaps there is something sensible. And remember the disclaimer, goddammit, and that I’m not a doctor or anything like that.

Before it became obvious even to me what a monster this pandemic was going to be, I was fortunate enough to have my wife buy a box of latex gloves. One hundred gloves equals fifty trips outside my van. That will be more than enough, because I’m not going out very often.

When I get to my destination, I park the van, give my nose a good itching, and put on a pair of the gloves. An open paper garbage bag sits in front of the center console, ready to receive the gloves when I’m done. I open the van door, step outside, and shut the door. I go into my pharmacy or grocery store (there’s really no other place I’d bother with at this point) taking advantage of automatic doors wherever possible. Or, failing that, I’ll be honest and say that I try to sort of just be behind somebody whose already opening the door themselves. Why thank you!

I go get what I need, touching as little as possible, staying the fuck away from everyone else. Don’t even look at me like you’re gonna cough. Maybe for this reason alone, of those N95 masks I bought months ago for slash burning would be useful. When it’s needed, I pull my credit card out of a Ziplock bag and put it back in while trying not to have it touch the bag.

I do not care what people think about my wearing gloves. At this point, they’re actually probably jealous, or maybe thinking I’ve got a big stash of them that I hoarded from everybody else. Well, I wasn’t even planning on buying the one box.

Now, if you don’t have them, pretend you do, but these gloves have some weird invisible stuff on them that burns your skin on contact.

These imaginary gloves are 100% effective but you just don’t want to touch them except on the inside. You will touch everything you need to, including your credit card, through these imaginary gloves. You don’t want to touch things that you will be touching without the gloves on, because that will leave the invisible stinging stuff on your steering wheel and then your hands will still hurt in a few minutes. So, only stuff you’ll never have to touch again, like that door handle or Harvey Weinstein.

Except there is one solution to the problem of having to touch some things with and without the imaginary gloves on. The stinging stuff washes off with those really strong sanitizing wipes. You just have to wash off any of the stuff you get on your hands, before it starts to hurt. And then your door handle will be clean and so will your hands, ready for you to touch without the gloves on.

The time you take off the imaginary gloves is of course the time when you put a little glob of hand sanitizer into your palms and then rub the stuff around everywhere. Honestly, at this point, I’d probably be doing it twice, and then wiping down the exterior of the hand sanitizer bottle with some leftover sanitizer. Only after all this can you consider your hands ready to touch something without the imaginary gloves, including that terrible itch you’ve had just above your left nostril.

When you get home, put your clothes and shoes in a bag, get a handful of those nasty wipes, look both ways to make sure the neighbors can’t see you in your underwear, and wipe down the door handles. Then go take a shower, and you can really scratch that nose itch.

I’m going to try to step away from the data now, because I’ve said my piece. The only reason I would see to update this post is if something happens dramatically different from what I now expect.

Have a nice Spring.


  1. Using my free, open-source Python package ade, Asynchronous Differential Evolution. 

  2. Many thanks to Ng Yi Kai Aaron, an applied statistician in Singapore, for introducing me to the Ziff and Ziff approach.