yAtlas

Drawing the first frame…

0:00 / 6:02Prologue

The Order Beneath · No.06 · Rendered in real time · 6:02

Chance

A short film about probability

Probability in five short chapters. A ball bouncing left or right at a peg, a step one way or the other, a needle crossing a line or missing it, a link open or closed: no single outcome can be predicted. Put many together, and what is left is anything but arbitrary: a bell curve, a square root, π, half the chords from scattered straws, a threshold at exactly one half. The order is not in any one trial; it is in the many. Every frame is computed by code; on the website, each one is drawn live in your browser as the film plays.

Runtime
6:02
Chapters
Five, with a prologue and a coda
Resolution
Matches the player, up to 4.4 MP
Frame rate
Up to your display’s refresh rate, depending on the device
Prerecorded frames
None
Languages
中文 · English

Try it yourself

Each of these moments in the film opens in the Studio, where you can try the idea yourself.

  1. Make every peg lean one way and see whether the bell survivesI · The Galton board
  2. Throw the same number again and see how far π movesIII · Buffon's needle
  3. Switch the way of picking and watch the share of goldIV · A random chord
  4. Move and shrink the circle: still half the straws' chords are longIV · A random chord
  5. Drag p slowly past one half and watch the largest cluster spanV · Percolation
  6. Pour with p below one half and see where the water stopsV · Percolation

Chapters

Studio

This volume's pictures, in your hands: change a parameter and watch the picture follow.

Transcript · 69
  1. Prologue

  2. IThe Galton board

  3. IIRandom walks

  4. IIIBuffon's needle

  5. IVA random chord

  6. VPercolation

  7. Coda

Plate notes · 5

I The Galton board

Francis Galton built this board in 1873 to show order coming out of chance. At every peg a ball bounces left or right with even odds, so the bin it lands in, counted from the left, is the number of times it went right: k=b1+b2+⋯+b12. There are 212=4096 equally likely paths, and 12k of them end in bin k. Drop enough balls and the share of each bin settles near 12k/4096; add rows and they settle onto the bell curve. In the corner the balls are counted as they land.

Left or right
k=b1+b2+⋯+b12One ball, slowly. At each of the twelve pegs it goes right or left, and the corner writes its path down as it goes, R for right and L for left. It goes right seven times, so it lands in bin 7. Nine more follow it down.
Counting paths
P(k)=12k/212The number at each peg counts the paths that reach it, the sum of the two numbers above, so the pegs spell out Pascal's triangle, and each line between them is lit by the chance that a ball runs along it. The gold lines are the 127=792 paths, out of 4096, that end in bin 7.
A thousand balls
Nk/N→12k/212Fourteen hundred balls, each on its own path. The blue outline is where the piles should stand, N times the probability of each bin, and the piles keep close to it, closer in proportion the more balls fall: the law of large numbers.
The bell curve
nk/2n≈√2/πne−2(k−n/2)2/nThe rows double, from 12 to 192, and the board is rescaled each time to keep the spread the same. The bars, whose areas are the exact probabilities of each bin, close in on the gold curve e−x2/2. De Moivre found this in 1733; it is the first case of the central limit theorem.

II Buffon's needle

Buffon posed the question in 1733 and published its answer in 1777: how often does a needle dropped on a floor of parallel boards come to rest across a crack? For a needle as long as the boards are wide the answer is 2/π, so twice the number of needles, divided by the number that cross, estimates π by nothing but dropping things. Barbier's proof of 1860 needs no calculus: bend the needle or lengthen it, and the average number of crossings stays in proportion to its length; close it into a circle as wide as a board and it always crosses exactly twice.

Dropping needles
P=2L/πdNeedles of length L on boards of width d=L; the ones lying across a line turn gold. After 5000 needles, twice their number over the number of gold ones is within about a hundredth of π. The error shrinks only like 1/√N, so each further digit costs a hundred times as many needles.
Why π
x≤(L/2)sinθA needle makes an angle θ with the lines and has a distance x from its midpoint to the nearest line, and it crosses exactly when x≤(L/2)sinθ. Plotted as points (θ,x), the needles fill a rectangle evenly, and the gold ones fill the region under the sine curve: an area of L out of πd/2.
Buffon's noodle
E[crossings]=2L/πdBend the needles into noodles and some cross a line twice, or three times, and some not at all. The average does not move, because every short piece of a noodle is a small needle and averages add. Stretch the noodles to π times their length and the average rises to 2.
A circle
L=πd→2Close each noodle into a circle of diameter d. However it falls, a circle as wide as a board crosses the lines exactly twice, so the average for length πd is 2, and by proportion it is 2L/πd for any length: Buffon's answer, with no integral in sight.

III Bertrand's paradox

