Generator

walk

A generator in the probability library, called 6 times across 1 essays. Below: what it draws at its defaults and at each mode an essay asks for, what it checks while drawing, and everywhere it is used.

walk is one function. Everything below came out of it during this build, at parameters taken from the essays rather than invented for this page — so a figure here is the same figure a reader meets in an essay, and if the generator changes, this page changes with it.

At its defaults

Nine walks, and the square root9 independent walks of 400 steps, each step one place left or right. The dashed curves are ±√n: the walks stay near them, spill past them, and come back — which is what a typical distance means as opposed to a limit.050100150200250300350400-60-40-20204060steps takendistance from the start√n

show: "spread"

Where the walks endedThe endpoints of 4000 walks of 60 steps, against the exact binomial they are drawn from. The spread is 7.9, and √60 is 7.7.-20-101020where the walk endedthe exact binomial

show: "lattice"

The same walk, on a grid4000 steps on the square lattice, each one place along one axis. The walk returned to its starting square 9 times, and it will return again however long it goes on — but nothing in the picture shows why.start9 returns to the start in 4000 steps

show: "return"

Coming home, in one, two and three dimensions4000 walks in each of one, two and three dimensions, each run for up to 3000 steps. On a line and in a plane a walk returns to its start with probability one; in space it returns with probability about 0.66, so roughly a third of walks never come back.1 dimension1.6% escapedtrue value 0%2 dimensions29.8% escapedtrue value 0%3 dimensions67.0% escapedtrue value 34.05%4000 walks per dimension, cut off at 3000 steps — which is why the first two are not exactly zero

What it checks while it draws

Collected by running the family and listening to lib/verify.js, not written here. The count is how many separate times this build put that claim to the test.

Where it is called

Changing this generator changes every figure on this list. That is what makes the list worth publishing rather than keeping in a check script.

The whole library · What the figures prove