Random Walks: From Drunkards to Stock Markets
Imagine a drunk person standing in the middle of an empty field. They take a step in a completely random direction, then another, then another — no plan, no memory of where they've been, just pure chance steering every footfall. Where will they end up after a thousand steps? A hundred thousand? The answer is not "somewhere random" in any simple sense. It follows a precise mathematical law — and that same law governs how molecules spread through air, how the internet gets ranked, why financial markets are so stubbornly hard to beat, and how animals hunt for food in the ocean. Random walks are one of mathematics' most quietly radical ideas.
The Concept
A random walk is a path built by taking a sequence of steps where each step's direction is chosen at random, independent of all previous steps. The simplest version lives on a number line: start at zero, flip a coin, step right if heads or left if tails, repeat. No memory, no trend, no destination — just one coin flip after another.
That sounds almost childishly simple. But the consequences are profound.
After N steps, how far from the start are you likely to be? Not N steps away — if each step is equally likely to go either direction, the steps partially cancel each other out. And not zero either — sometimes the coin runs in one direction for a while. The answer is roughly the square root of N. After 100 steps, you're typically about 10 units from the start. After 10,000 steps, about 100 units. After a million steps, about 1,000 units.
This square-root relationship — distance grows as √N — appears everywhere random walks do. It is one of mathematics' most important scaling laws.
The History: A Drunk Man and a Mosquito
The phrase "random walk" entered the scientific vocabulary on July 27, 1905, when the British statistician Karl Pearson published a brief letter in Nature (Vol. 72, p. 294) titled "The Problem of the Random Walk." He posed the question: if a person takes n steps, each of fixed length but each in a completely random direction, what is the probability of finding them at a given distance from where they started?
Pearson wasn't actually thinking about drunk people — he was modeling the migration of mosquitoes into cleared jungle. He was collaborating with Sir Ronald Ross, who had won the Nobel Prize in 1902 for demonstrating how mosquitoes transmit malaria, and they wanted a mathematical description of how an insect population might spread across a landscape. But Pearson knew the math was hard, so he framed it as a puzzle for Nature's readers.
Lord Rayleigh — the physicist who explained why the sky is blue — replied quickly, having solved a related problem in his work on sound waves. His solution led Pearson to write: "The lesson of Lord Rayleigh's solution is that in open country the most probable place to find a drunken man who is at all capable of keeping on his feet is somewhere near his starting point!" The drunkard metaphor stuck, and the term "random walk" has been used ever since.
But Pearson was not actually first. Five years earlier, in 1900, a French mathematician named Louis Bachelier submitted his doctoral thesis at the Sorbonne and quietly revolutionized two fields at once — without anyone noticing for half a century.
Bachelier's Lost Masterpiece
Louis Bachelier defended his thesis, Théorie de la spéculation (Theory of Speculation), on March 29, 1900, under the supervision of Henri Poincaré — one of the greatest mathematicians who ever lived. In it, Bachelier proposed modeling stock prices on the Paris Bourse as a random walk: each day's price change is independent of the last, unpredictable, and drawn from a random process.
To analyze this, Bachelier had to invent the mathematical machinery for what we now call Brownian motion — the continuous-time version of a random walk. He derived the diffusion equation that governs how probability spreads over time. He worked out the first mathematical framework for pricing financial options. He did all of this five years before Einstein.
The thesis received the grade of "honorable" rather than the top "très honorable," partly because the examination committee viewed financial markets as an undignified subject for a mathematics dissertation. Poincaré wrote a supportive report but noted that the topic was "somewhat remote from those our other candidates are in the habit of treating." Bachelier never secured a permanent university post until late in his life. His work was essentially forgotten.
The rediscovery came in the 1950s, when statistician Leonard "Jimmie" Savage found a copy of one of Bachelier's books and sent postcards to economist colleagues asking if they knew of it. One postcard reached Paul Samuelson at MIT, who tracked down the 1900 thesis. Samuelson later said it transformed his thinking. The chain of influence that followed ran directly to Eugene Fama's Efficient Market Hypothesis (1970) and then to the Black-Scholes option pricing model (1973) — the formula for which Myron Scholes and Robert Merton received the Nobel Prize in Economics. The foundations had been laid 73 years earlier by a forgotten Frenchman.
Einstein and the Proof That Atoms Exist
In 1905 — the same year as Pearson's letter — Albert Einstein published a paper in Annalen der Physik on what was then called Brownian motion: the jittery, erratic movement of tiny particles (like pollen grains) suspended in a liquid. Scientists had observed this motion since the botanist Robert Brown documented it in 1827, but no one understood why particles moved that way.
Einstein proposed that the motion was caused by the liquid's molecules — which were too small to see — constantly bombarding the larger particle. Each collision gave the particle a tiny random nudge. The particle's path was a random walk, driven by millions of invisible molecular kicks per second.
But Einstein didn't just describe this qualitatively. He derived a precise mathematical relationship: the mean squared displacement of the particle grows linearly with time, expressed as ⟨x²⟩ = 2Dt, where D is the diffusion coefficient and t is elapsed time. This wasn't just elegant — it was directly testable.
The French physicist Jean Perrin performed the experiments in 1908, meticulously tracking the positions of tiny particles under a microscope at regular time intervals. The results confirmed Einstein's formula precisely. More importantly, by plugging in the numbers, Perrin could calculate Avogadro's number — the count of molecules in a mole of substance — and got a value remarkably close to the modern accepted figure.
This was historically enormous. In 1905, some serious scientists still doubted whether atoms and molecules were physically real, or just a convenient mathematical fiction. Einstein's random walk paper — and Perrin's experimental confirmation — effectively proved that atoms exist. The Nobel Prize committee cited Perrin's Brownian motion work when awarding him the Nobel Prize in Physics in 1926.
The Dimension Question: Pólya's Stunning Theorem
Here is a question that sounds simple but has a remarkable answer: if you take an endless random walk, will you eventually return to where you started?
In 1921, the Hungarian mathematician George Pólya proved something startling. In one or two dimensions, a random walk is recurrent: given enough time, you are guaranteed to return to the origin. In fact, you will return infinitely often. But in three dimensions — and higher — the walk is transient: there is a non-zero probability of wandering off to infinity and never coming back.
The 2D result is the more surprising one. A random walk on a grid — stepping north, south, east, or west at random — will revisit every point on the grid infinitely often, with probability 1. No matter how far you've wandered, you will eventually find your way home. The physicist Shizuo Kakutani captured this with a memorable quip: "a drunk man will always find his way home, but a drunk bird may not."
The three-dimensional case changes everything. Add one more dimension of freedom, and the random walker has enough room to escape. This has deep implications for physics — it's related to why electrical resistance in 3D materials behaves differently from 2D ones, and why certain physical processes are fundamentally different in 2D materials like graphene compared to ordinary 3D substances.
Why It Matters: Random Walks Everywhere
Financial Markets
The connection Bachelier made between random walks and stock prices became the foundation of modern finance. If stock price changes are random and independent — each day's move unrelated to yesterday's — then past price patterns contain no useful information about future prices. You cannot systematically "beat the market" by studying charts. This is the core of the Efficient Market Hypothesis: prices already reflect all available information, so movements are essentially random.
The Black-Scholes formula for pricing options treats the underlying asset price as a random walk (technically, a geometric Brownian motion). It was so influential that it effectively created the modern derivatives market. Traders use it — or variations of it — to price trillions of dollars of financial contracts every year.
Physics: Diffusion and Heat
The mathematics of random walks is identical to the mathematics of diffusion — the process by which molecules spread from high concentration to low concentration. When you spray perfume in one corner of a room, the molecules don't rush to fill the space; they wander randomly, colliding with air molecules billions of times per second, gradually spreading outward according to the square-root law. Heat spreads through materials by the same mathematical process. So does ink dropped in water, so does pollution spreading through groundwater.
Google's PageRank
When Google's founders Larry Page and Sergey Brin developed the algorithm to rank websites in the late 1990s, they modeled it as a random walk on the web graph. Imagine a "random surfer" who starts on a random webpage and keeps clicking links at random, never hitting the back button. At any moment, they might also "teleport" to a completely random page. The fraction of time the surfer spends on each page — their steady-state probability in this random walk — becomes that page's PageRank score. Pages that attract many links from other well-linked pages will naturally be visited more often by the random surfer, so they rank higher. Billions of search results every day are produced by a version of this random walk algorithm.
Biology: How Animals Hunt
Animals searching for food in an environment with patchy, unpredictable resources don't just walk in straight lines. Studies of sharks, seabirds, bees, and even bacteria have revealed that many species perform what mathematicians call Lévy flights — random walks where most steps are short, but occasionally a very long step is taken. The distribution of step lengths follows a power law rather than the ordinary bell curve.
This turns out to be nearly optimal for searching an environment when prey is sparse and randomly distributed. Ordinary random walks "revisit" the same area too often; Lévy flights cover new ground more efficiently. The pattern appears in organisms ranging from fruit flies to albatrosses to manta rays — suggesting it may have evolved independently many times as a near-optimal foraging strategy.
Computer Science: Monte Carlo Methods
When a problem is too complicated to solve exactly — the behavior of a nuclear reactor, the folding of a protein, the value of a complex financial derivative — mathematicians and engineers often resort to Monte Carlo methods: simulate many random walks through the space of possible outcomes and average the results. The name comes from the famous casino in Monaco; the method relies on the same mathematical principles that make random walks predictable in aggregate even when individual paths are chaotic.
The Arc-Sine Law: Counterintuitive Probability
Random walks have a way of violating intuition even after you think you understand them. Consider a simple coin-flipping game: you start with no money, gain $1 for each heads, lose $1 for each tails. Over 1,000 flips, what fraction of the time do you expect to be ahead (positive balance)?
You might guess "about half" — the game is fair, so shouldn't you be ahead roughly half the time? The answer is no. The arc-sine law, proved by the mathematician Paul Lévy, says that the most likely outcomes are the two extremes: you'll spend almost all of the 1,000 flips ahead, or almost all of them behind. The intuitive "balanced" outcome — being ahead about half the time — is actually among the least likely results.
This sounds paradoxical, but it's a genuine mathematical theorem. A random walk tends to stay on one side of zero for long stretches rather than oscillating back and forth. If you're behind after the first 50 flips, you're more likely to stay behind for a while than to immediately recover. This has sobering implications for how we evaluate luck versus skill in any competitive endeavor with a random component.
The Gambler's Ruin
A close cousin of random walks is the gambler's ruin problem: suppose you have $50 and you're playing a fair coin-flip game against someone with $950. You both bet $1 per flip. What's the probability that you go broke before they do?
The mathematics gives a clean answer: your probability of ruin is equal to the size of the opponent's bankroll divided by the total money in play. With $50 against $950 in a $1,000 total game, you have a 95% chance of going broke. Even in a perfectly fair game, having less capital is brutally dangerous. This is why casinos, even with only a small house edge, are guaranteed to profit in the long run — and why professional investors obsess over the math of position sizing rather than just picking winning trades.
Takeaways
- Random walks are everywhere: from molecules diffusing in air, to stock prices, to Google search rankings, to animal foraging — the same mathematical framework describes them all.
- The √N rule is fundamental: after N random steps, you've typically traveled a distance proportional to √N from the start. This sublinear growth explains why diffusion is slow over large distances.
- Dimension changes everything: Pólya's theorem proves a random walker is guaranteed to return home in 1D and 2D, but can escape forever in 3D — a striking example of how geometry changes probabilistic outcomes.
- Bachelier's forgotten genius: the mathematical foundations of modern finance were laid in 1900 by Louis Bachelier, whose thesis went unrecognized for half a century and whose ideas underpin trillion-dollar financial markets today.
- The arc-sine law defies intuition: in a fair random walk, "balanced" time above and below zero is actually the rarest outcome. Random processes tend toward long stretches in one direction, not rapid oscillation.
Resources: Karl Pearson's original 1905 letter in Nature · History of Bachelier's life and work · Einstein's random walk — Physics World · Pólya's Random Walk Theorem (ResearchGate)