The unreasonable effectiveness of math, and Facebook (part 3)

Ok, by the end of this post, I will finally make you say "whoa!"

Two posts ago, I talked about "the unreasonable effectiveness of mathematics" -- the surprising and amazing success that mathematics has had describing phenomena in the real world. I also showed this graph I put together of the number of Facebook users over time:

Then, last time I went on a big long digression to introduce you to differential equations. I introduced the differential equation

[frac{dx}{dt} = rx ]

which describes a particular scenario of growth in continuous time. More specifically, the left side of the equation is just formal mathematical notation for change, known as a derivative. If x(t) is the amount of money in your savings account, what this equation says is that at every moment in time, the way your bank account changes is that it accrues r times the amount of money currently in the account. This is called continuous compounding. The solution to the differential equation -- meaning the formula that x(t) actually follows -- is

[ x(t) = x_0 mathrm{e}^{r t} ]

where x_0 is the amount of money you start out with. This is exponential growth. If you don't withdraw anything, and if your bank doesn't fold, then your money grows forever.

And now we are ready for the new stuff. In reality, nothing can grow forever. All growth in the world is bounded by some constraints. Think about population. The famous Malthusian idea of growth, proposed in the late 18th century, is the one we have already discussed: unbounded exponential growth. Thomas Malthus was thinking about growth in the context of the human population on Earth. But in 1838 a guy named Pierre François Verhulst wrote a paper whose French title translates as "A notice on the Law that Population Growth Follows" in which he pointed out that populations really can't grow forever because of constraints such as limited food and space. This same idea was highlighted in a 1920 paper by Pearl and Reed called "On the Rate of Growth of the Population of the United States Since 1790 and its Mathematical Representation." The differential equation that Verhulst, Pearl, and Reed had in mind to describe constrained growth is known as the logistic model, which can be written as

[frac{dx}{dt} = rx(1 - x/K) ]

where x(t) describes the population size over time. The constant r is a growth rate, and plays the same role as r in our bank account problem, except than instead of dollars reproducing, we are now thinking of people reproducing. However, in our money problem, the growth percentage was always r. In the logistic model, it's not. To see this, think of rearranging the right hand side of the equation. You could write it as

[frac{dx}{dt} = [r(1 - x/K)]x. ]

Instead of multiplying x by r as in the bank account problem, we are multiplying it by r(1-x/K), which depends on the actual value of x! If x is very small, this prefactor is essentially equal to r, and growth will be (nearly) exponential, like in the bank account problem. But then, as x grows, the prefactor gets smaller and smaller, meaning that growth slows down. This is how we capture limited resources. In fact, when x=K, the prefactor is zero! The parameter K is known as the carrying capacity -- it is meant to capture the maximum population that an environment with limited resourced can support. Also notice that if x happened to be bigger than the carrying capacity K, the prefactor would be negative, and so the rate of change of the population would be negative, which means the population would shrink. People would die off because of the unavailability of resources.

The logistic differential equation has solution

[x(t) = frac{C mathrm{e}^{rt}}{1+frac{C}{K}mathrm{e}^{rt}}. ]

You can trust me that this is the solution. If you ever decide to learn differential equations, you'll be able to obtain it yourself. Now, remember that r measures growth in the absence of constraints, and the carrying capacity that measures the constraints is K. The number C just depends on how much population you start out with. If the population starts under the carrying capacity, the solution has a characteristic s-like shape that looks like this:

In this example, the carrying capacity is K=1 and you can see that x(t) levels off to that value towards the right, that is, for later values of t.

In case you are thinking "who cares? How could this ever describe anything in real life?" let me go ahead and make you say "whoa!" two times.

First, we have Georgy Gause, who in 1932  wrote a paper with the awesomely grandiose title "Experimental Studies on the Struggle for Existence." Gause let some yeast grow in a lab experiment, and he plotted the amount of yeast over time (shown as symbols below). Then he also plotted solutions to the logistic equation (drawn in as curves). Here's what he got:

If you are not saying "whoa!" let me assure you that you really should be. Yeast are living organisms with their own complicated biology. Even a controlled lab culture is a complicated environment. And yet somehow, a single differential equation does a good job describing yeast population growth.

And second, we have -- finally -- Facebook. When I plotted the data showing the number of active Facebook users over time, I saw the s-shape, which screamed "logistic." So I did a quick fit of the data to a logistic curve. That is to say, I tried to find values of r, K, and C so that the logistic curve would do a good job approximating the many data points. While there are lots of fancy ways to do more precise curve fitting, I wanted to show you that it doesn't take fancy skills to do at least a heuristic job, so I just did some trial and error and came up with r=0.085, k = 1100, and C=3.06. Here's the result, with the actual Facebook data plotted (again) as blue dots and the logistic curve in red:

Crazy, right?! Note that I have included times well beyond those where the Facebook data is available -- or in other words, I've extended the horizontal axis a bit -- to give a sense of what the future holds. From our choice of K = 1100 we can predict that Facebook will max out at 1100 million -- or 1.1 billion -- active users.

People are complicated creatures. Social networks are complicated. People's access to and relationship with technology is complicated. And yet one simple differential equation seems to do a good job matching the Facebook data.

Talk about the unreasonable effectiveness of mathematics.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>