Library · Geometric Probability · Chapter 13

Expected distance between two points on a circle

Revised Report an error

Problem 13.1

Let PP and QQ be two points chosen independently and uniformly on a circle of radius rr. What is the expected distance E[∣PQ∣]\mathbb{E}[|PQ|]?

Solution. Parametrise PP and QQ by angles α,β\alpha, \beta independently uniform on [0,2π)[0, 2\pi). The chord length between them is ∣PQ∣=(rcos⁡α−rcos⁡β)2+(rsin⁡α−rsin⁡β)2=r2−2cos⁡(α−β)=2r∣sin⁡α−β2∣.\begin{align*} |PQ| &= \sqrt{(r\cos\alpha - r\cos\beta)^2 + (r\sin\alpha - r\sin\beta)^2} \\ &= r \sqrt{2 - 2\cos(\alpha - \beta)} = 2 r \left| \sin \tfrac{\alpha - \beta}{2} \right|. \end{align*}

Let ϕ=α−β(mod2π)\phi = \alpha - \beta \pmod{2\pi}; by the standard change-of-variable for circular uniform random variables, ϕ\phi is uniform on [0,2π)[0, 2\pi). Then E[∣PQ∣]=E ⁣[2r∣sin⁡ϕ2∣]=2r2π∫02πsin⁡ϕ2 dϕ,\mathbb{E}[|PQ|] = \mathbb{E}\!\left[2 r \left|\sin \tfrac{\phi}{2}\right|\right] = \frac{2r}{2\pi} \int_0^{2\pi} \sin \tfrac{\phi}{2} \, d\phi, using sin⁡(ϕ/2)≥0\sin(\phi/2) \geq 0 on [0,2π][0, 2\pi]. The integral equals [−2cos⁡(ϕ/2)]02π=2−(−2)=4[-2 \cos(\phi/2)]_0^{2\pi} = 2 - (-2) = 4, so E[∣PQ∣]=2r2π⋅4=4rπ.■\boxed{\mathbb{E}[|PQ|] = \frac{2r}{2\pi} \cdot 4 = \frac{4r}{\pi}.} \qedhere

For the unit circle (r=1r = 1) this gives E[∣PQ∣]=4/π≈1.273\mathbb{E}[|PQ|] = 4/\pi \approx 1.273. 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
Report an error on this page

Reports are stored by Netlify. See the privacy note.