Imagine a sailor stumbling out of a bar, equally likely to step left or right with each shaky step. Where will they end up after 100 steps?
This caricature has a serious answer, and the answer is the foundation of an entire branch of mathematics. The sailor’s distance from the bar after steps is not on the order of (as it would be if they walked steadily) but on the order of (because random fluctuations partially cancel). This scaling appears wherever random walks appear — in the diffusion of molecules, the spread of heat, the trajectory of a pollen grain in water, the price of a stock on the market, the genetic drift of a population, the path of a photon through stellar matter.
This article is about why such a simple model captures so much of the world’s randomness, and about the deep mathematics that connects random walks to differential equations, statistical physics, and modern finance.
The basic model
The simplest random walk lives on the integers. Start at position 0. At each step, flip a fair coin: heads, move +1; tails, move -1. After steps, your position is
where the are independent fair coin flips.
A few quick computations:
- Expected position: 0. Each step is symmetric, so on average you go nowhere.
- Variance: . Each step contributes variance 1 to the sum, and the variances of independent random variables add.
- Standard deviation: . This is the typical distance from the origin after steps.
The scaling is the central feature. It’s slow growth — much slower than — but it’s not zero. After 100 steps you’re typically about 10 units away. After 10,000 steps, about 100 units. After a million, about a thousand. The drunkard wanders, but they don’t make much progress in any particular direction.
By the Central Limit Theorem, the distribution of approaches a standard normal as . This means: long random walks behave almost exactly like draws from a Gaussian distribution centered at zero with standard deviation .
Returning home
A natural question: starting at 0, what’s the probability the walk ever returns to 0?
For one-dimensional random walks (on the integer line), the answer is 1 — with probability 1, the walk returns to its starting point, and indeed visits every integer infinitely often. This is sometimes called the “drunkard’s theorem”: a drunken sailor will eventually find his way home.
For two-dimensional random walks (on the integer grid, with four equal-probability neighbors), the answer is also 1. The drunken sailor on a 2D plane also gets home with certainty.
For three-dimensional random walks, the answer is less than 1 (about 0.34). A drunken bird flying randomly in 3D space has only a 34% chance of ever returning to its starting tree.
This result was proved by George Pólya in 1921, and the punchline is sometimes stated as: “A drunk man will find his way home, but a drunk bird may get lost forever.”
The transition from “returns with certainty” to “may not return” is one of the most striking dimension-dependent phenomena in probability. It has implications throughout physics: electrons in 1D and 2D conductors are localized; in 3D they propagate. Heat diffuses through 3D solids in a way it doesn’t in lower dimensions. The deep reason is the same as Pólya’s theorem.
From discrete walks to Brownian motion
Now imagine speeding up the random walk. Instead of one step per second, take 100 steps per second, each of size . The total distance covered per second stays roughly the same (because the standard deviation of steps of size is — and we’ve made and per second, giving ).
Take this limit further: infinitely many steps per second, each infinitesimally small. The result is a continuous-time random process called Brownian motion (or the Wiener process), denoted . It has the properties:
- is a continuous function of
- For any , the increment is normally distributed with mean 0 and variance
- Increments over disjoint time intervals are independent
Brownian motion is continuous but nowhere differentiable. Its trajectory is a fractal — locally, the path is jagged at every scale you zoom in. This was once considered pathological; in light of Mandelbrot’s fractal geometry, it’s now the normal state of nature.
The name “Brownian motion” comes from the botanist Robert Brown, who in 1827 observed that pollen grains suspended in water move erratically under a microscope. He couldn’t explain why. In 1905, Einstein used random-walk arguments to predict the statistical properties of this motion in terms of the size of water molecules and the temperature. His predictions were experimentally verified by Jean Perrin and others within a decade, providing the first hard quantitative evidence that atoms exist — over half a century after the atomic hypothesis was first proposed.
The diffusion equation
Random walks have an unexpected dual: they’re equivalent to a partial differential equation called the diffusion equation (or heat equation):
This says: the concentration at each point changes at a rate proportional to the local curvature of in space.
The connection: if many particles each perform an independent random walk, their concentration evolves according to the diffusion equation. The diffusion constant is determined by the step size and step rate of the underlying walk. This is why the same equation describes the spread of heat, the diffusion of dye in water, the spread of contaminants through soil, and the redistribution of stock-price probability over time.
The connection between random walks and PDEs is one of the deepest correspondences in applied mathematics. It runs in both directions:
- Need to solve a PDE? Sometimes the easiest way is to simulate many random walks.
- Need to understand a random walk? Sometimes the right tool is to solve the corresponding PDE.
This duality, formalized by Andrey Kolmogorov, Norbert Wiener, and others in the 20th century, underlies large parts of modern mathematical physics. (For the broader PDE picture, see our differential equations piece.)
Random walks in finance
In 1900, the French mathematician Louis Bachelier wrote a doctoral thesis titled Théorie de la spéculation — the first rigorous mathematical model of stock prices. He proposed that the price of a stock evolves as a Brownian motion. The thesis was 70 years ahead of its time and largely ignored.
When Paul Samuelson rediscovered Bachelier’s work in the 1960s, modern mathematical finance was born. The dominant model became geometric Brownian motion: , the logarithm of the stock price, evolves as a Brownian motion. This model has the right qualitative features (compounded returns, can’t go negative, fluctuates randomly) and admits clean analytical solutions.
The Black-Scholes equation for option pricing, derived in 1973 by Black and Scholes (with crucial input from Merton), assumes geometric Brownian motion for the underlying asset and produces the famous closed-form formula for European options. Trillions of dollars worth of derivatives are priced using this framework or extensions of it.
Real markets, of course, don’t exactly follow Brownian motion. They have:
- Heavy tails — extreme moves happen too often
- Volatility clustering — calm periods and turbulent periods alternate
- Long-range dependencies — past behavior subtly correlates with future
- Sudden jumps — bad news can move prices instantaneously
Modern quantitative finance uses generalizations: stochastic volatility models, jump-diffusion processes, fractional Brownian motion, Lévy processes. But the random-walk framework remains the baseline against which deviations are measured.
Random walks in physics and biology
Beyond physics and finance, random walks describe a remarkable variety of natural processes.
Statistical mechanics. Boltzmann’s H-theorem, the second law of thermodynamics, and the equilibrium distributions of statistical mechanics all rely on coarse-grained random walks at the microscopic scale.
Polymer chemistry. The shape of a long polymer chain is well approximated by a random walk in 3D — each monomer attaches at a random angle to the previous one. The radius of gyration of the polymer scales as where is the chain length. With chemical interactions, you get self-avoiding random walks, where the polymer can’t visit the same site twice — leading to scaling exponents that don’t have closed-form expressions but are computed numerically.
Population genetics. Allele frequencies in a population evolve via random walks called genetic drift. Without selection, an allele’s frequency performs a random walk between 0 and 1, eventually being lost or fixed. The Wright-Fisher and Moran models are random-walk descriptions of population genetics.
Neural decision-making. Neuroscientists have shown that decision-making in the brain (e.g. detecting a faint visual signal) is well-modeled by a random walk: evidence accumulates noisily, and a decision is made when the walk crosses a threshold. The drift-diffusion model is the standard framework for explaining reaction times and accuracy in psychophysical experiments.
Internet and search. Random walks on graph structures (links, citation networks) underlie PageRank and recommendation systems. The “random surfer” of PageRank is a literal random walk; the algorithm’s stationary distribution is the long-run probability of being at each node.
What random walks teach
The deepest lesson of random walks is that simple stochastic rules can produce complex global behavior. Each individual step is trivially defined: flip a coin, move accordingly. The collective behavior — fractal trajectories, scaling, dimension-dependent recurrence, equivalence with diffusion equations — is mathematically rich.
This is the same lesson that runs through chaos theory and cellular automata and Markov chains: from local randomness or simple rules, global structure emerges. Most of complexity science is, at heart, the study of these emergence patterns.
For an applied mathematician, the question to ask of any random process is: “is this approximately a random walk?” If yes, an enormous toolkit becomes available. The Central Limit Theorem tells you the asymptotic distribution. The recurrence/transience dichotomy tells you whether the walk explores its space or escapes. The connection to PDEs gives you computational and analytical tools.
If you remember one mathematical fact about random walks: it’s the scaling. After steps, the walker is typically a distance from the start. This square root is the signature of randomness everywhere it appears — diffusing particles, drifting genes, fluctuating prices, traveling photons. When you see in nature, a random walk is usually nearby.
The drunkard’s stagger, scaled up, turns out to be the dominant pattern of stochastic behavior in the universe. Not bad for a model that fits in two sentences.
Frequently asked
Why are random walks so universally useful?
Because at small scales, many random processes are approximately Markov — the next step depends only on the current state — and locally symmetric. The Central Limit Theorem then makes the behavior of long random walks predictable: their distribution approaches a Gaussian regardless of the per-step distribution. This makes random walks the universal coarse-grained description of stochastic systems.
Is the stock market really a random walk?
Approximately, on short time scales — especially when the price is in log-form (geometric random walk). But real markets have non-trivial deviations: heavier tails than a Gaussian predicts, occasional bubbles and crashes, long-range correlations. The random-walk model is the right baseline; the deviations are what real financial mathematics tries to capture.
What's the connection to Brownian motion?
If you take the limit of a random walk where steps get smaller and faster, you get Brownian motion — a continuous random process. Einstein in 1905 used random walks to predict properties of Brownian motion that could be measured experimentally, providing some of the first hard evidence that atoms exist. The same math underlies modern stochastic calculus and quantitative finance.