What p.d.f. over angles is equivalent to a uniform distribution over a hypersphere? Eric Weisstein's Sphere Point Picking points out that sampling uniformly from each angle $\phi$ and $\theta$ in spherical coordinates does not sample from the uniform sphere because it clusters near the poles. I am interested in which distribution over the angles does sample uniformly over the area element.
For the spherical case, he notes that the random variables $\phi$ and $\theta$ that do correspond to sampling from the uniform sphere are:
$\theta = 2\pi u \\
\phi = \cos^{-1}(2v -1)$
where $u$ and $v$ are random variables uniformly distributed over [0, 1].
I would like to know how this extends to n-dimensional hyperspheres. Is there a similar expression for the distribution of the angles $\boldsymbol{\theta}$ when sampling from a uniform hypersphere?
Very grateful for any help!
(I'm aware that there are simpler ways to sample from the unit hypersphere such as this. I'm specifically interested in the probability density function of the angles.)

If you're using hyperspherical coordinates, the area element of the $n$-sphere can be written $$ \sin^{n-1}(\phi_1)\sin^{n-2}(\phi_2)\ldots \sin(\phi_{n-1})d\phi_1\ldots d\phi_n$$ where $\phi_1,\ldots\phi_{n-1}$ range from $0$ to $\pi$ and $\phi_n$ ranges from $0$ to $2\pi.$
So this gives you the pdf's of the angles right there: $\phi_n$ is uniform, $\phi_{n-1}$ has a pdf proportional to $\sin(\phi_{n-1}),$ etc.
I don't see a particularly nice way to express the inverse CDF though, which is what you need to get the expression in terms of a uniform. For instance, the way it works for $\phi_{n-1}$ is that $$ F(\phi_{n-1}) = \frac{\int_0^{\phi_{n-1}}\sin(\phi_{n-1})d\phi_{n-1}}{\int_0^\pi \sin(\phi_{n-1})d\phi_{n-1}} = \frac{1}{2}(1-\cos(\phi_{n-1}))$$ which has inverse function $$F^{-1}(u) = \arccos(1-2u) $$ which agrees with what you were told for the polar angle in the three dimensional case.
But for $\phi_{n-2}$ we have $$ F(\phi_{n-2}) = \frac{\int_0^{\phi_{n-2}}\sin^2(\phi_{n-2})d\phi_{n-2}}{\int_0^\pi \sin(\phi_{n-2})d\phi_{n-2}} = \frac{1}{\pi}(\phi_{n-2}-\frac{1}{2}\sin(2\phi_{n-2}))$$ which doesn't have any nice inverse in closed form I'm aware of. That said, the CDFs all have closed forms an it is easy enough to invert them numerically.
