aidoesscience
aidoesscience › Buffon · π
Validating · validations

Buffon's needle · Monte-Carlo π simulation

Can pure randomness measure π? Drop needles on a ruled floor and count how often they cross a line.

▶ Run the simulationSee the measured result

Known value
3.1415927

Units: dimensionless (π, a constant of pure geometry; the crossing probability 2L/(πd) is the only place π appears in the physics, and the recovery is arranged so it appears nowhere in the sampling)

How the lab tests it

Drop N needles of length L on a floor ruled with lines spaced d apart (L < d): each needle's centre-to-line distance and angle are uniform, so the crossing probability integrates to P = 2L/(πd). Tally the crossings and invert: π̂ = 2L/(d·P̂). A separate experiment runs 200 independent estimates at each N to measure the estimator's RMS error.

What it checks

π recovered from a crossing tally (π̂ = 2L/(d·P̂)); and the universal Monte-Carlo convergence rate — the RMS error falling as N^(−1/2) (halving the error costs 4× the samples), the same √N law that makes Monte-Carlo integration slow but dimension-blind

This simulation has a catalogued, oracle-checked result: Buffon's needle measures π NON-CIRCULARLY.