Set a thousand drunkards loose from the same lamppost. Each takes a fresh random step every tick — no memory, no plan, no destination. Watch a single walker and you can predict nothing: it wanders left, right, forward, back with equal whim. Yet watch the whole swarm and something rigid appears. The cloud swells outward, but not steadily — it spreads as the square root of time. After 100 steps the typical walker sits about 10 step-lengths from home; to double that distance you need not 200 steps but 400. This is the √n law of diffusion, the reason ink blooms slowly in water and heat crawls rather than jumps. Choose the dimension, add a drift, and watch chaos in each path become law in the aggregate.
A random walk is the simplest model of aimless motion: start at the origin and, at each tick, take one step in a randomly chosen direction, independent of every step before. Karl Pearson posed it in 1905 as the problem of a wandering mosquito; Einstein, the same year, used the identical idea to explain the jittering of pollen grains in water — Brownian motion — and in doing so gave the first hard evidence that matter is made of atoms. The single walker is the picture of pure unpredictability. But randomness, aggregated, obeys iron laws, and this applet computes one of them live from thousands of genuine simulated walkers.
Write the walker's position after \(n\) steps as the vector sum \(\mathbf{R}_n=\mathbf{s}_1+\mathbf{s}_2+\dots+\mathbf{s}_n\), where each \(\mathbf{s}_i\) is a random unit step. Because the steps are symmetric, the average position is the origin: \(E[\mathbf{R}_n]=\mathbf 0\). So on average the walker goes nowhere — which is true, and useless, because no individual walker sits at the origin. The right question is not "where is it on average?" but "how far from home is it, typically?" To answer that we look at the squared distance and expand it: \(|\mathbf{R}_n|^2=\sum_i|\mathbf{s}_i|^2 + \sum_{i\ne j}\mathbf{s}_i\!\cdot\!\mathbf{s}_j\). Each step has unit length, so the first sum is just \(n\). The cross-terms are products of independent steps pointing every which way, so each averages to zero. Taking expectations, \(E[|\mathbf{R}_n|^2]=n\), and the root-mean-square distance is \(\sqrt n\).
That single line is the heart of diffusion. Distance does not add up — squared distance does, because the Pythagorean cross-terms cancel when directions are random. So spreading is sub-linear: to travel twice as far from the start, a diffusing walker needs four times as long, not twice. Notice too that the argument never used the dimension — the same \(\sqrt n\) governs a walk on a line, a plane, or in space (toggle the buttons and watch the plot stay put). Einstein sharpened it into \(\langle x^2\rangle = 2Dt\), tying the microscopic step size to the macroscopic diffusion constant \(D\); it is why a drop of ink takes minutes to blur across a glass rather than crossing it at molecular speeds, and why the same \(\sqrt{\text{time}}\) crawl appears in heat flow, in the settling of a stock price, and in the error of a Monte-Carlo estimate.
Adding a drift exposes the law's real punchline. Give each step a small consistent bias and the mean position now moves: \(E[\mathbf{R}_n]\) grows linearly in \(n\), a straight march. But the spread around that mean — the cloud's width — still grows only as \(\sqrt n\). Signal (the drift) scales like \(n\); noise (the diffusion) scales like \(\sqrt n\); so the signal-to-noise ratio improves like \(n/\sqrt n=\sqrt n\). This is the same \(\sqrt n\) that appears in the standard error of a sample mean and in the \(\sqrt n\) width of the Galton board's bell — average \(n\) noisy measurements and the uncertainty shrinks by \(\sqrt n\). One last subtlety, Pólya's 1921 theorem, is worth toggling for: a symmetric walk is recurrent in 1D and 2D — it returns to its start infinitely often — but transient in 3D, where it escapes to infinity and never surely comes home. "A drunk man will find his way home, but a drunk bird may get lost forever."