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?

This proof assumes a background in measure theory.
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$.
