· 4 min read
How to Understand a Random Walk
Manesh Jayawardhana
CIO & Co-founder
Flip a coin a thousand times, stepping right on heads and left on tails. How far from the start do you end up?
The intuitive answers are “zero, because they cancel” and “somewhere around 500”. Both are wrong. The typical distance is about 30 — and the reason why explains diffusion, molecular motion and a surprising amount of statistics.
Why distance grows as the square root
Steps in opposite directions do cancel, so the expected position is zero. But the expected distance from zero isn’t, because cancellation is never exact.
The key fact: when you add independent random steps, their variances add rather than their magnitudes. Variance grows linearly with the number of steps, so the standard deviation — which has the units of distance — grows with the square root.
typical distance ∝ √N
After 1,000 steps you’re typically around 30 units away, not 1,000. After 4,000 steps you’re only twice as far as after 1,000, not four times.
This is why diffusion is so slow over long distances and so fast over short ones. A molecule crossing a cell membrane by random motion takes microseconds; the same molecule crossing a room takes hours. Doubling the distance quadruples the time.
The result nobody expects
A random walk in one or two dimensions returns to its starting point with probability 1, given infinite time. In three dimensions it doesn’t — there’s a finite probability it never comes back.
This is Pólya’s recurrence theorem, and it’s one of the more startling results in elementary probability. The plane is small enough that a wanderer must eventually come home; space is roomy enough that they might not. The three-dimensional return probability is around 34%.
| Dimensions | Returns to Origin? | Return Probability |
|---|---|---|
| 1D | Always (eventually) | 1 |
| 2D | Always (eventually) | 1 |
| 3D | Not necessarily | About 0.34 |
Where the model applies
Diffusion and Brownian motion. This is the original application — Einstein’s 1905 paper on Brownian motion used exactly this reasoning, and it was among the strongest early evidence for the existence of molecules.
Polymer chains. A flexible polymer’s shape is approximately a random walk in three dimensions, which is why its end-to-end distance scales with the square root of its length.
Search and foraging. Random-walk models describe animal foraging reasonably well when there’s no gradient to follow.
Where it applies less well: financial markets. Prices are often modelled as random walks, and it’s a useful baseline, but real markets show fat tails and volatility clustering that a simple random walk doesn’t produce. Treat it as an intuition rather than a model.
Common mistakes to avoid
- Expecting a random walk to stay near zero because steps cancel.
- Assuming distance grows linearly with steps.
- Reading a single walk as representative — run hundreds and look at the distribution.
- Applying the 3D non-return result to a 2D situation, or vice versa.
- Treating financial random-walk models as descriptive of real market risk.
How to do it with Random Walk Simulator
The Random Walk Simulator runs walks in one or two dimensions and shows the distribution.
- Choose dimensions and the number of steps.
- Run many walks at once — one walk is an anecdote, a thousand is a distribution.
- Compare the typical distance against the square root of the step count.
- Try quadrupling the steps and check that the distance roughly doubles.
Other probability and simulation tools are in the tools directory.
Frequently asked questions
Does a random walk return to the start?
In one and two dimensions, yes, with probability 1 given infinite time. In three dimensions it may never return — the probability is around 34%. That’s Pólya’s theorem, and it’s genuinely surprising.
Why does distance grow as the square root?
Because steps in opposite directions cancel and only the imbalance survives. The imbalance of N coin flips grows like √N, and that’s the distance.
Is this a good model for stock prices?
It’s the basis of one and a useful baseline, but real markets have fat tails and volatility clustering that a simple random walk doesn’t produce. Use it as intuition, not as a risk model.
Final thought
The √N rule is the takeaway. It explains why diffusion is fast at small scales and hopeless at large ones, and why a thousand coin flips leaves you around thirty steps from where you started.