Normalized vector of Gaussian variables is uniformly distributed on the sphere [duplicate]

Solution 1:

The two word answer is "polar coordinates".

In more detail, let $f:S^{n-1}\to\Bbb R$ be a continuous function. Then $$ \eqalign{ \Bbb E[f(X)] &=\int_{\Bbb R^n}f(x_1/z,\ldots,x_n/z)(2\pi)^{-n/2}e^{-z^2/2}\,dx_1\cdots dx_n\cr &=(2\pi)^{-n/2}\int_0^\infty\left[\int_{S^{n-1}} f(u)\,\sigma_{n-1}(du)\right]e^{-r^2/2}r^{n-1}\,dr\cr &=c_n\int_{S^{n-1}} f(u)\,\sigma_{n-1}(du).\cr } $$ Here $\sigma_{n-1}$ is the "surface area" measure on the sphere $S^{n-1}$ and $$ c_n=(2\pi)^{-n/2}\int_0^\infty e^{-r^2/2}r^{n-1}\,dr = \pi^{-n/2}2^{-1}\Gamma(n/2). $$ (Thus $2\pi^{n/2}/\Gamma(n/2)$ is the surface area of $S^{n-1}$.)