Drop a needle of length L randomly onto a floor of parallel lines spaced d apart. The probability that the needle crosses a line is 2L / (πd) — provably so by Buffon in 1733. Run the simulation and count crossings: the ratio 2L · drops / (d · crossings) approaches π out of thin air.
y ≤ (L/2)·sin θ. The probability is the area of {(y, θ) : y ≤ (L/2)·sin θ} divided by the rectangle's area:
P = (1/(πd/2)) · ∫₀^π (L/2)·sin θ dθ = (2/(πd)) · L
sin θ over a half-cycle — and the half-cycle has length π by definition. Solving for π: π ≈ (2L · drops) / (d · crossings). Mario Lazzarini (1901) claimed to estimate π to six decimals from 3408 needles. Probably cheated. Without cheating, you'd need about 4 million drops to nail 4 digits — the convergence rate is 1/√N.