Of Exponents and Viruses

As I’ve been reading many of the comments here regarding the Wuhan Coronavirus, it has become obvious that many do not understand exponential growth, or, perhaps, haven’t really realized its implications.

I hope to rectify that.

This is a bit of a ramble. I hope it’s understandable.

Exponential Growth, Introduced.

I’m going to start by going over some mathematics. (Some of you will already know this stuff; I beg your indulgence if it seems condescending, for it’s not aimed at you.)

Perhaps the best place to start is to consider compound interest. Say you deposit a hundred dollars at 5% (OK, in today’s world that’s sheer fantasy, but bear with me).

After a year, you have $105. That’s $100 x 1.05.

After two years, you have $110, right? Wrong!. It’s compounded interest, the interest is paid on the whole starting amount, even the part that was originally an interest payment to you. So, in that second year you’ve made 5 percent off of 105, not 100, dollars, and that’s $105 x 1.05, which is to say $110.25.

So now, $110.25 is your new baseline, going into the third year. And you will make 0.05 x $110.25 or $5.5125, and your bank will probably round it down and hand you $5.51, and your balance will now be $115.76.

If you naively thought that after three years, you’d only have $115, well, instead you have almost $116, and you’ve underestimated your return by 5 percent.

How long will it take to double your money? Not twenty years, but a bit over fourteen years! The rule of thumb is to divide your interest rate into 72. 72/5 gives you a bit over 14.

(It’s a little more complicated if your interest is compounded quarterly, instead of yearly, which is common, or even daily, which is also common, but the principle remains the same.)

To calculate what you’ll have after n years, you can basically do the following. Take your starting amount, $100, and multiply it by 1.05 n times, like this:

$100 x 1.05 x 1.05 x 1.05 x 1.05 x 1.05
(to give you the answer for five years).

But you don’t want to write all that out for all possible cases, so mathematicians have created a shorthand for this. They will write:

$100 x 1.05n.

The n superscript means multiply whatever it’s superscripted on by itself that many times. It’s called an exponent. And, as another way of talking about the same thing, you can say you’re “raising 1.05 to the nth power.”

And a function where the variable is in the exponent is called an exponential function. So you could write something like:

b = $100 x 1.05n

and you’ve expressed your bank balance, b, as a function of the number of (whole) years your starting money has been in that account. And of course you could replace the $100 with another variable, p, for principal, and get a more general function, still:

b = p x 1.05n.

Finally, you can even replace the 1.05 with something like “1 plus the interest rate” and get:

b = p x (1+i)n.

It’s very important to put those parentheses in; they tell you you’re raising (one plus the interest rate), not just the interest rate, to the nth power.

If you step away from interest rates, per se, and re-label things, the general form of an exponential function becomes:

y = bx

Now things are really general. n, usually an integer, is replaced by x, which need not be an integer! x could be 2.4, for instance.

Now how the heck do you multiply a number by itself 2.4 times? Well, to make a long story short, you can multiply it by itself twenty four times (raise it to the 24th power) then take the tenth root of that, and 24/10 = 2.4. To make the long story even shorter, well…you just can, and your calculator knows how to do it.

The 1+i is replaced by b for “base,” which is the appropriate name for the number that you’re “raising to a power” or “exponentiating.”

And y, of course is the traditional label for the result of the equation, the dependent variable because its value depends on x, the independent variable, in the manner that’s specified by the the function.

How about setting b equal to 2. Now we have:

y = 2x

So if:

x is 1, y is 2.

x is 2, y is 2×2 = 4.

x is 3, y is 2x2x2 = 8.

x is 4, y is 2x2x2x2 = 16.

And so on. Each increase in x by one doubles the resulting y. It’s as if you had 100% interest, compounded!

By the way, what if x is zero? How do you multiply a number by itself zero times? Well for consistency any number multiplied by itself zero times is 1. So 20 = 1. And this makes sense. If every step is twice as much as the one before it, it’s half as much as the one after it. Since x = 1 gives y = 2, it stands to reason that x = 0 should give half as much, or…1. You can even carry this into negative numbers. If x is -1, then y should be one half what it is at 0, so y = 1/2. So 2-1 = 1/2.

[As an aside: Mathematicians love to use 2.718281828… as the base, and they’ve even defined that number to be e. It’s as important in mathematics as pi (π) is. This number is known as the “base of the natural logarithms.” I won’t torture you with it beyond this; we’re sticking to 2 from here on out, we’re going to be talking about doubling and halving.]

So let’s say you have a microbe in a petri dish.

After a day, the microbe splits in half, and you now have two microbes.

Each of those microbes splits again, after another day (two days total) and you now have four microbes.

But that’s just our new friend,

y = 2x

…all over again, right? Plug the number of days into x and you get the number of microbes. It even works right at the first moment, with zero days elapsed, because, remember, 20 = 1.

