logoalt Hacker News

gowldtoday at 1:49 AM1 replyview on HN

Why is the simulation always exactly 2 for a closed polygon, but has error for the almost-full circle?

I think it's because only the closed polygon is totationally symmetric, so you don't get errors from the edge case at the edge of the finite sample space. But I'm not sure.

The illustration is missing the more interesting visualization of how linearity of expectation applies to all possible rotations and translations of all segments of the needle/noodle. Each noodle is equivalent to a curve of discs, like a string of pearls. And those pearls do not even need to be connected!


Replies

_alternator_today at 2:58 AM

The simulation is always 2 for the closed circle of width W. Actually if you run it enough, the simulation will occasionally end up not perfectly equal to 2 because it's a 50 sided polygon, not a true circle. ;)

But for a perfect circle of diameter W, it will alway hit exactly two vertical lines.