Probability density function for radius within part of a sphere I would like to find the probability density function for radius within a given section of a sphere.  For example, suppose I specify  $\pi / 4 < \theta < \pi / 3$ and $\pi /7 < \phi < \pi /5 $ and $1 < r < 4$.  If I select a point at random from within this region, what is the probability distribution of the resulting values?
 A: Define $V:[1,4]\rightarrow\mathbb{R}$ by
$$
V(r):=\int_{\pi/4}^{\pi/3}\int_{\pi/7}^{\pi/5}\int_1^r\rho^2\sin\phi\,d\rho\,d\phi\,d\theta.
$$
(Here, we have used the spherical coordinate transformation where $\rho$ is distance to the origin, $\theta$ is the angle formed in the $(x,y)$-plane, and $\phi$ is measured down from the positive $z$-axis.  If you've used $\phi$ and $\theta$ differently, as sometimes happens, just adjust accordingly.)
Then the volume of your entire region is $V(4)$.  Now, assuming you select your point uniformly at random in the sphere, the cumulative distribution function for the radius $R$ of the point in question is
$$
F_R(r):=P(R\leq r)=\begin{cases}0 & \text{if }r\leq 1\\ V(r)/V(4) & \text{if }1< r\leq 4\\1 & \text{if }r>4\end{cases}
$$
To find the density from this, just differentiate! You will use the fact that, by the Fundamental Theorem of Calculus, 
$$
V'(r)=\int_{\pi/4}^{\pi/3}\int_{\pi/7}^{\pi/5}r^2\sin\phi\,d\phi\,d\theta.
$$
A: Of course the probability that the radius of a randomly chosen point has a certain given value is zero. But we can sensibly talk about the probability density function $r\mapsto f_R(r)$ which is relevant in this example.
We are given a certain domain $A\subset S^2$ in terms of geographical angles, and the random point ${\bf x}$ in question has to satisfy ${\bf x}=r{\bf u}$ with  ${\bf u}\in A$ and $1\leq r\leq 4$. Let $|A|$ be the spherical area of the domain $A$.
Using Fubini's theorem we see that the volume of the set $S_r\subset{\mathbb R}^3$ of admissible points ${\bf x}$ with $|{\bf x}|\leq r$ is given by
$${\rm vol}(S_r)=|A|\int_1^r r^2\ dr={r^3-1\over 3}\>|A|\ ,$$
and the probability that $|{\bf x}|\leq r$ is given by
$$F(r):={{\rm vol}(S_r)\over{\rm vol}(S_4)}=
{r^3-1\over 63}\qquad(1\leq r\leq4)\ .$$
It follows that
$$f_R(r)={d\over dr}F(r)={r^2\over21}\qquad(1\leq r\leq 4)\ .$$
