바늘을 던져 π를 잰다Measuring π by throwing needles
1777년 뷔퐁 백작이 낸 문제입니다. 바닥에 간격 D로 평행선을 긋고, 길이 L(≤ D)인 바늘을 아무렇게나 떨어뜨립니다. 바늘이 선에 걸칠 확률은 놀랍도록 단순하게 2L / (πD)가 됩니다. 여기 π가 들어있죠.
A problem posed by the Comte de Buffon in 1777. Rule a floor with parallel lines a distance D apart, and drop a needle of length L (≤ D) at random. The probability it crosses a line turns out to be startlingly simple: 2L / (πD). There sits π.
그러니 거꾸로, 바늘을 N개 던져 그중 C개가 선에 걸쳤다면, 걸칠 확률은 대략 C/N이고 π를 이렇게 추정할 수 있습니다:
So run it backward: toss N needles, count C that cross a line. The crossing probability is about C/N, and you can estimate π as:
아래에서 직접 바늘을 쏟아부어 보세요. 던질수록 추정값이 3.14159…로 기어갑니다. (여기선 편의상 L = D라 π ≈ 2N/C 입니다.)
Pour the needles down yourself below. The more you throw, the closer the estimate crawls to 3.14159… (here L = D for simplicity, so π ≈ 2N/C).
🪡 바늘을 던져 보기🪡 Throw the needles
왜 하필 π가 나올까?Why does π appear at all?
바늘 하나의 상태는 두 숫자로 정해집니다. 가장 가까운 선까지의 거리 y(0 ~ D/2 사이 균등)와 기울기 각도 θ(0 ~ π 사이 균등)죠. 바늘이 선에 걸치려면, 바늘의 세로 방향 뻗침이 그 거리보다 커야 합니다:
A single needle is fixed by two numbers: the distance y to the nearest line (uniform on 0 to D/2) and the tilt angle θ (uniform on 0 to π). It crosses a line when its vertical reach exceeds that distance:
이제 이 조건이 성립할 확률을 모든 각도 θ(0부터 π까지)에 대해 평균 내면 됩니다. 여기 핵심 사실 하나: sinθ를 0부터 π까지 쭉 더하면 정확히 2가 나옵니다(사인 한 봉우리 아래 넓이). 바로 그 2가 결과의 분자에 박히죠:
Now average this condition over all angles θ (from 0 to π). One key fact: adding sinθ up from 0 to π gives exactly 2 (the area under one hump of sine). That 2 is what lands in the numerator:
기호 풀이: ∫는 "쭉 더하라(적분)", 아래 0·위 π는 "θ를 0부터 π까지 훑어라", 앞의 1/π는 그 범위로 나눠 평균 내라는 뜻입니다. 핵심은 sinθ를 0부터 π까지 더하면 정확히 2가 된다는 것.
Notation: ∫ means "add it up (integrate)", the 0 below and π above mean "sweep θ from 0 to π", and the leading 1/π divides by that range to take the average. The key is that summing sinθ from 0 to π gives exactly 2.
1901년 라차리니는 바늘 3408개로 π ≈ 3.1415929를 얻었다고 발표했는데, 이는 355/113이라는 유명한 근사와 소수 여섯 자리까지 같습니다. 너무 정확해서 오히려 결과를 미리 알고 실험을 멈춘 것 아니냐는 의심을 삽니다. 우연이 만든 아름다움과, 그 우연을 조작하고 싶은 유혹이 함께 담긴 이야기죠.
In 1901 Lazzarini reported π ≈ 3.1415929 from 3,408 needles, matching the famous approximation 355/113 to six decimals. It was so accurate that many suspect he knew the answer and stopped when it looked good. A story that holds both the beauty made by chance and the temptation to nudge that chance.