The Lamppost Problem
In 1921, the Hungarian mathematician George Pólya asked a question so simple it sounds like a joke: A drunk man stumbles away from a lamppost, taking steps in random directions. Will he ever make it back?
The answer, it turns out, depends on something you might not expect: the number of dimensions he's stumbling through. And this one weird fact — that geometry changes the fundamental nature of randomness — reaches from the wobbly path of a Saturday-night reveler all the way to the price of Apple stock and the motion of molecules inside your coffee cup.
Let's start with the simplest version. Our drunk is on a line — a sidewalk, say, infinitely long in both directions. Each second, he takes one step: left or right, fifty-fifty. The question is: will he ever return to where he started?
The answer is yes, with probability 1. Not "almost certainly" in the colloquial sense, but with mathematical certainty.1 He will come back. He'll come back infinitely many times, in fact. No matter how far he wanders, the random walk on a line is recurrent — it returns to the origin again and again, forever.
This feels right, intuitively. He's bouncing back and forth; eventually he'll bounce back to zero. Fine. Now let's make it harder.
Two Dimensions: The Town Square
Put the drunk in a town square — an infinite two-dimensional grid. Each second he steps north, south, east, or west, each with probability ¼. Now will he make it back to the lamppost?
Still yes! Probability 1. It takes longer on average — much longer — but the two-dimensional random walk is still recurrent. The drunk will always find his way home.2
Now here's where it gets strange.
Three Dimensions: The Drunk Bird
Give the drunk wings. He's now stumbling through three-dimensional space — up, down, left, right, forward, back, each with probability ⅙. Will he return to where he started?
No. Or rather: probably not. The probability of return is only about 34%.3 Two times out of three, he will wander off into the infinite void and never come back. This is why mathematicians say: a drunk man will find his way home, but a drunk bird may be lost forever.
Pólya proved this in full generality: random walks are recurrent in one and two dimensions, and transient in three or more. The plane is just barely enough room for the drunk to keep coming back. Add one more dimension and space becomes too vast — there are too many directions to wander off in, too much room to get lost.
Pólya's recurrence theorem: the probability of a random walker returning to the origin depends on the dimension of the space.
Try it yourself. The simulation below runs thousands of random walks in 1D, 2D, and 3D and tracks how many return to the origin. Watch Pólya's theorem come to life.
Random Walk Visualizer
Watch a random walk unfold, then run many trials to see Pólya's recurrence theorem empirically.
The Square Root of Time
Here's another thing that's counterintuitive about random walks: they don't go very far. After 100 random steps, you might expect the drunk to be about 100 steps from where he started. But he's not. He's only about 10 steps away — the square root of 100.
This is the √t scaling law, and it's one of the most important facts in all of probability. After N random steps of size 1, the expected displacement from the origin is proportional to √N, not N. The walk makes progress, but grudgingly — it keeps doubling back on itself, canceling out its own gains.
Why √N? Here's the quick version. Each step adds +1 or −1 to your position. After N steps, your position is the sum of N random ±1 values. The expected value of that sum is 0 (the pluses and minuses cancel on average). But the variance — the average squared distance from zero — is N. So the standard deviation, which measures the typical size of the fluctuation, is √N.
This isn't just a mathematical curiosity. It's the reason diversification works in investing. If you hold N uncorrelated assets, their random fluctuations partly cancel out. Your portfolio's volatility grows like √N, but your expected return grows like N. The more you diversify, the better your ratio of return to risk.
The √N Principle of Diversification
If N independent bets each have expected return r and volatility σ, the portfolio has total expected return Nr but total volatility only σ√N. The return-to-risk ratio improves by a factor of √N. This is literally the mathematical foundation of modern portfolio theory.
Pollen, Atoms, and Einstein's Proof
In 1827, the Scottish botanist Robert Brown peered through a microscope at pollen grains suspended in water and noticed something odd: the grains wouldn't stay still. They jittered and danced, tracing erratic zig-zag paths for no apparent reason. Brown tried everything — different plants, mineral dust, soot — the particles always danced. He had discovered Brownian motion, but he couldn't explain it.4
The explanation had to wait almost 80 years, for a 26-year-old patent clerk named Albert Einstein. In his annus mirabilis of 1905 — the same year he published special relativity — Einstein showed that Brownian motion was caused by invisible molecules of water bombarding the pollen grain from all sides. Each collision was a random kick. The grain's path was a random walk.5
And here's the kicker: Einstein derived the √t law for Brownian motion. He predicted that the average displacement of a particle should grow as the square root of time, and he gave a formula that related the rate of diffusion to the size of molecules. When Jean Perrin measured this experimentally in 1908, the numbers matched. This was the definitive proof that atoms and molecules exist — entities that, in 1905, many serious physicists still doubted were real.6
Brownian motion: each random collision from a water molecule gives the pollen grain a tiny kick, producing an erratic random walk.
A random walk proved that atoms are real. If that doesn't make you love mathematics, I don't know what will.
Bachelier's Forgotten Thesis
But here's the part of the story that doesn't get told enough. Five years before Einstein, a French mathematician named Louis Bachelier wrote a doctoral thesis called Théorie de la Spéculation. In it, he modeled the price of French government bonds on the Paris Bourse as — you guessed it — a random walk.7
Bachelier derived the mathematics of Brownian motion in 1900, half a decade before Einstein. He figured out the √t scaling law. He derived the probability distribution of future prices. He essentially invented mathematical finance. His thesis advisor, Henri Poincaré, called the work "very original." Then everyone forgot about it for sixty years.
The idea was eventually rediscovered and became the foundation of the efficient market hypothesis: if markets are efficient — if all available information is already reflected in prices — then price changes should be unpredictable. Random. The price of a stock tomorrow should be the price today plus random noise. A random walk.
This doesn't mean markets are literally random. It means that whatever patterns exist are already exploited by traders, so by the time you notice them, they're gone. The market has already priced in the information. What's left is noise. And noise, by definition, is random.
Here's the uncomfortable implication: if the efficient market hypothesis is true, then all those stock charts with their "head and shoulders" patterns and "double bottoms" are like seeing faces in clouds. The human brain is a pattern-recognition machine — it finds patterns even where none exist. Especially where none exist.
The simulation below lets you compare pure random walks with real-looking stock charts. Can you tell which is which? Most people can't. That's the point.
Stock Price Random Walk
Each chart below is generated by a random walk with slight upward drift — pure mathematical randomness. Notice how they produce "trends," "support levels," and "breakouts" that look meaningful but aren't.
Every single one of those charts is 100% random. No earnings reports, no Fed announcements, no insider trading. Just coin flips, dressed up in a suit. And yet your brain screams: I see a pattern! I should buy here! I should sell there!
This is the deepest lesson of the random walk: randomness looks more structured than you think. It clumps. It streaks. It creates the illusion of meaning. Our pattern-seeking brains evolved on the savanna where rustling grass usually was a lion. In financial markets, the rustling is usually just wind.
Gambler's Ruin and Absorbing Barriers
There's a dark side to random walks, and we met it briefly in Chapter 3. The gambler's ruin problem is a random walk with walls: you start with some money, and you bet until you either double it or go broke. Those two boundaries — "broke" and "rich" — are absorbing barriers. Once you hit one, the walk stops.
The math is unforgiving. In a fair game, the probability of ruin equals the fraction of the total money held by your opponent. If you walk into a casino with $100 and the casino has $10,000, your probability of ruin is 10,000/10,100 ≈ 99%. You are almost certain to go broke, even though every individual bet is fair. The random walk will, with near certainty, hit the lower boundary before the upper one — simply because the lower boundary is so much closer.
If the game is even slightly unfair — if the house has even a 1% edge — the probability of ruin goes to essentially 100% for any gambler with finite resources. This is why casinos always win. Not because they're lucky. Because they're the boundary condition.
Gambler's ruin: a random walk between two absorbing barriers. The walk almost always hits the nearer wall first.
Random Walks Are Everywhere
Once you learn to see random walks, you see them everywhere. And I mean everywhere.
Diffusion. Drop a blob of ink in water. The ink molecules spread out via a random walk — each molecule bouncing randomly off water molecules. The resulting spread follows the √t law: the ink cloud's radius grows as the square root of time. This is why diffusion is slow over long distances but fast over short ones. It's also the basis of the heat equation, which Fourier derived in 1822 and which governs everything from temperature distribution in a metal rod to the pricing of stock options (the Black-Scholes equation is just a heat equation in disguise).
Google's PageRank. How does Google decide which web pages are important? It imagines a "random surfer" who starts on a random web page and follows links randomly. The fraction of time this random walker spends on each page is its PageRank. The most-visited pages in this random walk are the ones Google puts at the top of your search results.8 Larry Page and Sergey Brin built a trillion-dollar company on a random walk.
Evolution. Genetic drift — random changes in the frequency of gene variants in a population — is a random walk. In small populations, this randomness can overpower natural selection. A beneficial mutation can be lost by pure chance, and a neutral or even slightly harmful one can spread to everyone. Evolution is not just survival of the fittest; it's also survival of the luckiest.
Polymers. A long polymer chain — like DNA or a rubber molecule — can be modeled as a random walk in three dimensions, where each molecular bond points in a roughly random direction. The end-to-end distance of a polymer with N segments scales as √N. This is why rubber is stretchy: you're pulling the random walk taut.
The Meta-Lesson
The random walk is one of mathematics' great unifying ideas. It connects the drunkard to the stock market, the pollen grain to the search engine, the gambler to the polymer. The same √t scaling law, the same recurrence properties, the same fundamental tension between randomness and structure.
And maybe the deepest lesson is this: we are terrible at recognizing randomness when we see it. We see patterns in noise. We see trends in random walks. We see meaning in chaos. Mathematics doesn't cure this tendency, but it gives us tools to compensate for it — to ask, before we trade on a "pattern" in a stock chart or a "hot streak" in basketball, whether what we're seeing could just be the drunkard, stumbling through the dark, going absolutely nowhere.
The drunk finds his way home. The bird does not. And the wise investor remembers that the market's wandering path, like the drunk's, tells a story that means less than it appears.