A point $(x,y,z)$ is picked uniformly at random inside the unit ball. Find the joint density function of $Z$ and $R$, where $R^2=X^2+Y^2+Z^2$.
First, I find the joint density of $Y$ and $Z$, that is $f_{Y,Z}(y,z)=\frac{3}{2\pi}\sqrt{1-y^2-z^2}$ with $Y^2+Z^2\leq R^2$. Let $Y=\pm\sqrt{R^2-Z^2}$ and $W=Z$. The Jacobin determinant is $$J=\begin{vmatrix}1&0\\\frac{R}{\sqrt{R^2-Z^2}}&\frac{Z}{\sqrt{R^2-Z^2}}\end{vmatrix}=R/\sqrt{R^2-Z^2}$$ Then, $$f_{R,Z}(r,z)=f_{Y,Z}(\sqrt{1-z^2},z)|J|=\frac{3\sqrt{1-(1-z^2)-z^2}}{4\pi}\left(\frac{r}{\sqrt{r^2-z^2}}\right)$$ I think I miss something. Can someone give me a hint or suggestion to work on this problem? Thanks
