The normal expected value that I am used to is the following with $f(x)$ as the probability density function:
$E[X] = \int_{-\infty}^\infty{xf(x) \, dx}$
My basic probability textbook is doing a basic proof with a nonnegative random variable $Y$ that begins:
$E[Y] = \int_0^\infty{P\{Y > y\} \, dy}$
Can someone explain this to me? Why does this expected value definition hold? Where does it come from? This doesn't make intuitive sense to me. I imagine that I'm missing something obvious?