TwiddleLab / Math / Growth: Exponents and Logs
Project: Will It Go Viral?
What you will learn
- An exponential fits the first days of a viral video, then overshoots: the audience runs out.
- Logistic growth L / (1 + e^(−k(t − t₀))) starts exponential and levels off at the ceiling L.
- At the middle day t₀ the curve is steepest and holds exactly half of L.
How the lesson goes
Your video got 1,000 views on day one and 4,000 by day two. Will it hit a million by day 7?
Bet the views on day 7. The lever is a log scale: each tick is ×100.
Fit an exponential to the first three days.
Turn the daily factor until the curve runs through the dots.
Day 1 to day 2 went from 1,000 to 4,000, a factor of 4, and day 3 is about 16,000: ×4 again. So the model is 1000 · 4^(t − 1).
Bring in the real numbers, day by day.
The axis is logarithmic, so ×4 a day is a straight line.
Where does the exponential start to lie?
Tap the first day where the real views are less than half of the model, then Check.
Until about day 5 the views really did grow ×4 a day. Then most interested people had seen the video, growth slowed, and on day 7 the real views (about 1.35 million) were under half of the 4.1 million the exponential predicted.
Growth with a ceiling is logistic.
Logistic growth: y = L / (1 + e^(−k(t − t₀))).
L is the ceiling, k the early speed (here ×4 a day, k = ln 4), t₀ the middle day.
Early on it looks exponential. At t₀ it is steepest and at half of L. Then it levels off.
Find the ceiling L.
Turn the ceiling until the top of the curve sits on the flat dots.
Far to the right, e^(−k(t − t₀)) is nearly 0, so the curve approaches L. The last dots flatten near 2 million, so L ≈ 2,000,000.
Find the middle day t₀.
Drag the orange point along the time axis until the curve runs through the dots.
At t = t₀ the exponent is 0, e⁰ = 1, so y = L / 2. The views pass 1 million between day 6 and day 7, so t₀ ≈ 6.5.
Challenge: a remix starts a second wave.
Add a second logistic wave. Set its size and middle day until the fit error drops under 6%.
A program that grows with a ceiling.
Each day adds v × (1 − v / ceiling) new views: fast at first, then slower. Run it and watch the graph.
The ceiling is 2,000,000. How many views on the middle day t₀?
At t₀, e^(−k · 0) = 1, so y = L / (1 + 1) = L / 2 = 1,000,000.
Design your own viral curve.
Set the ceiling, the speed and the middle day: a ceiling of 5 million, and 1 million views by day 7.
With L = 5M, one million is a fifth of the ceiling. That happens a little before the middle day, so a middle day of 8 with speed 1 reaches it on day 7.
The growth zoo.
Tap the shape that almost every viral video follows, then Check.
Every audience is finite. Growth looks exponential while most people have not seen it yet, and slows as it runs out of new viewers: an S-curve.
Previous lesson: Faster and Faster: the Number e · Part of the course: Growth: Exponents and Logs
Lessons are interactive and need JavaScript. Turn it on to play them.