Library · Geometric Probability · Chapter 13
Expected distance between two points on a circle
Problem 13.1
Let and be two points chosen independently and uniformly on a circle of radius . What is the expected distance ?
Solution. Parametrise and by angles independently uniform on . The chord length between them is
Let ; by the standard change-of-variable for circular uniform random variables, is uniform on . Then using on . The integral equals , so
For the unit circle () this gives . This is the expected length of a “random chord” under the convention that both endpoints are chosen uniformly on the circle’s boundary.
import numpy as np
theta = np.random.rand(2, 10**7) * 2*np.pi
chord = 2 * np.abs(np.sin((theta[0] - theta[1]) / 2))
print(f"sim: {chord.mean():.5f} exact: {4/np.pi:.5f}")
# sim: 1.27298 exact: 1.27324