So it turns out that exponential functions can describe population growth, too.

But what if the microbe takes a half a day to divide, instead of just one? After 12 hours, there are two of them, after a full day there are four of them, after a day and a half, there are eight of them, after only two days (not four) there are sixteen of them.

There are two ways to adjust the function to describe this accurately.

The obvious one is to gimmick it so that you’re raising 2 to the 1st power after half a day instead of one, and you can do that by multiplying x by 2 (written as 2x), up in the exponent, like this:

y = 22x

And this works out, see:

x is 1, y is 2×2 = 4.

x is 2, y is 2x2x2x2 = 16.

You can even put in 1/2 or 1 1/2 for x and it works! This is because you double those numbers and get 1 and 3.

x is 1/2, y is 2.

x is 1 1/2, y is 2x2x2= 8.

Four generations, which produces 16 microbes, now takes 2 days, instead of 4, but still produces 16 microbes.

I said there were two ways to gimmick the equation, and I showed you one. The other thing you can do is change the base. In this case, if you replace 2 with 4, like this:

y = 4x

…it works properly.

x is 1 day, y is 4 = 4.

x is 2 days, y is 4×4 = 16.

But note, we just tripped over something new.

We know that at half a day, you have two microbes. If you plug 1/2 into the equation, therefore, it should mean:

y = 41/2 = 2.

And if you plug one and a half, or 3/2s in, you should get:

y = 43/2 = 8.

We’ve just learned what happens when you put a fraction in. The 1/2 gives you 2, which is the square root of four. Raising a number to the 1/2th power is the same as taking its square root!

And we can see something else, too. Let’s look at the second one again, but let’s rewrite 3/2 as 1 + 1/2.

y = 41+1/2 = 8.

But don’t we know that 4 raised to the fourth first power is 1 4 [edited at about 11 pm same day], and the square root of four is 2, and that 4 x 2 is 8? It’s as if adding numbers in the exponent results in multiplying!

y = 41+1/2 = 41 x 41/2 = 8.

And indeed, that’s so. And this will be a key thing to remember.

Implications of Exponential Growth

OK, so with that bit of background, let’s take…hmm…1024 microbes in a petri dish. And let’s go back to the case where the microbes split once a day. (And, note this works better if they don’t all split at the same time!)

After the first day, we have 2048 microbes. After the second day, we have 4096 microbes. After the third day, we have 8192 microbes. And after the 4th day, we have 16,384 microbes. We’re doubling every day, but we’re not starting with 1. How do we write this?

We can start with our old friend:

y = 2x

…to express the fact that we’re doubling every day, but we need to multiply by 1024 to start with.

y = 1024 x 2x

Work this through and you’ll see it’s correct.

You can even use this to figure out how many microbes you had the day before you started, by setting x to -1, then you have 1024 x 1/2 = 512.

And you can even figure out where you’ll be half a day in. It’ll be 1024 x 21/2, and we know 21/2 is the square root of 2, which is about 1.414…, so you should have about 1448 microbes.

But wait just a minute! Remember that adding in the exponent is the same as multiplying outside the exponent?

We’re multiplying outside the exponent. Can we express 1024 as 2-to-the-something power, and add it?

Well, yes you can. As it happens, 1024 is 210. (And you thought I’d pulled that number out of my rectal database!)

So you could write your equation for starting out with 1024 microbes like this:

y = 2x+10

You have your “two to the x” and your “2 to the tenth power” put together in the exponent.

Let’s say your petri dish is full at 1,048,576 microbes. This is 220. So it will happen when x is ten, in other words after only ten days.

If, on the other hand, you start with only one microbe, your petri dish is full after twenty days.

If you go to a jumbo petri dish, twice the size of the ordinary petri dish, then it takes eleven days to fill (if you start with a thousand microbes), or twenty one days (starting with one microbe).

Doubling capacity does not double the number of days you can run your experiment. It adds ONE day. And in general, any realistic increase in capacity adds very little time to how long you can let the exponential function run.

I’m going to say that again, in a slightly different way:

When dealing with exponential growth, increasing capacity doesn’t buy you much time.

And I will say it again because it’s important.

When dealing with exponential growth, increasing capacity doesn’t buy you much time.

It’s also true that reducing the size of the population by, say, half, doesn’t buy you much time either. If you were to kill half the microbes in the petri dish at any time in the process…you’ve bought yourself one day. It doesn’t matter whether you kill half of them after day 1 (going from 2 to 1) or on day 19 (going from about half a million to a quarter of a million). You still hit a million one day late, on the 21st day.

But there IS one hope. You can slow things down, greatly, by changing the base to something smaller or by being able to divide the exponent (which as we saw above, are equivalent). Either one of these has the effect of increasing the doubling time, which works proportionately.

