Double integral properties used in theorem

expected valueintegrationmultiple integralprobabilityprobability theory

Ok this question is a about integral properties used to proof a theorem (a Expectation value for random variables theorem).
My question is only about calculation of what properties it used for double integrals.
The two photos show the complete theorem and its proof.
The photo in part2 with a arrow shows where the calculations are performed.

Expectation Theorem : part 1
Expectation Theorem : part 2

In the photo n.r.v means continuous random variable
and n.r.d means discrete random variable

$f_{Y}$ is a density for the continuous random variable Y:

$ \int_{0}^{\infty} \ [\int_{y}^{\infty} f_Y(x)dx ] \ dy $
= $ \int_{0}^{\infty} \ [\int_{0}^{x} dy ] \ \ f_Y(x) dx $

How are the calculations made for this part (What properties are used )?
If you need any help about the text comment down.

Best Answer

Assume for the moment that $f_Y(y)\equiv0$ when $y\notin[0,N]$. Then your question is about the chain of equations $$\int_0^N\left(\int_y^N f_Y(x)\>dx\right)\>dy=\int_0^N\left(\int_0^x f_Y(x)\>dy\right)\>dx=\int_0^Nx\,f_Y(x)\>dx\ .$$ Only the first equality sign needs an explanation. We are integrating here over the right triangle $T$ with vertices $(0,0)$, $(N,0)$, $(N,N)$ in the $(x,y)$-plane, first integrating along $x$ and then along $y$, then first integrating along $y$ and then along $x$. That these two ways lead to the same result is "Fubini's theorem".

Related Question