I have many vectors $a_i\in\mathbb{R}^p:||a||=1,1\leq i \leq n$. I would like to test whether the $a_i$'s are randomly spread out on $S^{p-1}$ (the $p$ variate unit circle). Can anyone point to a test for that?

Thanks in advance,

  • 1
    $\begingroup$ How is what you're wanting to do different from a goodness-of-fit test that your data come from the uniform measure on the $S^{p-1}$ sphere? $\endgroup$
    – cardinal
    Jul 1, 2012 at 23:59
  • $\begingroup$ Could work. How would you test this in practice? $\endgroup$
    – user603
    Jul 2, 2012 at 7:41
  • $\begingroup$ I offer a diagnostic plot at stats.stackexchange.com/a/7984/919. $\endgroup$
    – whuber
    Nov 24, 2022 at 18:58

1 Answer 1


You could transform your data points to spherical coordinates so that you get $p-1$ angles. Your null hypothesis is equivalent to the fact that those angles are independent and uniformly distributed. So you can do a goodness of fit test.

Now there is the complication that you have a $p-1$-dimensional distribution. This paper shows a multidimensional version of the Smirnov statistic that may come in handy. Otherwise, another idea that comes to my mind woud be to scale the angles to $(0,1)$, apply the inverse erf function and do a test for multivariate normality.

Erratum: it is not true that the angles will be uniform as shown in this answer. One angle is uniform between $0$ and $2\pi$, and the cosine of the others is uniform between $-1$ and $1$.

  • $\begingroup$ in your second paragraph, by scaling the angles to 0-1, you mean dividing each component of the p-1 dimensional angle vector by pi? $\endgroup$
    – user603
    Jun 3, 2012 at 9:26
  • $\begingroup$ Depends on your parametrization. For example in 3D, spherical coordinates are usually given as an angle between $-\pi$ and $\pi$ (longitude) and another one between $-\pi/2$ and $\pi/2$ (latitude). For longitude add $\pi$ and divide by $2\pi$ and for latitude add $\pi/2$ and divide by $\pi$. $\endgroup$
    – gui11aume
    Jun 3, 2012 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.