Wednesday, October 29, 2014

Logarithmic Growth 101


 
Riffing off a scenario at WRSA, the concept of logarithmic growth came up.
If you're RainMan with math, go watch Wapner, and skip the following.
If not, let me, as a non-mathematician, take a whack at it, as it relates to Ebola, and why you should know or care.

(And for those who'll bitch at me in Comments with degrees from MIT and CalTech, I feel your pain. After suffering through four, yes four math-incompetent nursing professors trying to teach Medication dosage calculations(!!), I noted aloud that having nurses teach math was like asking garbagemen to teach physics. Especially when the same university had perfectly adequate math professors already on staff. But I digress. Suffice it to say, you're stuck with a nurse teaching math here. If it makes you feel better, I never bounce a check.)

Quick and dirty: the earthquake Richter scale is base-10 logarithmic.
I.e., A 5.0 is 10 times bigger than a 4.0, a 6.0 is 100 times bigger than a 4.0, etc.
If you tried to straight line plot a logarithmic event, either the right side would require a piece of paper 20 feet tall, or the left side increases will be nearly flat unless examined under a microscope.
Like Mercator for maps, it's a good (not perfect) way to make things fit on a flat square/rectangular piece of paper small enough to hold in your hand.

The actual Wikipedia page for this Ebola outbreak has log scales for reference: instead of the rocket launch reverse parabola on the straight-line scales, the trend line seen is almost exactly 45 degrees up and right, indicating an almost perfect logarithmic R-naught of 2.
(Any departures owe more to shoddy math and stat collection than to any flaws in the disease's ability to spread. Nota bene the graph at top is an old one for this very outbreak, as we now have nearly triple that number of cases, and triple that again of likely official ones, i.e. pushing 40,000 cases.
To see a more current graph, with projections to the bitter end, Frozen Patriot has done one here:
 http://bit.ly/1wdMzgG
I'd post it pictorially , but Blogger won't read the image. Go look for yourself.
h/t to Frozen Patriot for the work!)

100 new cases a week of something isn't that big a deal; we have 100 homicides in this country every few days, with no danger of running out of people. But if the homicide rate went logarithmic every month, in a year's time we'd be looking at 400,000 homicides a month. By mid-October of Year Two the homicide rate is larger than the population of the US, i.e. everyone's dead.

Ebola, playing with the entire planet, gets 33 doublings to get from 1 case to the 7.7B people on earth, less 10-25% or so survivors. Which would take the world's population back to where it was around 1700, more or less. It would take US population back to the 31M we had in 1860, except now those 31M would be distributed  thinly in all 50 states. Move your state's population decimal one place to the left, and that's where it'll be if Ebola keeps on marching at logarithmic growth worldwide. If we keep it out, we stop that from ever getting a toehold to start. That's why travel bans and quarantines matter!

People wonder why they should believe the graph. Fair enough. As far as suspicion, the graphists above has done the same thing the editors at Wikipedia did: plotted the numbers, and literally connected the dots. The graph is only as good as the data.

If the doublings speed up, the line goes farther to the right, faster. If we slow the speed of spread, it doesn't. Currently, Ebola is doubling every 2-4 weeks, depending on the country we're talking about. The average overall is every three weeks. If we even slowed that rate down to every four weeks, we'd add a year to the planetary "Game Over" date. It was at every four weeks in July/August, for reference.

It doesn't flatten until we get the R-naught to less than 2.
It doesn't turn downward at all until we have a treatment(s) or vaccine that starts cutting the R-number to less than 1.
For smallpox and polio, that took 5900 years or so of human history.
We don't have to replicate that, but it gives you an idea of what has to be accomplished.
We've been trying to do it with HIV/AIDS for decades, with zero success, because it mutates rapidly and becomes resistant to our efforts.
Hopefully Ebola doesn't mutate as fast as we come up with something to kill it, and a vaccine will work on it for more than five minutes. If not, we're boned.