If you double the amount of time it takes for your microbes to double, you have twice as much time before they fill the petri dish. Here’s the formula:

y = 2x/2

The exponent is x/2 instead of x.

And it works, it now takes 40 days to go from one microbe, to a full petri dish, instead of 20 days.

If you’re dealing with exponential growth, increasing the doubling time by X percent buys you X percent more time before you’re overwhelmed. Decreasing the doubling time, on the other hand, is a really, really good way to fuck yourself over.

More generally, you can write the equation like this:

y = 2x/d

…where d is the amount of time it takes to double. If d is two days, then it takes two days for x/d to equal 1, and thus it takes two days to double. Make d 3 or 4 or 27, it works the same way.

Applying This To Epidemics

Epidemics start out as exponential growth. They start out that way, but eventually, the curve bends over, and then there is a decline. But for just a moment, let’s look at the “growth” part of things.

The number of people who have the disease grows exponentially.

The number of people who have the disease bad enough to need the hospital, is smaller, but still grows exponentially.

The number of people who die from the disease, is smaller yet, but also grows exponentially.

In fact, if 12.5 percent of the people who catch the disease need to be hospitalized, all you’ve done is take the exponential growth function for the number of people who have the disease, and stuck a 0.125 in front of it, like this:

y = 0.125 x 2x/d

…but that 0.125 is basically -3 doublings! So basically,

y =2x/d – 3

(It’s a rule of mathematical notation that you divide x by d, then subtract 3. You do not subtract 3 from d, then divide that into x. That would be written as x/(d – 3) if that was intended. Many a computer bug comes from people not using parentheses when they should have.)

And likewise, something similar happens with the percentage of people that die. All three double at the same rate, but, in essence, their starting points are different.

So if you’re watching an epidemic, and a thousand people catch the disease in, say, 30 days (that’s doubling every three days), and then one person dies…you will have a thousand deaths 30 days later. By which point, a million people have caught the disease.

As I said before, the exponential growth at some point stops. Clearly it must stop once the entire population has caught the disease. There’s no one new to catch it and double the number of victims. But usually it stops well before that point. This is attributed to the bacterium or virus becoming less virulent over time.

And that’s a key point.

It’s why we want to increase the doubling time. Because that way fewer doublings happen before the reversal happens, and that means fewer victims.

And reducing the doubling time is important for another reason. Remember I mentioned that some fraction of the people end up in a hospital? THAT, it turns out is the critical constraint. We only have so many hospital beds, and even fewer ventilators (as the current disease requires for treatment). If the exponential growth hits that limit, then many victims cannot be treated, and will be left to die. There’s no way around that.

Adding hospital capacity by (say) kicking ever non-epidemic patient out is a stopgap, likely to stave things off by one or two doubling periods, at most. Remember, any realistic increase in capacity gets overwhelmed in short order!

We have to slow the doubling rate. That buys us time, time for the pathogen to weaken, time for us to come up with new treatments, maybe even time for us to come up with a vaccine that will cut the new number of victims to nearly zero.

How do we increase the doubling rate? Well, a given person who has the disease (whether he knows it yet or not), can only give the disease to people he contacts, or who contacts anything he left the pathogen on (he sneezes near them, touches a doorknob after wiping his nose and then the new victim touches the doornob, etc.) If you can reduce this number, you’ve reduced the doubling rate. That’s why washing your hands, avoiding direct contact, etc., are so important.

It’s important whether or not you think you, or the other person, have the disease, because you can have the disease days before you know it, and be giving it to other people and never even know it.

They are MORE IMPORTANT than any travel ban President Trump could impose, in fact. Because the only thing the travel ban does is reduce the number of carriers. Remember what I said about killing half the microbes in the petri dish? It buys you ONE doubling time and only that. Reducing the current number of carriers–unless it is all the way to zero, only buys you doubling times.

This is why I simply don’t buy arguments that now that we’ve gotten rid of travelers coming in, so we’re basically all right. No, because we have a resident population of contagious people. And it seems small now. But so what? It just means we’re in an early part of the nasty exponential curve.

And with the Wuhan Coronavirus, the doubling period is about three days.

And exponential growth is why I lost my patience with people jumping someone who claimed there were 1700 victims now, when (apparently) one source showed 1200. The original poster was trying to explain exponential growth, and someone was quibbling over today’s numbers. Even if the original poster’s number was twice as big as it should have been…it buys you one doubling period.

And with the Wuhan Coronavirus, the doubling period is about three days.

And people who compare it to the flu, saying only X number of people have died, compared to this year’s flu.

Just give it a few doubling periods. And with the Wuhan Coronavirus, the doubling period is about three days.

No, we HAVE to increase the doubling time. The measures (and advice) Trump outlined on Friday, at last, address this. All the private closures of big-crowd events address this, all the people cancelling plane rides and cruises (or having the carriers cancel them) help too. They represent fewer opportunities for people who have it, to give it to someone else which means one victim takes longer to become two victims.

