Hundreds of hard discs bounce in a box, colliding perfectly elastically — every collision conserving momentum and energy exactly, just like Newton's Cradle. Start them however you like: all the same speed, a fast few among the slow. Let them go, and the speed histogram relaxes by itself to one fixed bell-shaped curve — the Maxwell–Boltzmann distribution. Order, distilled out of nothing but random collisions. This bench reads the gas's temperature off its own jiggling and asks, every frame: does the live histogram actually fit the curve thermodynamics predicts?
Colour is speed — slow & cold to fast & hot. Energy is conserved exactly; only its sharing-out changes.
Bars = the live histogram of disc speeds. The smooth curve is the
Maxwell–Boltzmann prediction f(v) = (v/T)·e−v²/2T
for the temperature T read off the gas itself — nothing is fitted. The verdict below
is a real Pearson χ² goodness-of-fit test.
Try “All one speed” and watch the spike collapse into the bell over a few seconds — the χ² verdict flips from REJECTED to fits as equilibrium arrives. That flip is the second law made visible.
No disc is told what speed to take. Each collision just swaps momentum with whatever it hits — yet the population of speeds always settles onto the same curve. The fast ones are statistically more likely to give energy away than to gain it, the slow ones the reverse, until the flow balances. The shape is the most probable way to share a fixed total energy among many particles: maximum entropy.
In two dimensions each velocity component vₓ, v_y is an independent Gaussian,
so the speed v=√(vₓ²+v_y²) follows
f(v) = (m·v/kT)·e−mv²/2kT — rising from zero, peaking at
v=√(kT/m), with a long warm tail. (The familiar 3-D Maxwell curve has an extra
v.) Equipartition fixes the link: ⟨½mv²⟩ = kT in 2-D, one
½kT per degree of freedom.
It would be easy to draw a curve that looks right. Instead this bench measures the
gas's temperature from ⟨½mv²⟩, draws the M–B curve that temperature
demands, then runs a real χ² goodness-of-fit against the live bars. At
equilibrium it does not reject. A frozen delta-spike is rejected — the test has
teeth. The self-test up top proves both, plus exact conservation, on synthetic data.