Solution
Needle on a Grid
Show the problem again
A floor is ruled into unit squares by two families of parallel lines (a square grid with spacing 1). A needle of length 1 is dropped at random: its centre is uniform over a tile and its direction is uniform, independent of the centre. What is the probability that the needle crosses at least one grid line? Give an exact closed form, or a decimal rounded to 4 places.
Worked solution
The answer is 3/π ≈ 0.9549. Let φ be the angle between the needle and the horizontal. Its horizontal projection has length |cos φ| and its vertical projection |sin φ|. Given φ, the needle crosses a vertical line with probability |cos φ| (the centre's x-coordinate must be within |cos φ|/2 of a line), and a horizontal line with probability |sin φ|; these are independent given φ because the centre's two coordinates are independent. So P(no crossing | φ) = (1 − |cos φ|)(1 − |sin φ|), and averaging over φ uniform, P(cross) = E|cos φ| + E|sin φ| − E|cos φ sin φ| = 2/π + 2/π − 1/π = 3/π, using E|sin 2φ|/2 = 1/π. The first two terms are two copies of Buffon's 2/π; the correction subtracts double-counted crossings of both families.
Source: The Buffon-Laplace needle problem (Laplace, 1812). Statement written for AxiomIQ.