What that means for our chances at getting ahead of this disease:
If aggressive fluid therapy in the initial day or two pulls the fangs out this disease, that would be HUGE. We're still learning. In the US, we only have an insignificant number of cases, with a lot of other variables in play, so we still don't know.
And we wouldn't know that before now, because they've never done that in Africa (no capabilities or resources) and still don't, and most people died before anyone could do much of anything, including the medical staffs.

Math teachers may leave red pencil marks in Comments now.

28 comments:

Anonymous said...

True enough, Aesop, about log growth with doubling. But extrapolation is always dangerous. If Mikey can eat 1 hamburger in 1 minute and 2 hamburgers in 2 minutes, can he eat 10 hamburgers in 10 minutes?

It seems the best analogy to me for Ebola growth without effective treatment / quarantine is more likely to be that of bacterial growth in nutrient media. First there's a lag phase while the initial organisms get fed and gear up (we're past that with Ebola), then the log growth phase (as your current graph shows), but then the stationary phase followed by the log decline phase as nutrients are harder to come by.

I would predict that log growth depends upon the world's supply of useful idiots, and as soon as that starts to dry up, it's game over for Ebola. So whatever % of the world population are not clueless, you really should subtract that percentage also from total losses. Sure, some not-idiots will get tagged, but on the other hand, some idiots will escape transmission despite their cluelessness.

And I'd like to think that the world's % of idiots is <10%. Once we remove the 'elites' from the Venn diagram, there aren't a whole lot of others left.
Just my glass-half-full 2c,
Bill K.

Aesop said...


In ten minutes, logarithmically, Mikey would be eating 128 hamburgers.
Not 10.

That's why grasping logarithms for most people kicks their ass, because they never need to know it to balance their checkbook or make their house payment (unless they got their loan from a loan shark). You had to actually play with it to pass an MCAT.

As for the supply of useful idiots, remember what I've said:
In any crisis, you're at the mercy of the stupidest person in the group, i.e. Gilligan.

One 70 IQ lunkhead pressure-washes the vomit, and aerosolizes the Ebola into your kids' play yard.

So if there are only 700M useful idots, and they each drive a busload of ten people off the cliff, what difference does it make to the PhDs sitting in the passenger seats?

Welcome to the CDC. NASA. The OMB. Congress. Your city council. Your state legislature. Lather, rinse, repeat.

Jim said...

As I said on another forum, the math is right. Exponential growth has to be plotted just as you've described for it to not to take really tall paper really fast. Cases = 2^(d)/21) where d is the number of days since patient zero. Stick the equation in over at Wolfram Alpha and you get that 'to the moon' shot. I can see where case increase slows down as it burns through the population in an area, but the really scary thing is that it hasn't hit the high density SE Asian population centers (Mumbai, Bombay, etc) yet, so the growth rate may still have room to go up from here.

Anonymous said...

Aesop, with the hamburger analogy, I wasn't referring to logarithmic growth but a linear growth which is even more elementary. I use it while teaching to illustrate the dangers of extrapolation. Because even the median college student understands that Mikey's hamburger eating is an easy to plot line up to his gastric capacity.

For a real-life example, take the fact that the moon is receding from the earth a couple centimeters a year. Even by linear standards, if one extrapolates backwards, as the joke goes, the dinosaurs several million years ago would have had to duck their heads. Extrapolation is ALWAYS dangerous. Interpolation is what sound engineers do. Extrapolation is for hypotheses to be held as pure conjecture, and for fools.

No personal insult taken. As my comment on your "Thought for the Day" post should reveal, exponential growth is not so difficult as to be beyond the ken of virtually all medical students.

But I beg to differ - you're only at the mercy of the stupidest person in the group if you throw your lot in WITH him. That is not a given.
Bill K.

gamegetter II said...

When the morons in charge-worldwide,not just the U.S. start reporting that the number of new cases is declining-the morons in the population are going to stop taking any kind of extra precautions.
Once that occurs,then the number of new cases is going to spike sharply.

