I found this while searching for the Integralform of the Expected value:
Unfortunately I can't really understand the steps, can someone help me? Would be cool if you could explain it from the other direction, starting with the last step, that's the way I would show it in my proof.
Best, KingDingeling
The goal is to invert exchange the two integrals, this is because the term in the middle is only a function of $y$. So you have : \begin{align*} \int_{0}^\infty \int_{x}^{\infty} f_X(y) dy dx&=\int_{0}^\infty \int_{0}^{\infty} f_X(y) \mathbf 1_{(y\geq x)} dy dx\\ &=\int_{0}^\infty \int_{0}^{\infty} f_X(y) \mathbf 1_{(y\geq x)} dx dy\\ &=\int_{0}^\infty \int_{0}^{y} f_X(y) dx dy \end{align*}
Going from the first to the second line is only swapping the integrals from $x$ then $y$ to $y$ then $x$, you can do this in general if the function you integrate is absolutely integrable but this may be done for some other cases. The first and the last steps correspond to the application of the indicator function to the inner integral.
EDIT : the other direction is exactly taking the steps backward and so it is the same in the end \begin{align*} \int_{0}^\infty \int_{0}^{y} f_X(y) dx dy&=\int_{0}^\infty \int_{0}^{\infty} f_X(y) \mathbf 1_{(y\geq x)} dx dy\\ &=\int_{0}^\infty \int_{0}^{\infty} f_X(y) \mathbf 1_{(y\geq x)} dy dx\\ &=\int_{0}^\infty \int_{x}^{\infty} f_X(y) dy dx \end{align*}