Joseph Bertrand posed this puzzle in 1889 to show that “at random” means nothing until you say how. A chord is longer than a side of the inscribed equilateral triangle exactly when its midpoint lies within half the radius of the centre. Choose the two endpoints at random and that happens a third of the time; choose a radius and a point along it, half the time; choose the midpoint anywhere in the disc, a quarter of the time. Each way paints its own texture of chords, gold where they are long. Throw straws on the table, long lines falling evenly in place and direction, and the chords they cut agree with the second way, for a circle of any size in any place. In the corner the chords are counted.

Random endpoints
P=(2π/3)/2π=1/3Choose one endpoint and turn the triangle so that a corner sits on it: the chord is longer than a side exactly when the other endpoint lands on the far third of the circle, the gold arc. Of sixteen hundred chords about a third are gold, and the rest crowd towards the rim.
Random radius
P=(r/2)/r=1/2Choose a radius, then a point on it at any distance with even chances, and draw the chord through that point at right angles to the radius. It is longer than a side when the point lies on the inner half, the gold half of the radius: half the time. These chords cover the disc evenly.
Random midpoint
P=π(r/2)2/πr2=1/4Choose the midpoint anywhere in the disc, evenly, and draw the chord it bisects. It is long when the midpoint falls inside the circle of half the radius, a quarter of the area. Most midpoints lie out towards the rim, so most chords are short and the middle of the picture thins out.
Throwing straws
dρdφ→P=1/2Throw straws on the table, lines falling in any place at any angle, and keep the chords they cut. Jaynes pointed out in 1973 that only one way of choosing is given by the same lines for every circle, wherever it is and whatever its size, and it is the second: half the chords are long, for the circle where it starts and wherever it goes.

IV Random walks

Start at a point of a grid and step up, down, left or right with equal chances. After n steps the walker is typically about √n away, so going ten times as far takes a hundred times as long. Seen from far off the path looks the same at every scale: this is Brownian motion, which Einstein used in 1905 to count molecules. Thousands of walkers spread as heat does, into a bell whose width grows like the square root of time. And a walk on a line, one step up or down at a time, is a fair game: on average it stays at zero, yet a single walk very often keeps to one side for nearly the whole time. In the corner the walkers are measured as they go.

One walker
Xn=ξ1+ξ2+⋯+ξnSix steps slowly on the grid, then faster and faster, up to a hundred thousand. The view draws back as the walk goes, so that √n steps always span the same distance on the screen, and the path looks alike at every size: the self-similarity of Brownian motion. Its colour runs from blue to gold with the logarithm of time.
A cloud
E|Xn|2=nFour thousand walkers set out from the centre together. Their mean square distance should equal the number of steps, and the corner measures how nearly it does; the cloud spreads like heat from a point: the gold glow beneath it is the solution of the heat equation, a bell whose variance grows in proportion to time. The dashed circle has radius √n.
Up and down
P(|Sn|≤√n)→0.683Walks on a line, drawn against time: 240 of them, 800 steps each, one step up or down at a time. They fan out against the blue curves ±√n and ±2√n, and once they are under way, about 68% of them are inside ±√n at any step, as for the bell curve of Plate I.
The arcsine law
P(T+/n≤x)→(2/π)arcsin√xColour each walk gold above zero and blue below. The game is fair, and yet the share of time a walk spends above zero is most likely to be nearly all or nearly none: its distribution, Lévy's arcsine law, is shaped like a U. In the limit 41% of walks spend more than nine tenths of their time on one side; here 104 of the 240 do.

V Percolation

Percolation asks what connects when the connections are random. On a square grid, open each bond with probability p, independently of the others. An infinite cluster appears exactly when p passes 1/2, as Kesten proved in 1980, and at p=1/2 itself the largest cluster is a fractal whose dimension, by universality, is 91/48. Here one set of random numbers serves every p: a bond carries a number u and is open once p passes it, so as p rises bonds only open and clusters only merge. The largest cluster is gold, the others take the colours of the wheel, brighter the larger they are. In the corner the bonds and the sites are counted.

Open bonds
P(open)=pp rises from 0 to 0.45 on a grid of 640×360 sites, whose middle 240×135 are in view. Clusters form and merge, but the largest holds only about a thousand sites, fewer than one in two hundred.
The threshold
pc=1/2From 0.45 to exactly 1/2. In the last few hundredths the largest cluster grows from about a thousand sites to more than a quarter of the grid and reaches from the top edge to the bottom. On an infinite grid this is the threshold itself: past it, and only past it, there is an infinite cluster.
Every scale
D=91/48Still at p=1/2, the view draws back from 240×135 sites to the whole grid. The gold cluster is full of holes of every size and looks much the same at each magnification: the critical cluster is a fractal, whose mass grows like L91/48 with the size L of the grid rather than like L2, a value that universality carries over from the triangular lattice, where it is proved.
Water through
θ(p)>0forp>1/2p goes on to 0.56 and water is let in along the top edge. It runs along the open bonds a step at a time and reaches the bottom after 518 steps. Above the threshold a positive share θ(p) of the sites belongs to the cluster that runs to infinity.