I just don't see the reverse of the perfect 45 degree angle trajectory taking place-too many not so bright citizens in W. Africa,the USA, and any other unlucky country-or country with morons in charge...
As you said-it only takes one 70 IQ idiot to pressure wash the puke-and it's off to the races all over again.
Stoopidity will cause any outbreak outside of W. Africa to last a long,long time.
That-and the level of medical care will be about the same as in Sierra Leone because there are smart nurses and docs who will know when it's time to hang it up,pack their shit and go far away.

Aesop said...

@Bill K.
That's true at an individual level, but once you start talking about the town, county, state. etc., you're right back on Gilligan's Island.

As any visit to the regular meetings, or five minutes in front of any network newscast will confirm.

As for pure extrapolation, there are other variables. If, against all rational expectation, firebreaks, travel bans, and quarantines slow this thing down, we stretch out the timeline.

But the salient fact at this point to me is that the sum total of everything, done by everybody combined in W. Africa, hasn't affected the growth of this disease any more than waving a magic wand at it would have done.

We could have hired a witch doctor for fifty bucks, and saved billions.

And unlike Mikey, Ebola's gastronomic capacity is unlimited.

Anonymous said...

One of the things I would do if I were heading the CDC would be to call folks like Kent Brantley, MD and Amber Vinson, RN who survived the infection to head up my traveling Ebola care teams. And then as the inevitable surviving 20% or whatever of docs & nurses multiply, ask them to "Please, pretty please, consider your good fortune and your oath and set your ordinary duties aside to care for the infected." A lot of folks like Brantley have the motivation and maturity to do so.
We are not so helpless as to stand by and do nothing, wring our hands and say, "Woe is me."
Surviving an Ebola infection, so far as the evidence from other viral infections points, gives one super-powers in the form of memory-B and memory-T lymphocytes.
Bring on the superheroes!
Bill K.

FrozenPatriot said...

Aesop,
I appreciate the post and the link.
I was talking to folks (fellow engineers, no less!) around the water cooler today about logarithmic growth (which they fully understand) and showed them its perfect trend so far with Ebola. The normalcy bias was incredible... They say all the normal stuff about Ebola not having a big impact here, but I just don't see it. I also can't see westerners acting much differently, especially if this screws with things like just-in-time grocery deliveries, electricity, water, natural gas, garbage, restaurants, carry-out/delivery for the even less capable of feeding themselves, and even school -- which it will. We live in such a delicate symbiosis of abundant and cheap food, energy, convenience, travel, and leisure -- most of it completely unknown to most of us -- that I can hardly imagine the reaction of present-day masses if/when faced with meaningful hardship. Heaven help us all...

Aesop said...

Thanks for the graph, F.P. Sorry I couldn't post the pic capture of it, but I understand if it would kill your bandwidth or something.

@Anon 8:56
Trouble is, those folks will be debilitated for months according to recent survivor memoirs.
We never had enough survivors to hear much about that before, but with 13,000 cases, even 10% adds up.

Anonymous said...

@Aesop, I agree that nothing appears to have slowed the spread in W. Africa.

But does that speak harshly of any chances of control in the US, or rather, does it speak harshly of a combination of unusually low regional IQ and unusually superstitious cultural practices?

Like the saying goes, "Don't try to teach pigs to fly - it wastes your time and annoys the pigs."

Do you believe that Americans are so hopeless that the same horrid results would play out in the US without end until there is no one left but I am Legend?

If so, I take my hat off to you - I've finally found a greater cynic than myself.
Bill K.

FrozenPatriot said...

@Bill K,

I fully understand that extrapolation is a form of crystal-ball conjecture and is by no means a perfect method of prediction. It is, however, interesting to view today's historical data in such a format so as to present it's almost perfect exponential growth over the past few months. Extending the curve out to 7 billion was purely an exercise in curiosity, and should carry no significance when planning 2016 Independence Day parties.

That goes for all of you...

Doubting Thomas said...

If doublings speed up, the line goes to the left, I believe, not to the the right (as stated in the paragraph).

Aesop said...

Doubting Thomas,

