# Thread: [SOLVED] question on expectations and cumulative distribution functions

1. ## [SOLVED] question on expectations and cumulative distribution functions

I want to prove that $E(X) = \int_{0}^{\infty} (1-F_X(X))\, dx$ is true with the only information given being that X is a continuous RV such that P(X > 0) = 1.

The hint that I've received from my teacher is to replace $F_X(X)$ with the integral of the pdf, to get $E(X) = \int_{0}^{\infty} (1- \int_{0}^{\infty} f_T(t)\, dt )\, dx$ (using dummy variable t) and then switch the order I do the integrals.

Also, with $E(X) = \int_{-\infty}^{\infty} xf(x)\, dx$ (the definition of E(X)) I'm not sure how I would integrate this without knowing exactly what f(x) is.

Thanks in advance for any help

2. Ok, I realized that I should be working with
$E(X) = \int_{0}^{\infty} (1- \int_{0}^{x} f_T(t)\, dt )\, dx$

but I'm still trying to figure out reversing the order of integration.

3. Originally Posted by joop
Ok, I realized that I should be working with
$E(X) = \int_{0}^{\infty} (1- \int_{0}^{x} f_T(t)\, dt )\, dx$

but I'm still trying to figure out reversing the order of integration.
I was going to point that out but had no time.

$\int_{0}^{\infty} (1- \int_{0}^{x} f_T(t)\, dt )\, dx$

$= \int_{0}^{\infty} \int_{x}^{+\infty} f_T(t)\, dt \, dx$

It should be smooth from here.

4. Would you please explain to me how you got
$\int_{0}^{\infty} (1- \int_{0}^{x} f_T(t)\, dt )\, dx$
$= \int_{0}^{\infty} \int_{x}^{\infty} f_T(t)\, dt \, dx$

To the best of my understanding,
$\int_{0}^{\infty} (1- \int_{0}^{x} f_T(t)\, dt )\, dx$
$= \int_{0}^{\infty} \, dx - \int_{0}^{\infty} \int_{0}^{x} f_T(t)\,dt \,dx$

and reversing the order,
$= \int_{0}^{\infty} \, dx - \int_{0}^{\infty} \int_{t}^{\infty} f_T(t)\,dx \,dt$

5. Originally Posted by joop
Would you please explain to me how you got
$\int_{0}^{\infty} (1- \int_{0}^{x} f_T(t)\, dt )\, dx$
$= \int_{0}^{\infty} \int_{x}^{\infty} f_T(t)\, dt \, dx$

To the best of my understanding,
$\int_{0}^{\infty} (1- \int_{0}^{x} f_T(t)\, dt )\, dx$
$= \int_{0}^{\infty} \, dx - \int_{0}^{\infty} \int_{0}^{x} f_T(t)\,dt \,dx$

and reversing the order,
$= \int_{0}^{\infty} \, dx - \int_{0}^{\infty} \int_{t}^{\infty} f_T(t)\,dx \,dt$ Mr F says: I'd be interested to see how you do the first integral ......

You should have seen that the second line follows from:

$1 = \int_{0}^{x} f_T(t)\, dt + \int_{x}^{+\infty} f_T(t)\, dt$

$\Rightarrow 1 - \int_{0}^{x} f_T(t)\, dt = \int_{x}^{+\infty} f_T(t)\, dt$.

6. Thanks. Here is what I got (which I'm sure is correct):

Starting from Mr. F's help, and reversing the order of integration:
$\int_{0}^{\infty} \int_{0}^{t} f(t) \, dt$
$= \int_{0}^{\infty} t f(t) \, dt$
rename t to x
$
\int_{0}^{\infty} x f(x) \, dx = \int_{0}^{\infty} x f(x) \, dx
$

(Defn of E(X) = what I just got)

Thanks again.

7. Originally Posted by joop
Thanks. Here is what I got (which I'm sure is correct):

Starting from Mr. F's help, and reversing the order of integration:
$\int_{0}^{\infty} \int_{0}^{t} f(t) \, {\color{red}dx} \, dt$
$= \int_{0}^{\infty} t f(t) \, dt$
rename t to x
$
\int_{0}^{\infty} x f(x) \, dx = \int_{0}^{\infty} x f(x) \, dx
$

(Defn of E(X) = what I just got)

Thanks again.
You're welcome. I've corrected (in red) a small omission.