TL;DR
A random walk is a path made by repeatedly adding a random step. Start at zero, flip a fair coin, step right on heads and left on tails, and repeat. Where you are after many steps is a sum of many small random pieces, so it wanders, but in a predictable way: the typical distance from the start grows like the square root of the number of steps.
Random walks are the simplest model of anything that moves by accumulating unpredictable nudges, and they are the building block behind many stochastic processes.
Where you'll see it: in the price model behind option pricing, in the jitter of a particle in a fluid, in the noise a diffusion model adds to an image one step at a time, and in the proposal moves of Monte Carlo samplers.
Intuition
A drunk on a line
Picture someone leaving a lamp post, stumbling one step forward or one step back at random. After one step they are one unit away. After four steps they could be anywhere from four units away to the post itself. The question a random walk answers is how far they get, typically, as the steps pile up.
The key observation is that each step is independent of the ones before it. The walker has no memory and no destination. Yet the position is not random in a shapeless way. Most of the probability sits near the start, and the chance of ending very far away falls off quickly.
- n = 4 steps
- n = 16 steps
- n = 100 steps
Why the square root
Each step adds a little uncertainty, and independent uncertainties add up in variance, not in distance. Think of it as the same rule as the central limit theorem: a total built from many independent pieces is roughly a bell curve, and its width is set by how much the pieces vary in total. The steps are the same size every time, so the spread grows in proportion to the square root of the step count. This square-root growth is the signature of a random walk. It is what separates diffusion, where things spread out slowly, from straight-line motion, where distance grows in direct proportion to time.
The math
The simple symmetric random walk
Let be independent random steps, each equal to or with probability each. Here is the step at time . The walk is
Here is the walker's position after steps. Each is a Bernoulli trial rescaled from to : writing gives a fair coin, so . This ties the walk directly to the binomial distribution of counts.
Mean and variance
A single step has mean and variance . Because the steps are independent, the variances add:
The average position stays at zero, which is why the walk has no drift. The variance grows linearly in , so the typical distance is . After 100 steps the spread is about 10, not 100.
Approximately Gaussian
Because is a sum of many independent pieces, the central limit theorem says that for large
This is why the plot above is a bell curve. The approximation is what makes random walks easy to analyse with Gaussian tools.
Returning to the start
The probability that the walk is back at zero after steps is exactly
The walk can only sit at zero after an even number of steps, since each step changes the parity of the position. For large , Stirling's approximation simplifies this to
The probability of being home decays, but only slowly. Summing these probabilities over all gives infinity, which has a famous consequence explained in the next section.
Recurrence
Let be the probability that a walk started at zero eventually returns to zero. In one dimension, the walk returns with probability : it always comes back, although the expected waiting time is infinite. In two dimensions, the same holds. In three dimensions, the return probability is about , so the walk escapes forever with probability about . This was proved by George Pólya in 1921, and it is one of the cleanest facts about random walks.
Worked examples
Take four steps. The possible positions and their probabilities:
- There are equally likely step sequences.
- To end at you need two steps and two steps. There are such sequences.
- So .
- To end at you need all four steps to be . There is only one sequence, so .
- Interpretation: four steps leave the walker exactly home more than a third of the time, but reaching the farthest point is rare.
Consider a walk of steps.
- The variance is , so the standard deviation is .
- Using the Gaussian approximation, the chance of being within two standard deviations of zero is about . So .
- Interpretation: after 100 steps you are almost certainly within 20 units of the start, even though you took 100 steps. The typical distance is about 10, a tenth of the number of steps.
Use the approximation with , so ten steps.
- The exact value is .
- The approximation gives .
- The two agree to within about 3 percent, so the simple formula is good enough for quick estimates.
Tradeoffs and failure modes
A random walk is the right model when increments are independent and roughly the same size. It is the wrong model in several common situations:
| Situation | Problem | Better choice |
|---|---|---|
| Steps depend on the past (momentum, mean reversion) | Independence is violated | [[markov-chain |
| Mean reversion (a quantity pulled back to a level) | A plain walk wanders off without bound | Ornstein-Uhlenbeck process, or a [[stationary-process |
| Occasional huge steps (infinite variance) | Variances no longer add to a finite number, so the square-root rule fails | Heavy-tailed step distributions, such as Lévy flights |
| Long-run prediction of the position itself | The walk has no expected direction | Models of drift, plus the walk for the noise around it |
Some practical traps:
- Zero drift is not zero risk. The average position is zero, but the spread grows. A gambler with a fair coin is expected to end where they started, yet they can still go broke along the way.
- Do not read a single path as a trend. A walk can drift far in one direction for a long stretch purely by chance.
- The Gaussian is an approximation. It is good for large and for the bulk of the distribution. Exact tail probabilities need the binomial count.
History
The name "random walk" came from Karl Pearson in 1905, who asked in the journal Nature about the distribution of the distance a drunkard reaches after a number of random steps. Lord Rayleigh replied that the problem was closely related to his earlier work on random vibrations.
The idea had a quieter earlier life in physics and finance. In 1900 Louis Bachelier used a random walk as the model of stock price changes in his doctoral thesis, Théorie de la spéculation, which is widely cited as the first mathematical treatment of financial markets. Albert Einstein's 1905 analysis of Brownian motion, the jitter of pollen grains in water, showed that a random walk of many tiny molecular kicks gives a spread proportional to the square root of time, and it gave a way to measure the size of atoms.
George Pólya's 1921 result on recurrence in one, two and three dimensions made the walk a central object of probability theory. It caught on because the same simple model describes a particle in a fluid, a price series, an animal's search path and a Monte Carlo proposal, and because its square-root law is easy to check.
Check yourself
QuestionA walk takes 4 independent fair steps. What is the probability it ends at ?Show answer
To end at you need three steps and one step. There are such sequences out of , so the probability is .
QuestionWhy does the spread of a random walk grow like and not like ?Show answer
The steps are independent and have mean zero, so their variances add: . The standard deviation is the square root of the variance, which is . Distances, not variances, scale with the square root, so the typical distance grows like .
QuestionAfter 400 steps of a fair walk, what is the standard deviation of the position, and roughly how far is the walk from zero 95 percent of the time?Show answer
The variance is , so the standard deviation is . Under the Gaussian approximation, about 95 percent of the mass lies within two standard deviations, so the walk is within about units of zero 95 percent of the time.
QuestionA two-dimensional random walk always returns to its starting point eventually, but a three-dimensional one may not. Explain the difference in one sentence.Show answer
In two dimensions the walk revisits the same neighbourhood so often that it returns with certainty, while in three dimensions there is enough room that the walk can escape forever with probability about .
QuestionA stock's daily changes are modelled as independent fair moves. Why might a trader who believes in trend-following be surprised by the model, and what assumption would they need to change?Show answer
The model assumes each move is independent of the past, so there is no momentum to exploit. A trader who sees trends is assuming dependence between steps, which means the model needs a Markov or autocorrelated structure rather than independent increments.