If you randomly drop needles onto a plane with parallel lines spaced a distance of 2 needles apart, the total number of needles over those that intersect a line approaches
This is a small project to learn and practice fascinating (geometric) probability theory, specifically Monte Carlo simulations.
Let’s say the needle has length
- For intersection, we care about the position
$x$ ($y$ in image) of the needle’s center and the angle$\theta$ . - The probability density of the center of the match is
$P_x = \frac{1}{\ell}$ - The probability density of the angle is
$P_\theta = \frac{2}{\pi}$ - The probability for the match to cross a line is given by the double integral
$P = \iint \bigl(P_x ,P_\theta\bigr),dx,d\theta$ - The condition for the match to cross the line is
$x < \frac{\ell}{2},\sin(\theta)$ - Therefore, the
$x$ integration bounds are from$0$ to$\frac{\ell}{2},\sin(\theta)$ , and the$\theta$ integration goes from$0$ to$\frac{\pi}{2}$ .
Following through with these integrals, we get:
Going back to the problem, if you drop
