# Expected Value and Distribution Functions

Suppose you want to find $E(X)$ for a non-negative random variable $X$. So you can use $\int_{0}^{\infty} [1-F(x)] \ dx$. To get $1-F(x)$, all you have to do is integrate as follows: $\int_{x}^{\infty} f(t) \ dt$? In other words, instead of integrating from $t=0$ to $t= x$, we can just integrate from $t = x$ to $t = \infty$?

-
Whatever you have written is right. What is your question though? – user17762 Nov 19 '10 at 6:27
Yes, since $1 - \int_0^x {f(t){\rm d}t} = \int_x^\infty {f(t){\rm d}t}$. – Shai Covo Nov 19 '10 at 10:57

I guess your question is: Why is $E(X)=\int_0^\infty 1-F(x) dx$?
The answer is as follows: By definition $$E(X)=\int_0^\infty tf(t) dt.$$ Now \begin{eqnarray*} & & \int_0^\infty tf(t) dt\ &=&\int_0^\infty f(t)\int_0^t 1 dx dt\ &=&\int_0^\infty\int_0^t f(t) dx dt\ &=&\int_0^\infty\int_x^\infty f(t) dt dx \ &=&\int_0^\infty 1-F(x) dx. \end{eqnarray*}