That was the way I originally wrote it, but on a true logarithmic graph, the X- and Y- axis scales are also logarithmic, thus the line is always a pure 45 degrees, and speed - like on a railroad - merely changes the arrival time at a given destination.

Bill K
"Do you believe that Americans are so hopeless that the same horrid results would play out "?

Nurse Vinson flew cross-country twice, with symptoms and elevated temperatures (just not to the point of the arbitrary fever criteria).
Dr. Spencer was symptomatic, rode the subways, went out to dinner, went bowling, and lied to the police about it afterwards.
Unknown Lab Tech took a trip to Cancun.
Dr. Snyderman & Co. went out for drive-thru food.
Dr. Frieden - pretty much anything, said, done, thought.
Dr. Fauci - pretty much anything too.
The White House: period, inclusive.
At least half of Congress.
Any number of clueless governors.

These are supposedly the professionals, the leaders, the bright lights among us.

And you know as well as I do, 10 Ebola cases in any one city anywhere, and medical care there is at Monrovia standards in about five minutes, and staffing levels are dictated by how long it'll take most employees at that hospital to get to their cars.

THP-Dallas was the norm, not the exception.

This thing gets ahold here, anywhere, even once, and it'll rip that town a new asshole, like Godzilla on crack and breakdancing.

Somebody with 40 acres in the sticks has a shot.

But absent a shoot-on-sight quarantine of an entire state, any larger entity will look like Liberia, and probably in not much more time than it took there.

And all that's before one guy named Achmed decides to spread it around on purpose and lie about it afterwards. Then just for fun, let's make him the hot dog vendor at an NFL stadium, the popcorn guy at a movie theatre, or the checker at a supermarket or high-volume retail store like Wal-Mart or Costco.

Anonymous said...


Mar, 2014 - Infected: 104 Dead: 62
Apr, 2014 - Infected: 194 Dead: 116
May, 2014 - Infected: 360 Dead: 216
Jun, 2014 - Infected: 670 Dead: 402
Jul, 2014 - Infected: 1,247 Dead: 748
Aug, 2014 - Infected: 2,319 Dead: 1,391
Sep, 2014 - Infected: 4,313 Dead: 2,588
Oct, 2014 - Infected: 8,022 Dead: 4,813
Nov, 2014 - Infected: 14,921 Dead: 8,953
Dec, 2014 - Infected: 27,753 Dead: 16,652
Jan, 2015 - Infected: 51,621 Dead: 30,973
Feb, 2015 - Infected: 96,016 Dead: 57,610
Mar, 2015 - Infected: 178,590 Dead: 107,154
Apr, 2015 - Infected: 332,177 Dead: 199,306
May, 2015 - Infected: 617,849 Dead: 370,709
Jun, 2015 - Infected: 1,149,199 Dead: 689,519
Jul, 2015 - Infected: 2,137,510 Dead: 1,282,506
Aug, 2015 - Infected: 3,975,768 Dead: 2,385,461
Sep, 2015 - Infected: 7,394,928 Dead: 4,436,957
Oct, 2015 - Infected: 13,754,567 Dead: 8,252,740
Nov, 2015 - Infected: 25,583,494 Dead: 15,350,096
Dec, 2015 - Infected: 47,585,299 Dead: 28,551,179
Jan, 2016 - Infected: 88,508,656 Dead: 53,105,193
Feb, 2016 - Infected: 164,626,099 Dead: 98,775,660
Mar, 2016 - Infected: 306,204,545 Dead: 183,722,727
Apr, 2016 - Infected: 569,540,453 Dead: 341,724,272
May, 2016 - Infected: 1,059,345,243 Dead: 635,607,146
Jun, 2016 - Infected: 1,970,382,153 Dead: 1,182,229,292
Jul, 2016 - Infected: 3,664,910,804 Dead: 2,198,946,482
Aug, 2016 - Infected: 6,816,734,096 Dead: 4,090,040,457

Anonymous said...

