# Uniform distribution on surface of sphere (possible mistake in my proof)

Say $$X,Y,Z$$ are iid Std Normal RVs. I'm interested in finding the joint distribution of $$X/\sqrt{X^2+Y^2+Z^2}$$, $$Y/\sqrt{X^2+Y^2+Z^2},Z/\sqrt{X^2+Y^2+Z^2}$$. Various other questions and answers on tell me that this will follow Uniform distribution on the surface of sphere. To verify this, I tried to first transform to spherical coordinates and then set $$r=1$$. As we all know, the joint distribution of $$X,Y,Z$$ is

$$f(X,Y,Z)=\frac1{(2\pi)^{3/2}}e^{-(x^2+y^2+z^2)/2}$$

To verify the claim, I set $$x=r\sin\theta\cos\phi, y=r\sin\theta\sin\phi, z=r\cos\theta$$. The determinant of the jacobian is $$r^2\sin\theta$$. Hence $$f(r,\theta,\phi)=\frac{r^2|\sin\theta|}{(2\pi)^{3/2}}e^{-r^2/2}$$ Integrating the $$r$$ out in order to obtain joint distribution of just $$\theta$$ and $$\phi$$, we obtain $$f(\theta,\phi)=|\sin(\theta)|/4\pi$$. Clearly, this is not the distribution of uniform distribution on the surface of unit sphere. Where am I going wrong?

• math.stackexchange.com/questions/1864519/… Commented Feb 7, 2021 at 19:52
• @lmaosome I had seen that before, my only problem with that answer was the magical "surface area" measure. I wanted to explicitly show all steps. The series of steps I've done above work for 2D case but seem to fail in 3D case Commented Feb 7, 2021 at 19:57

Consider the density of uniform distribution of unit sphere: $$f(x,y,z) = \frac1{4\pi}\mathbb I_{[x^2+y^2+z^2=1]}$$ Now perform the same substitution, so that we'll have the same Jacobian, and the density becomes $$f(r,\theta,\phi)=\frac{r^2|\sin\theta|}{4\pi}\mathbb I_{[r=1]}$$ Integrating out $$r$$, you get the same density as yours.