# Calculate the nth moment given a joint density

Suppose a point has a random location in the circle of radius 1 around the origin. The coordinates $(X,Y)$ of the point have a joint density

$$f_{X,Y}(x,y) = \begin{cases}\frac{2}{\pi}(x^2+y^2)&\mathrm{\ if \ } x^2+y^2\le1\\ 0&\mathrm{\ otherwise\ }\end{cases}$$

Let $D$ be the distance from the random point to the center of the circle. How do I compute the $nth$ moment of $D$, $E(D^n)$, for $n = 1,2,...m$?

-
Are you sure you have copied this problem correctly, that is, are you sure the joint density is indeed a valid density function? Hint: use LOTUS, the Law of the Unconscious Statistician. – Dilip Sarwate Sep 28 '12 at 3:58

## 2 Answers

We have $D=\sqrt{X^2+Y^2}$, so the $n$-th moment of $D$ is the integral of $$(x^2+y^2)^{n/2}\left(\frac{2}{\pi}\right)(x^2+y^2)$$ over the unit disk. Thus we want to integrate $\displaystyle\frac{2}{\pi}\displaystyle(x^2+y^2)^{1+\frac{n}{2}}$ over the unit disk.

Change to polar coordinates.

-
Where did you get that first term? $(x^2+y^2)^{n/2}$? Or more precisely, why is it take to power $n/2$? – Denys S. May 15 '14 at 7:46
In general, if $W$ is a random variable, the $n$-th moment of $W$ is $E(W^n)$. So the $n$-th moment of $(X^2+Y^2)^{1/2}$ is the integral of $((x^2+y^2)^{1/2})^n f_{X,Y}(x,y)\,dx\,dy$ over the region where the joint density "lives.' – André Nicolas May 15 '14 at 7:53
Oh indeed, sorry I missed the sqrt in the D. Thank you. – Denys S. May 15 '14 at 8:01
No problem, you are welcome. It gave me the chance to notice and fix a "typo," I had $x^2+y^2$ where I meant $X^2+Y^2$. – André Nicolas May 15 '14 at 12:34

For every $0\leqslant x\leqslant1$, $\mathrm P(D\leqslant x)=\int\limits_0^{2\pi}\int\limits_0^x(2/\pi)r^2\cdot r\mathrm dr\mathrm d\theta=\int_0^x4r^3\mathrm dr$ hence the density $f_D$ of $D$ is such that $f_D(x)=4x^3\cdot \mathbf 1_{0\leqslant x\leqslant1}$.

In particular, $\mathrm E(D^n)=\int\limits_0^1x^n\cdot f_D(x)\mathrm dx=\int\limits_0^14x^{n+3}\mathrm dx=4/(n+4)$.

One can note that $D^4$ is uniform on $(0,1)$.

-