Library · Geometric Probability · Chapter 28

Two random unit vectors on a sphere

Revised Report an error

Problem 28.1

Let u\mathbf{u} and v\mathbf{v} be two independent uniformly-distributed unit vectors on the sphere S2⊂R3S^2 \subset \mathbb{R}^3. What is the expected value of ∣u⋅v∣|\mathbf{u} \cdot \mathbf{v}|?

Solution. By rotational symmetry, we may condition on v\mathbf{v} and assume, without loss of generality, that v=(0,0,1)\mathbf{v} = (0, 0, 1). Then u⋅v=u3\mathbf{u} \cdot \mathbf{v} = u_3, the third coordinate of u\mathbf{u}.

For u\mathbf{u} uniformly distributed on S2S^2, its third coordinate u3u_3 has a well-known distribution: u3u_3 is uniform on [−1,1][-1, 1]. This is the content of Archimedes’s hat-box theorem — the sphere’s “height” coordinate has uniform density with respect to Lebesgue measure on the interval. (Equivalently: the vertical strip {u∈S2:h≤u3≤h+dh}\{ \mathbf{u} \in S^2 : h \leq u_3 \leq h + dh \} has the same area for every h∈[−1,1]h \in [-1, 1], namely 2π dh2\pi \, dh.)

With u3∼Uniform⁡[−1,1]u_3 \sim \operatorname{Uniform}[-1, 1], the expected absolute value is E[∣u3∣]=∫−11∣t∣⋅12 dt=∫01t dt=12.\mathbb{E}[|u_3|] = \int_{-1}^{1} |t| \cdot \tfrac12 \, dt = \int_0^1 t \, dt = \tfrac12. Therefore E[∣u⋅v∣]=12.■\boxed{\mathbb{E}[|\mathbf{u} \cdot \mathbf{v}|] = \tfrac12.} \qedhere

The result is a clean one-line consequence of Archimedes’s hat-box theorem, with no heavy calculation. In contrast, the two-dimensional analogue — u,v\mathbf{u}, \mathbf{v} iid uniform on the unit circle S1S^1 — gives E[∣u⋅v∣]  =  E[∣cos⁡Θ∣]  =  2π,\mathbb{E}[|\mathbf{u} \cdot \mathbf{v}|] \;=\; \mathbb{E}[|\cos \Theta|] \;=\; \frac{2}{\pi}, where Θ=\Theta = angle between them is uniform on [0,π][0, \pi]. The appearance of π\pi in 2D versus the rational 12\tfrac12 in 3D is a consequence of the different angular Jacobian on the circle (dθ/2πd\theta / 2\pi) versus on the sphere (hat-box: uniform on height).

import numpy as np
# Uniform on S^2 via normalised Gaussian
u = np.random.randn(3, 10**7); u /= np.linalg.norm(u, axis=0)
v = np.random.randn(3, 10**7); v /= np.linalg.norm(v, axis=0)
dots = np.abs((u*v).sum(axis=0))
print(f"sim: {dots.mean():.5f}   exact: 0.5")
# sim: 0.49989   exact: 0.5
Report an error on this page

Reports are stored by Netlify. See the privacy note.