Expected Arc Length Between Random Points on a Sphere
Two points are chosen uniformly at random on the surface of the unit sphere in $\mathbb{R}^3$. Let $\theta$ be the great-circle (arc) distance between them, i.e., the central angle separating the two points, with $0 \le \theta \le \pi$.
What is $E[\theta]$?
Hints
- By rotational symmetry you may fix the first point at the north pole; then $\theta$ is just the polar angle of the second point. Shortcut worth trying first: what does replacing the second point by its antipode do to $\theta$, and what does that force $E[\theta]$ to be?
- Archimedes' hat-box theorem: the sphere's surface area between heights $z$ and $z + dz$ is $2\pi \, dz$, independent of $z$. What does that say about the distribution of $Z = \cos\theta$?
- With $\cos\theta \sim U[-1,1]$, the density of $\theta$ is $\frac{1}{2}\sin\theta$ on $[0, \pi]$, so you need $\frac{1}{2}\int_0^{\pi} \theta \sin\theta \, d\theta$. Integration by parts with $v = \theta$, $dw = \sin\theta \, d\theta$ finishes it.
Worked Solution
How to Think About It: The interview-winning move here is a symmetry trick that needs zero integration. Fix the first point $\mathbf{u}$ and let $\mathbf{v}$ be the second. If $\mathbf{v}$ is uniform on the sphere, so is its antipode $-\mathbf{v}$ (the antipodal map is an isometry of the sphere). But the angle from $\mathbf{u}$ to $-\mathbf{v}$ is exactly $\pi - \theta$. So $\theta$ and $\pi - \theta$ have the same distribution, which forces $E[\theta] = \pi - E[\theta]$, i.e. $E[\theta] = \pi/2$. Lead with this in an interview -- then be ready to back it up with the honest integral below, because the standard follow-up is "prove the distribution facts you just used."
Quick Estimate: $\theta$ lives in $[0, \pi]$. A naive "uniform angle" guess gives mean $\pi/2 \approx 1.57$. The true density is not uniform -- it is $\tfrac{1}{2}\sin\theta$, peaked at the equator ($\theta = \pi/2$), because a band of the sphere near the equator has more surface area than an equal-width band near a pole. But $\sin\theta$ is symmetric about $\pi/2$ on $[0, \pi]$: the extra weight sits exactly at the center of the interval, so it does not move the mean. Estimate: $3.14 / 2 = 1.57$, and we expect it to be exact.
Approach: Route 1 (symmetry): the antipodal map gives $E[\theta] = \pi/2$ in two lines. Route 2 (direct): fix the first point at the north pole, prove the key fact $\cos\theta \sim U[-1,1]$ (Archimedes' hat-box theorem), get the density of $\theta$, and integrate. We show both.
Formal Solution:
*Route 1 -- antipodal symmetry (no integration).* Condition on the first point $\mathbf{u}$. The second point $\mathbf{v}$ is uniform on the sphere, and $-\mathbf{v}$ is also uniform (the map $\mathbf{v} \mapsto -\mathbf{v}$ preserves surface area). Since $\mathbf{u} \cdot (-\mathbf{v}) = -\cos\theta$, the central angle from $\mathbf{u}$ to $-\mathbf{v}$ is $\arccos(-\cos\theta) = \pi - \theta$. Hence $\theta$ and $\pi - \theta$ are equal in distribution, so
$$E[\theta] = E[\pi - \theta] = \pi - E[\theta] \quad\Longrightarrow\quad \boxed{E[\theta] = \frac{\pi}{2}}$$
*Route 2 -- direct integration (and why $\cos\theta \sim U[-1,1]$).*
Step 1: Reduce to one random point. By rotational invariance, condition on the first point and rotate it to the north pole $(0, 0, 1)$. The second point is still uniform, $\theta$ is now its polar angle, and $\cos\theta = Z$, its $z$-coordinate.
Step 2: $Z \sim U[-1,1]$ (Archimedes' hat-box theorem). The band of the sphere with polar angle in $[\theta, \theta + d\theta]$ is a ring of radius $\sin\theta$ and width $d\theta$, so its area is
$$dA = 2\pi \sin\theta \, d\theta.$$
Meanwhile $z = \cos\theta$ gives $|dz| = \sin\theta \, d\theta$, so $dA = 2\pi \, |dz|$: a slab of height $dz$ carries the same area no matter where it sits on the sphere. Dividing by the total area $4\pi$, the density of $Z$ is the constant $\tfrac{1}{2}$ on $[-1, 1]$ -- uniform.
Step 3: Density of $\theta$. From $dA / 4\pi$ directly,
$$f_\theta(\theta) = \tfrac{1}{2} \sin\theta, \qquad 0 \le \theta \le \pi.$$
Step 4: Integrate. Using integration by parts with $v = \theta$, $dw = \sin\theta \, d\theta$ (so $w = -\cos\theta$):
$$\int_0^{\pi} \theta \sin\theta \, d\theta = \bigl[-\theta \cos\theta\bigr]_0^{\pi} + \int_0^{\pi} \cos\theta \, d\theta = (\pi - 0) + \bigl[\sin\theta\bigr]_0^{\pi} = \pi + 0 = \pi.$$
Therefore
$$E[\theta] = \tfrac{1}{2} \int_0^{\pi} \theta \sin\theta \, d\theta = \boxed{\frac{\pi}{2} \approx 1.5708}$$
Sanity check (simulation): with $2 \times 10^7$ random point pairs, the sample mean of $\theta$ is $1.5709$, and $\cos\theta$ has sample mean $\approx 0$ and variance $\approx 1/3$ -- exactly the moments of $U[-1,1]$.
Answer: $E[\theta] = \dfrac{\pi}{2} \approx 1.5708$. On the unit sphere the arc length equals the central angle, so the expected arc length is $\pi/2$.
Intuition
The answer $\pi/2$ -- dead center of $[0, \pi]$ -- is forced by symmetry, not coincidence. The antipodal map $\mathbf{v} \mapsto -\mathbf{v}$ preserves the uniform distribution and sends $\theta$ to $\pi - \theta$, so the distribution of $\theta$ is symmetric about $\pi/2$ and the mean must sit there. Equivalently: the density $f(\theta) = \tfrac{1}{2}\sin\theta$ is symmetric about $\pi/2$.
A subtlety worth being able to articulate: writing $E[\theta] = \arccos(E[\cos\theta]) = \arccos(0)$ is NOT a valid step in general -- $\arccos$ is nonlinear, so Jensen-type gaps are expected. It happens to give the right value here because $\arccos$ has the point symmetry $\arccos(-u) = \pi - \arccos(u)$: with $U = \cos\theta$ distributed symmetrically about $0$, the nonlinear distortion above $u = 0$ exactly cancels the distortion below it.
Two takeaways that travel well. First, Archimedes' hat-box theorem -- the projection of a uniform point on the sphere onto any axis is $U[-1,1]$ -- is the workhorse fact behind most sphere problems. Second, before integrating anything, look for a measure-preserving map (reflection, antipode, rotation) that turns your quantity $X$ into $c - X$; if you find one, $E[X] = c/2$ for free. Common follow-up: the expected straight-line (chord) distance is $E[2\sin(\theta/2)] = 4/3 \approx 1.333$, which is shorter than the arc $\pi/2 \approx 1.571$ -- a quick check that you know the difference between chord and arc.