Library · Geometric Probability · Chapter 24
Random chord longer than the side of a regular n-gon
Problem 24.1
For an integer , two points are chosen independently and uniformly on the unit circle, defining a chord. What is the probability the chord is longer than the side of the regular -gon inscribed in the circle?
Solution. A regular -gon inscribed in the unit circle has side length (by standard trigonometry: each side subtends a central angle of , so its length is ).
As in Chapter 13, let be the angular separation of the two endpoints; is uniform on . The chord length is , which is monotone on and symmetric about . The reduced angular separation is uniform on .
The chord exceeds iff , i.e., iff . The set has measure , so
Specialisations:
(equilateral triangle, side ): (Bertrand’s first sampling).
(square, side ): .
(hexagon, side radius): , recovering Chapter 15.
(side ): (the chord almost always exceeds a vanishing side).
This simple pattern is one of the cleanest families in classical geometric probability.
import numpy as np
for n in [3, 4, 6, 8]:
theta = np.random.rand(2, 10**6) * 2*np.pi
chord = 2 * np.abs(np.sin((theta[0]-theta[1])/2))
thresh = 2*np.sin(np.pi/n)
print(f"n={n}: sim={(chord>thresh).mean():.5f} exact={1 - 2/n:.5f}")
# n=3: sim=0.33415 exact=0.33333
# n=4: sim=0.50046 exact=0.50000
# n=6: sim=0.66734 exact=0.66667
# n=8: sim=0.75101 exact=0.75000