What is the probability that a needle will fall on a line when it is dropped randomly on a floor with a pattern of equally spaced parallel lines?

The answer is $\frac{2L}{D\pi}$ , where D is the distance between two adjacent lines, and L is the length of the needle (L<D).

As this formula involves $\pi$ , this leads to an experimental way of estimating its value.

The formula stays the same even when you bend the needle in any way you want (as long as the needle can still lay flat) - this problem is called Buffon's noodle!!!

An extension is to find the probability that the needle will fall on a line when dropped randomly on a floor with a square grid lattice.

The formula's fine, but as a method of estimating $\pi$ it's atrocious. Simple analysis shows that thousands of millions of drops are needed to get just a few decimal places of accuracy. In principle it's fine, but in practice it's exceedingly inefficient.