For expectation in probability how do I show what EX^2 is in this case?

35 Views Asked by At

Im trying to prove $$E[X^2]=2\int_0^\infty x(1-F(x)) \, dx $$ Where the integral area is from 0(at the bottom of the integral) and infinity. Also X>0 with density f(x) and Distribution function F(x).

I know $$E[X^2]=\int_0^\infty x^2f(x) \, dx$$ but I don't know what value of f(x) I would substitute in if thats what I am meant to do. Thanks

1

There are 1 best solutions below

0
On

Hint: write $F(x)=\int_0^x f(y) \mathop{dy}$ to obtain a double integral, then switch the order of integration.

$$2 \int_0^\infty x(1-F(x)) \mathop{dx} = 2 \int_0^\infty x \int_x^\infty f(y) \mathop{dy} \mathop{dx} = 2 \int_0^\infty f(y) \int_0^y x \mathop{dx} \mathop{dy} = \cdots$$