Aesop,
Your math skills might not be the best, but they are fine for the subject matter. And even if some of your descriptions are humorous, I think everyone gets the point. That's what counts. You don't need partial differential equations or linear algebra for this stuff.

However, just so you know, on a log-log graph, plotting people vs. time, the curve would go to infinity very quickly. The semilog graph is the one that increases at a 45* slope, with people being on the logarithmic Y axis. You simply have to adjust the scale of the X axis to get that result.

Anyway, carry on, sir. I don't think "we" have anyone on this full-time, but with the growing handful of people adding their research and expertise to yours, it's going to increase the knowledge base, which is what we need. Thanks.

Anonymous said...

You can add me to the "hopeless cynic" queue.

Not just stupidity, but denial plays a large part in human behavior. That why people like Dr. Liar exist, that's why the contact tracing in Mali is not going well (http://www.voanews.com/content/mali-scrambles-to-trace-contacts-of-ebola-stricken-baby-girl/2500379.html - "The girl was born and was being raised in Kayes, he was told. Not until later did he learn she had recently come from Guinea, where she lived with her father before he died. Nor was he told that the baby and her grandmother had made the long journey from Guinea to Kayes, via the Malian capital, Bamako, on public buses.").

Then you have the people here with beans rattling around their heads denying that Ebola even exists because people aren't taking selfies in Western Africa as they croak. Seriously. So between stupidity, denial, and plain out crackpottery, there's a good reason to be a little wary of people.

Meanwhile, in more reading about Tyvek instead of Tychem, I wouldn't trust a Tyvek suit too much when dealing with a BSL-4 pathgen.

http://www.fastcodesign.com/3037465/why-protective-gear-isnt-stopping-ebola

That may be why some HCWs who believe they're fully protected aren't in fact actually being fully protected if they've in Tyvek instead of Tychem. So you also have to count in possibilities of equipment failure, lack of equipment (see earlier AP article), and everything else that can and will go wrong, on top of humanity being humanity, and you can see where this whole thing might go, as Aesop so beautifully put it,"Godzilla on crack".

Iaato said...

It's that last doubling time that's the real tragedy. People don't understand the exponential function and don't react until late stages when it is too late.

http://www.joiningdots.net/library/Research/Created/growth.html

Treatments and cures impact survival rates, but don't impact the trajectory of exponential growth. Vaccine is the significant factor mitigating the rate of growth. And the further we progress, the less effective infection control and contact tracing become, as the system is overwhelmed. See the model description below.

http://www.reddit.com/tb/2jhr75

Aesop said...

Or simply watch Liberia from May until now.



----

Housekeeping note:
Anonymous posting is fine.
Anonymous posters who beg for their post's removal, or who allege that it's going on, are being dishonest, but I will happily delete their smartassery without any hesitation.

If you have something to contribute to the topic, even anonymously, even openly disagreeing with me or anyone else, and you've got something to put on the scale besides spam or whackjobbery, carry on.

If you simply came to pick a fight, or demonstrate what a rude jackass you can be, your post will disappear without a trace or any shred of remorse. Get back under your bridge.

Weeds will be pulled.

Andrew said...

Logarithms.

Like Decibels, though as I recall its 3 of them which doubles the sound, not one.

Math...it sucks, because it usually doesn't lie.

Karl said...

Anon: Looks like things are going to smell pretty ripe in the warm months of 2016.

Swanie said...

I have a question. Although the charts showing logarithmic growth are frightening and worth taking note of, how is it that Nigeria is not being overrun by this? Surely if they can put a lid on it, others can.

Tucanae Services said...

Aesop,

The numbers don't take into account the loss rate. One has to take into account the deaths, they are neither carriers to continue the trend or part of the base count any longer. In the early going the spread of disease is logarithmic because the population is a target rich environment. but as the death rate climbs the pool of new infectees diminishes as a % of the population. Point is over the life of a pandemic, the new cases graph takes on the shape of an 'S' curve.

If that was not the case, no pandemic in history would have burnt itself out, and we would not be here since the outbreak of the Black Death in Europe. That is not to diminish the severity of Ebola, its bad news. But growth rates of diseases don't stay on the log curve forever.

