Math
Random walks
A swarm leaving home on the lattice: the cloud grows like √n, the endpoints go Gaussian, and in three dimensions two thirds never come back.

What happens
Thousands of walkers start at the origin and step on the lattice, each direction equally likely. Three things mathematics knows about where they get to, each checked here exactly: the cloud grows like √n - a glass sphere of exactly that radius grows with it, and E|x|² = n on the panel is measured on the swarm; the endpoints go Gaussian, the central limit theorem, drawn over the live histogram; and Pólya - a walker that comes back through the origin turns gold, and in one and two dimensions nearly all eventually do while in three only 34 % ever will. The exact share home by step n comes from a dynamic programme that absorbs mass at the origin, plotted against the measured share and the limit. A few walkers carry a trail so a walk is seen as a path, not only as a cloud.
Equations used in the module
Equations E|x_n|² = n (unit steps on the lattice, any dimension: the cloud grows like √n) x_n / √(n/d) → N(0, 1) (central limit theorem, each coordinate) P(ever home) = 1 in one and two dimensions, 0.340537 in three (Pólya) P(home by step n): mass absorbed at the origin by a dynamic programme, exactly


