# Expected value of a non-negative random variable

How do I prove that $\int_0^\infty Pr(Y\geq y) dy = E[Y]$ if $Y$ is a non-negative random variable?

• – Henry Dec 17 '18 at 13:00

Assuming we have a continuous random variable with an existant probability density function $f_Y$.
\begin{align} \int_0^\infty \Pr(Y \geqslant y) \operatorname d y & = \int_0^\infty \int_y^\infty f_Y(z)\operatorname d z\operatorname d y \\[1ex] & = \int_0^\infty \int_0^z f_Y(z)\operatorname d y\operatorname d z \\[1ex] & = \int_0^\infty f_Y(z)\int_0^z 1\operatorname d y\;\operatorname d z \\[1ex] & = \int_0^\infty z f_Y(z)\operatorname d z \\[1ex] & = \mathsf E[Y] \end{align}
• \begin{align} & \text{The double integral is performed over the interval:} \\ & \{(y,z):z\in[0,\infty)\cap y\in[z,\infty)\} \\ \equiv & \{(y,z):0\leqslant z\leqslant y<\infty\} \\ \equiv & \{(y,z):y\in [0,\infty)\cap z\in[0,y]\} \end{align} @user2510050 – Graham Kemp Oct 5 '14 at 6:48
Let $1_{Y\ge y}$ the indicator function for the set $\{Y\ge y\}$. Then $$\int_0^\infty P(Y\ge y)\,dy = \int_0^\infty \int 1_{Y\ge y}\,dP\,dy=\int\int_0^\infty1_{Y\ge y}\,dy\,dP=\int Y\,dP=E[Y]$$ The middle equality follows from the Fubini-Tonelli theorem. The third equality follows since $Y\ge0$, so the function $1_{Y\ge y}$ is $1$ on the interval $[0,Y]$, and $0$ elsewhere, so its integral over the real line is $Y$.