TITLE: How to prove the interchange of integral and expectation
QUESTION [6 upvotes]: How to prove $\int_{0}^{\infty}{h(t)\mathbb{E}(I(X>t))dt}=\mathbb{E}(\int_{0}^{\infty}{h(t)I(X>t)dt})$.
Can I treat $h(t)$ as a constant respect to $X$? Then, directly get the result?
The point is I do not understand what $\mathbb{E}(\int_{0}^{\infty}{h(t)I(X>t)dt})$ is.

REPLY [3 votes]: The integral $\int_0^\infty h(t)I(X>t)\,dt$ is a random variable, call it $Y$. The role of the indicator random variable $I(X>t)$ is to restrict the $t$-integration to the (random) interval $(0,X)$. In other words,
$$
Y(\omega) =\int_0^{X(\omega)} h(t)\,dt,
$$
for each sample point $\omega$ in the sample space. You are then forming the expectation of $Y$.  If $h$ takes only non-negative values, then Tonelli's theorem can be used to justify the change in order of expectation and integration (in $t$).