It’s all about that doubling rate, not today’s absolute numbers.

We can defeat this thing this way, before we become another Italy. (But for now, we have the same doubling rate they do, and we’re 11-16 days behind them.)

The irony is, if all of these measures, which some describe as “panic,” work, someone will come along and say, “See they weren’t needed!” Yes they were.

Viruses

My main point made, I’ll talk, some, about viruses.

It became apparent in the 1800s that many diseases were caused by bacteria. But a whole host of other diseases behaved like bacterial diseases–they got transmitted by the same sorts of events–but no bacteria could ever be seen under a microscope.

Whatever was carrying these diseases was too small to be seen.

Eventually, these things were “seen” under an electron microscope. The objects in question were too small for visible light to show (they were smaller than one wavelength of light–which is pretty doggone small, a bit less than a thousandth of a millimeter, tops). But they were larger than the wavelength of an electron, so an electron microscope could see them.

These viruses were, in fact, way too small to be alive. It takes a certain amount of chemical “machinery” to make a cell, that is capable of producing all the sorts of molecules it needs to function and be able to reproduce, by copying the DNA, copying everything else in the cell, and splitting.

The viruses were nothing but RNA (DNA’s less sturdy cousin) and a coat of protein. The virus cannot reproduce the RNA within it, nor can it produce the coat of protein. It’s not alive. It’s nothing more than an inert envelope full of instructions on how to produce more such envelopes; it needs something else–the cells in your body–to execute the instructions.

That’s why no antibiotic will kill it. It’s not alive. Even an “anti viral” drug doesn’t destroy the virus.

The virus reproduces by getting inside one of your cells. Once in there, the outer protein coat dissolves, and the RNA instructs the cell machinery on how to make more viruses. The cell machinery is designed to do whatever the RNA in the cell tells it to do, and it dutifully does so. (The cell’s original RNA comes out of the nucleus, it’s created by transcribing the DNA, and this happens in an orderly fashion so the cell makes what it needs to function.)

The virus RNA gets copied, and the protein sheaths are copied too. Eventually the cell is full of the damn things and bursts–releasing hundreds of new copies of the virus out where they can infect new cells.

An antiviral, as I said, doesn’t kill the virus, but it does slow this process down. Maybe slows it down enough that the body’s immune system–which can destroy viruses–has time to learn how to do so before the virus kills the host.

Slower is better; that’s the moral of this post.

Dear KMAG: 20200314 Open Thread

Welcome! The doors are open, come on inside!

This Saturday QTree Open Thread is VERY OPEN – a place for everybody to post whatever they feel they would like to tell the White Hats, and the rest of the MAGA/KMAG/KAG world (with KMAG being a bit of both).

Come on in and get comfy:

92137770

Free Speech is practiced here at the Q Tree. But please keep it civil.
Discussion of Q is not only allowed but encouraged. Imagine that! We can talk about Q here and not get banned.

Please also consider the Important Guidelines, outlined here. Let’s not give the odious Internet Censors a reason to shut down this precious haven that Wolf has created for us.

The Storm is upon us…please pray for our President.

Trump-air-force-one

Wheatie’s Rules:

      1. No food fights.
      2. No running with scissors.
      3. If you bring snacks, bring enough for everyone.

……………………………………………………………………………………………………………………….

For your listening enjoyment, I offer this composition from Two Steps From Hell, titled ‘High C’s’:

[youtube https://www.youtube.com/watch?v=tGh4FcZKekA&w=640&h=360]

…………………………………………………………………………………………………………………………….

Visual Descriptions for our dear Zoe, and for anyone else who may find them helpful:
Header Image: Is the base of a huge Tree, with double doors set into an archway and a light beside them, lighting the stone pathway leading up to the doors. On the other side of the trunk is another arched doorway that is open. There are different sized windows at intervals up the tree trunk; two are arched, one is square and another is round. Around the side is a gable containing another window.
There are patches of green moss and ivy growing on the bark of the Tree. Lush green grass is on either side of the stone pathway and there are ferns in the foreground. Filtered sunlight is streaming down behind the Tree, casting a soft light on the surrounding forest.
Second Image: Is an interior view, of rooms with round doorways and soft lighting. There is an overstuffed leather chair with pillows and tables with chairs in each room. On one side there is soft light coming in through a small round window and a larger arched one. In the far room there is another small round window with light shining in through it. There are exposed beams on the walls and the sloped ceiling.
Third Image: President Trump is waving from the stairway landing, at the entrance to Air Force One. He has a solemn, determined look on his face.

……………………………………………………………………………………………..

It’s Caturday!

Come, human slave, you must feed me now:

Fred always was a chick magnet: