# Moment and integral equality

I try to solve the following: Let $X$ be a random variable on $[0,\infty)$. Show for $n\geq 1$ $$E(X^n)=\int\limits_0^\infty nx^{n-1}P(X>x)dx$$ With convention that $E(X^n)=\infty$ if it does not exist.

I try to solve this with Tonelli-Fubini $$n\int\limits_0^\infty x^{n-1}P(X>x)dx=n\int\limits_0^\infty x^{n-1}\left( \int\limits_{x}^\infty f(t) dt \right) dx$$

$$=n \int\limits_{x}^\infty f(t) \left( \int\limits_0^\infty x^{n-1} dx \right) dt$$

I also thought maybe I can integrate over the lower bound of $P(X>x)$ meaning to change $s=x$

$$n\int\limits_0^\infty x^{n-1}P(X>x)dx=n\int\limits_0^\infty x^{n-1}\left( \int\limits_{-\infty}^x \frac{d}{ds}P(X>s) ds \right) dx$$

$$=n \int\limits_{-\infty}^x \frac{d}{ds}P(X>s) \left( \int\limits_0^\infty x^{n-1} dx \right) ds$$

But I don't know how to handle the limits of the integral and if it is the correct way. I saw this equality on Wikipedia but it seems it has no name.

Thanks for help.

• Note that the integration limit set by you is $0 < x < t < \infty$. You always choose the tightest bound for the most inner integral; and remove the variable once it is integrated. So you have $x < t < \infty, 0 < x < \infty$ before exchanging the order of integration. Can you see the limit now after it? – BGM Apr 7 '16 at 18:05
• Hi BGM, what do you mean by tightest bound? – Matriz Apr 7 '16 at 18:25
• when you are integrating with respect to $t$ first, you have the bound $x < t < \infty$ which is the "tightest" (where $0 < t < \infty$ is not); after $t$ is integrated out, the whole integrand is independent of $t$, so what you left is $0 < x < \infty$. Mimic the arguments and you obtain the answer below. And this can be easily extended to more variables cases. Of course in two variables case you can always draw the triangular region in the $x-t$ plane to have a better illustration. – BGM Apr 8 '16 at 3:22

## 1 Answer

Write $x^n = \int_0^\infty nt^{n-1}1_{(t,\infty)}(x) dt$.

Then $E X^n = \int X^n dp = \int \int_0^\infty nt^{n-1}1_{(t,\infty)}(X) dt dp = \int_0^\infty nt^{n-1} (\int 1_{(t,\infty)}(X) dp ) dt = \int_0^\infty nt^{n-1} p \{ \omega | X(\omega)>t\} dt$.