Suppose we randomly place 2 points the 100-dimensional unit sphere. So we have $$x_1, x_2\in \mathbb{R}^{100}\quad\text{ and }\quad|x_1|=|x_2|=1$$

What's the expected value of the euclidian distance between them? $$E[|x_1 - x_2|]=\ ?$$ From just eyeballing some data, the answer looks like $\approx1.2$

And what about in general? So for 2 points on an n-dimensional sphere?


1 Answer 1


Eyeballing it, choose coordinates so that one point is at $\theta=0$. Then $\theta$ is the only relevant angular variable, and the length of the chord is $2\sin{(\theta/2)}$ so the integral should reduce to $$ \frac{\int_0^{\pi} 2\sin{(\theta/2)} \sin^{n-1}{\theta} \, d\theta }{ \int_0^{\pi} \sin^{n-1}{\theta} \, d\theta} = \frac{2\Gamma(n)\Gamma((n+1)/2)}{\Gamma(n/2)\Gamma(n+1/2)} = \frac{2^n [\Gamma((n+1)/2)]^2}{\sqrt{\pi}\Gamma(n+1/2)} $$ using various trigonometric and Gamma identities. For $n=100$, this gives a large fraction that is approximately $1.412$.

  • $\begingroup$ Thanks. After looking closely at my data points, I noticed they're all positive points. I figure that's where their mean distances look less than 1.4. Is there any easy modification to that equation for points with only positive coordinates? $\endgroup$
    – user377597
    Jul 21, 2017 at 23:43
  • $\begingroup$ Which is squared? $(n+1)/2$ or its gamma function? $\endgroup$ Jul 21, 2017 at 23:51
  • 1
    $\begingroup$ Unfortunately you lose the symmetry, so probably have to do the whole horrific $2n$-dimensional integral. $\endgroup$
    – Chappers
    Jul 21, 2017 at 23:52
  • $\begingroup$ See comment and link from dxiv above. $\endgroup$ Dec 16, 2020 at 4:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy