# Expectation of nonnegative RV

I'm taking an intro course in Probability theory, and we have just defined expectation for a random variable as $E(X) = E(X^+) - E(X^-)$ if either of them is finite (extending the definition first from simple positive rv to positive rv, and then to all rvs, positive or not).

Then I came across this result for the expectation of a positive random variable. Let $(\Omega, \mathcal{F}, P)$ be a probability space and $X \ge 0$ be a positive rv: $$E(X) = \int_{\Omega} X dP = \int_\Omega \int_0^\infty \mathbf{1}_{\{X > t\}} dt \, d P = \int_{0}^\infty P(X > t) dt.$$ Actually, I'm familiar with this result, and the proof I've seen before involves converting $\int^\infty_0 P(X > t) \, dt$ to a double integral. What I'm struggling with is the step $\int_{\Omega} X dP = \int_\Omega \int_0^\infty \mathbf{1}_{\{X > t\}} dt \, d P$, and also the formal definition of an expectation itself.

I have no previous with integration or a "hard analysis" background, and the material covered so far in the course I'm taking has only used $\int_\Omega X dP$ as a notational device for $E(X)$. In general, any pointers to literature or "intuitive" explanations are more than welcome.

• "formal definition": I always thought $\int_\Omega X\,\mathrm dP$ is the formal definition of $E(X)$ ... – Hagen von Eitzen Sep 23 '13 at 17:40
• Well, in this course we are not defining "integral" and then defining expectation as "integral wrt a probability measure $P$". We just define expectation and later we say "wait, that's what math people call Lebesgue integral!". So I guess I should have worded it "I do not understand Lebesgue integration very well"! :-) – user14559 Sep 23 '13 at 18:16
It is just $$E( X ) = E( \int_{0}^X dt ) = E( \int_0^\infty 1_{t < X} dt ) = \int_0^\infty E(1_{t < X}) dt =\int_0^\infty P(t < X)dt$$
For the middle step it is crucial that $X \geq 0$ to use Fubini's theorem (expectations are indeed integrals!) without any concerns. I guess this works also if $X$ is bounded below or above and properly changing the range of the integral.
$$X\geqslant0\implies X=\int_0^X\,\mathrm dt=\int_0^\infty\mathbf 1_{X\gt t}\,\mathrm dt$$