Aesop said...

I don't expect it to stay on that log line forever. But long before it runs out of victims in the current locale, those governments collapse, people flee, and the virus gets to more fertile and populous grounds. And on and on. that it won't be logarithmic right to the end will be cold comfort when it's virulent and widespread on every continent.
The official plan for what to do at that point is "Pretend that's not going to happen, and whistle a happy tune."

By the time that the population are sufficiently ravaged to slow the expansion, the number of unburied corpses is biblical, 27 other plagues kick in - cholera, typhoid, dysentery, etc. - and the Ebola virus will have likely found mammalian hosts in every corner of the globe, so repeated outbreaks afterwards will be like Grandma's leftovers: "they just keep coming back."

The reality is, as it has always been, that "First World" countries and populations are an aberration, whereas West African squalor, ignorance, and superstition are the norm, around the world.

And by the time TPTB figure that out, it will already be ravaging their population too.

@Swanie:
Because their outbreak is geographically confined to some utter backwater craphole, and they enforce draconian quarantine without a second thought or moment's hesitation. They also didn't neglect things and deny the problem for five months.

Percy said...

Aesop, this is why I have felt for a while that it is just about hopeless to try to stem this thing in West Africa. Not at all sure Ebola in America is on the same track or ever will be, though.

Without regard to development of a cure (and it doesn't look like one is on its way at all or in any event in time to stop this here or there), there may be variables that matter and are changing behavior in connection with Ebola in favorable ways. Fear and general increased awareness of how not to get Ebola from others is gradually getting across the message that, if you don't want to get it, stay away, reasonably far away, from Ebola victims and heir stuff. Even in West Africa, these factors are leading to greater care in Ebola victim body handling, burials, avoiding touching stuff that Ebola victims have touched (like their clothes and bedding), cleanup procedures, and even simple hugging and handshaking practices of people generally. That could quickly turn into staying clear of anyone who has been near an Ebola victim, too, if the numbers keep going up.

Here, of course, we're aided by a less huggy society in the first place, lots of scary Ebola news, spotty but actual beginning quarantine efforts, better and improving hospital practices, and elevated overall alertness to signs and symptoms of the disease.

Seems to me that all this (unless this thing goes truly airborne) can't help but put a stick in the seemingly inexorable wheel of a logarithmic progression of Ebola cases and deaths.

No?

Anonymous said...

My nephew and his wife are working at an orphanage in one of the W. African countries NOT yet on the bad list. They come home Nov 19. I won't be going to my brothers house for Thanksgiving dinner.

theeemissary said...

They threw everything they had at these U.S cases and only had one death out of... say, 5. One patient per hospital.

Now let's say 10 per hospital, 20 per hospital, 100 per hospital... are there enough level 4 bio suits to go around? Duck tape and Saran Wrap?

What happens when a quarter of the deaths are medical personnel, transportation (emts etc.)... The part we are in right now has no one panicking except those who can count and extrapolate.

The moment we are overwhelmed it's over. It will run through the population like water through sand.

Tucanae Services said...

theeemissary,

Aesop was onto this in a previous post. The staff:patient ratio becomes a limiting factor very quickly. If its 4:1 and a hospital has just 50 patients it consumes the pool of staff quickly. That pool tires quickly or does not show up. The system collapses pretty fast.

One of the saving graces about ER trauma is that most immediate care is not long lived. By the graces of the doctors acumen you either survive in short order or you don't. Most of a trauma patients stay in a hospital is supervised recovery. An Ebola case is trauma with a very long support trail with specific containment requirements on top of it all. That is a situation that most hospitals are not geared for on multiple levels.

Aesop said...

@theemissary

Try this post:
http://raconteurreport.blogspot.com/2014/10/ap-welcome-to-reality-heads.html

The avg. hospital has only 10 suits. (That means about half have less than that.)
And they may not necessarily be reusable.
So after 1 shift, you're done caring for anyone else, until they get more suits.
Days or weeks later.