# Covariance matrix of uniform spherical distribution

I need to figure out the covariance matrix of a uniform spherical distribution. But there I can't even find a closed form of the distribution. This link says it is $\frac{1}{n}\mathbf{I}$, where $\mathbf{I}$ is the $n \times n$ identity matrix. But can someone please help me derive it? Or even point to literature on how to?

Thanks!

p.s. By uniform spherical distribution, yes, I meant the unit sphere on $\mathbb{R}^n$, that is $S^{n-1} = \{ s \in \mathbb{R}^n : |s| = 1 \}$.

• The spherical symmetry immediately implies all marginals are uncorrelated and have equal covariances, reducing the problem to calculating the variance of a single marginal. But first, could you clear something up? What is $n$ and what precisely do you mean by a "uniform spherical distribution"? Is this uniform on the unit ball in $\mathbb{R}^n$ or on the unit sphere (in $\mathbb{R}^n$, presumably)? I think it's the latter, because (by definition) the sum of squares equals $1$, immediately implying the expected sum of squares of one marginal is $1/n$ and that's the variance you seek.
– whuber
Feb 13, 2012 at 23:56
• What's the purpose? Feb 4, 2016 at 19:48

According to @whuber's answer posted here, the spherical distribution is best seen as

$$\left( Y_1 = \frac{X_1}{\sqrt{X_1^2+...+X_n^2}}, ... , Y_n = \frac{X_n}{\sqrt{X_1^2+...+X_n^2}}\right)$$

where all the $X_i$ are independent Gaussian $(0,1)$.

If $(Y_1, ..., Y_i, ... Y_n)$ is uniform on the unit sphere, then so is $(Y_1, ..., -Y_i, ... Y_n)$, so they have the same distribution. In particular this implies that $E(Y_i)=-E(Y_i)$ and also that $E(Y_iY_j) = - E(Y_iY_j)$ for all $j \neq i$. Therefore the means and the covariance terms are equal to 0, as mentions @whuber in the comments.

For the variance, notice that

$$E \left( Y_1^2 \right) + ... + E \left( Y_n^2 \right) = E \left( Y_1^2 + ... + Y_n^2 \right) = 1.$$

For reasons of symmetry, the $Y_i$ are obviously exchangeable (but not independent), so that $E \left( Y_1^2 \right) = ... = E \left( Y_n^2 \right)$ and thus each of them is equal to $1/n$.

Im summary, the variance terms are equal to $1/n$ and the covariance terms are equal to $0$, so the covariance matrix is $\frac{1}{n} \mathbf{I}$. This is a great example of uncorrelated dependent variables (for example if $Y_1 = 1$ then all other values have to be $0$).

• (+1) As the first part of your answer shows, that the means and covariances are zero follows from something even more basic than spherical symmetry. A couple of other notes: (1) For the mean, it appears you're using the fact that $\sum_i Y_i^2 = 1$ almost surely, but that might not be clear to other readings. (2) Regarding the variance, an alternative argument to that of symmetry is that $Y_i^2 \sim \mathrm{Beta}(1/2,(n-1)/2)$, from which the result also follows. Jun 17, 2012 at 15:41
• Thanks @cardinal for the Beta trick. I would have missed it completely. Jun 17, 2012 at 15:47
• There is a fatal flaw with the proof of $E(Y_iY_j) =0.$ Even though $Y_i$ has the same distribution as $-Y_i$, the claim $E(Y_iY_j) = - E(Y_iY_j)$ is only true when $Y_i$ and $Y_j$ are independent, which is exactly what you're trying to prove (try $i=j$ for a contradiction). Thus this is a circular argument. Apr 13, 2015 at 10:21
• @Robert You might have misunderstood the logic. This answer does not assert that $E(Y_i)=-E(Y_i)$ implies $E(Y_iY_j)=-E(Y_iY_j)$. It only says ("... and also that...") that the symmetry used to show the first statement works just as well to demonstrate the second statement.
– whuber
Apr 13, 2015 at 15:55
• thanks, I understand your point. The random vectors $(Y_1, \ldots, Y_i, \ldots, Y_n)$ and $(Y_1, \ldots, -Y_i, \ldots, Y_n)$ must have the covariance matrix. Apr 14, 2015 at 16:47