← back to probability

Random Walks

Grinstead & Snell · GFDL · PDF

Step +1 or −1 with equal probability. In 1D and 2D, the walk returns to the origin infinitely often. In 3D and higher, it escapes forever. This dimension-dependent recurrence is one of the deepest results in probability.

Simple random walk

Start at 0. At each step, move +1 with probability p or −1 with probability 1 − p. The position after n steps is Sₙ = X₁ + … + Xₙ. For the symmetric walk (p = ½), E[Sₙ] = 0 and Var(Sₙ) = n.

0 +2 -2 +4 return return steps →
Scheme

Gambler’s ruin

A gambler starts with k dollars and bets $1 each round. The game ends when the gambler reaches 0 (ruin) or N (target). With a fair coin, the probability of ruin starting from k is (N − k)/N. With an unfair coin (p < ½), ruin is almost certain for large N.

Scheme

Recurrence and transience

A random walk is recurrent if it returns to the origin with probability 1. Pólya proved: the symmetric random walk is recurrent in 1D and 2D, but transient in 3D and higher. The probability of return in 3D is approximately 0.3405. A drunk person on a plane will find their way home. A drunk bird will not.

Scheme

Reflection principle

To count paths from (0, 0) to (n, k) that touch or cross zero, reflect the portion before the first crossing. This bijection between "bad" paths and paths starting from a reflected origin is the reflection principle. It gives exact formulas for first-passage times and maximum positions.

Scheme

Notation reference

Textbook Scheme Meaning
Sₙ = X₁ + … + Xₙ(random-walk n)Position after n steps
P(ruin from k)(ruin-fair k N)Gambler's ruin probability
C(n, k)(binom n k)Binomial coefficient
recurrent / transientsum diverges / convergesReturns infinitely often, or not
Neighbors

Probability chapters

Connections

Translation notes

The random walk simulation uses a deterministic pseudo-random generator for reproducibility. The gambler's ruin formula is exact. The reflection principle is stated without proof; the textbook derives it via a bijection on lattice paths. Pólya's recurrence theorem is stated as a fact; the proof uses generating functions from Chapter 10. Panangaden 2009 extends these ideas to continuous-state stochastic processes, where bisimulation replaces exact equality of paths.

Ready for the real thing? Read Chapter 12 of Grinstead & Snell.

jkThe Handshake

← Markov Chains fin ยท 12 of 12