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
Let $|z|\le r$. The probability that $R\in[r,r+dr]$, $Z\in [z,z+dz]$ is $\frac{3}{4\pi}$ (total volume$^{-1}$) times the volume of the corresponding set. The latter is a belt cut from the sphere of radius $r$ and thickness $dr$ by the plane $Z=z$ of thickness $dz$. The volume is equal to the area of the corresponding spherical belt, i.e. $2\pi \sqrt{r^2-z^2} \cdot dz$ times the "height" of this belt, which, by simple geometry, is equal to $\frac{r\, dr}{\sqrt{r^2-z^2}}$ (I hope the picture explains it well); so the volume is $2\pi r\cdot dr\,dz$. Thus, the probability is $\frac{3r}{2}dr\,dz$, which confirms your formula for density.