Recall that for a continuous rv, ,
If then how do we know that this is equivalent to
A similar result is proved for discrete rvs in the notes. For simplicity of exposition, we assume here that the continuous rvs and are non-negative.
We first turn the expectation of into a double integral. Reversing the order of integration provides a term , which is equivalent to ; returning to the original order of integration produces the required result. Along the way we will prove that (if ), , where is the survivor function of ; this is of interest in its own right.
Unnumbered Figure: First link, Second Link
Using the left figure for the first change of order of integration and the right figure for the second change of order, and recalling that , we have:
as required.