# Covariance of points distributed in a n-ball

Is there a closed form expression for the covariance of a uniform distribution in a n-ball? I would like to develop a test for vector sums of points sampled from a uniform distribution in a n-ball. I need the covariance of the distribution to relate this to the CLT. I've taken a stab at it but I am not sure if I am correct.

Any pointers to statistics of uniform distributions in a n-ball would be very useful. Thanks.

• just to check I've understood the terminology: by an n-ball you mean all points in ${\mathbb R}^n$ whose distance from the origin is at most some fixed constant, right? – Yemon Choi Aug 11 '10 at 21:06
• (Not that there is anything wrong with your terminology, but I was momentarily uncertain whether you meant a $n$-polydisc.) – Yemon Choi Aug 11 '10 at 21:07
• I mean an n-dimensional sphere with points distributed uniformly within it. I don't mean a uniform distribution on the surface. – drfrank Aug 11 '10 at 21:47
• And sorry I wasn't clear earlier. :) – drfrank Aug 11 '10 at 21:48

## 1 Answer

The covariance is a multiple of the identity by simple symmetry considerations. For the constant, you just need, again by symmetry, and integration in spherical coordinates, $$\mathbb{E} X_1^2 = \frac{1}{n} \mathbb{E} |X|^2 = \frac{c}{n} \int_0^R r^{n-1} r^2 dr = \frac{c}{n(n+2)}R^{n+2},$$ where $R$ is the radius of your ball and $c$ is a constant depending on $n$ and $R$. To identify $c$, $$1 = c \int_0^R r^{n-1} dr = \frac{c}{n} R^n,$$ so $c = n/R^n$ and your covariance is $\frac{1}{n+2} R^2$ times the identity matrix. Hopefully I've included enough detail that if I've made an algebra mistake it will be easy for someone else to correct it, but I think I recognize that as the right answer.