Let $h$ be a non negative borel function, and $H(x) = \int_{-\infty}^{x}h(y)dy$. Let $X$ be a random variable. Prove that $$ E[H(X)] = \int h(y)\mathbb{P}(X>y)dy $$
I know that $$E[H(X)] = \int_{\Omega} \left(\int_{-\infty}^{x}h(y)dy\right)d\mathbb{P} $$. From change of variables, we can get
$$ E[H(X)] = \int_{\mathbb{R}} \left(\int_{-\infty}^{x}h(y)dy\right) dF_X(x) $$ where $F_X(x) = \mathbb{P}(X<x)$. I was stuck at this step, any help would be appreciated. I suspect I have to use Fubini's theorem because of the double integral, but could not figure out how. Thanks.
The change of variables is not right, it must be
$$ \int_{\Omega } \left(\int_{-\infty}^{X(\omega )}h(y)dy\right) dP(\omega )= \int_{\mathbb{R}} \left(\int_{-\infty}^{x}h(y)dy\right) dF_X(x) $$ Now, using Iverson brackets, you have that
$$ \int_{\mathbb{R}} \int_{(-\infty,x]}h(y)dy dF_X(x)=\int_{\mathbb{R}^2}[y\leqslant x]h(y)d(y,F_X(x)) =\int_{\mathbb{R}}\int_{[y,\infty )}h(y)dF_X(x)dy\\ =\int_{\mathbb{R}}\Pr [X\geqslant y]h(y)dy $$