Let B be a 3-dimensional ball of radius r. Find the average distance from a point in B to its center. 
Let B be a 3-dimensional ball of radius r. Find the average distance from a point in B to its center.

So I know that the distance from the point to the center is defined by a function, and I just need to find the average value of this function, correct? But I don't know where to go from here. Any help would be appreciated, thanks.
 A: Spherical coordinates are the natural choice for integrating in. The integral for the total distance, before dividing by the sphere's volume, is
$$\int_0^{2\pi}\int_0^\pi\int_0^R r\cdot r^2\sin\theta\,dr\,d\theta\,d\phi$$
$$=\int_0^{2\pi}\int_0^\pi\int_0^R r^3\sin\theta\,dr\,d\theta\,d\phi$$
$$=\frac{R^4}4\int_0^{2\pi}\int_0^\pi \sin\theta\,d\theta\,d\phi$$
$$=\frac{R^4}2\int_0^{2\pi}1\,d\phi$$
$$=\pi R^4$$
The average distance is then this divided by the ball's volume:
$$\frac{\pi r^4}{(4/3)\pi r^3}=\color{blue}{\frac{3r}4}$$
A: This is just another interpretation of Parcly Taxel's answer in a probabilistic way. 
Let $R$ be the radius of the ball. Consider $f(x)$ as a probability density function of the distances $D$ from a point in $B$ to its center. Then the probability that $D\leq r$ is 
$$
\begin{align}
P(D\leq r)&= \frac{ \frac 43 \pi r^3 }{\frac 43 \pi R^3}=\frac {r^3}{R^3}, \ \ \ 0\leq r\leq R. 
\end{align}$$
Then by differentiating it, we obtain the probability density function $f(x)$. 
$$
\frac{d}{dr} P(D\leq r)= \frac{3r^2}{R^3}, \ \ \ 0\leq r\leq R.
$$
The average of the distance from a point in $B$ to its center is the expected value in this distribution. 
$$
\mathbf{E}(D)=\int_0^R \frac{3r^3}{R^3} dr = \frac34 R. 
$$
