Consider we have a random variable $X_{1}$, and then we truncated it by $\overline{X}_{1}=X_{1}\mathbb{1}_{|X_{1}|\leq c}$ where $c\geq 1$.
How could I compute $\mathbb{E}\overline{X}_{1}^{2}$?
As usually, we always need the lemma:
$p>0$, and $Y\geq 0$, we have $$\mathbb{E}Y^{p}=\int_{0}^{\infty}py^{p-1}\mathbb{P}(Y>y)dy.$$
The note I follows directly use this lemma to yield $$\mathbb{E}X_{1}^{2}\mathbb{1}_{|X_{1}|\leq c}=\int_{0}^{c}2x\Big[\mathbb{P}(|X_{1}|>x)-\mathbb{P}(|X_{1}|>c)\Big]dx,$$ which I don't quite understand, since this computation is lack of details.
My attempt:
By the lemma, we have $$\mathbb{E}(X_{1}^{2}\mathbb{1}_{|X_{1}|\leq c})=\int_{0}^{\infty}2x\mathbb{P}(|X_{1}|\mathbb{1}_{|X_{1}|\leq c}>x)dx,$$ but what should I do, or think, to make this expression the same as the integral provided in the note?
Is there a general way of doing this or is this just by intuition?
I really need an answer which can provide me the calculation details.
Thank you!
It is Fubini's theorem. You can rewrite \begin{aligned} \int_\Omega X^2(\omega)\mathbf{1}(||X(\omega)|\leq c)\mathbb{P}(d\omega)&=\int_\Omega\Big(\mathbb{1}(|X(\omega)|\leq c)\int\mathbf{1}(0<t< |X(\omega)|)\,2t\,dt\Big)\mathbf{P}(d\omega)\\ &=\int_{(0,\infty)}2t\Big(\int_\Omega \mathbb{1}(|X(\omega)|\leq c)\mathbf{1}(0<t< |X(\omega)|)\mathbb{P}(d\omega)\Big) dt \end{aligned}
For $0<t<\infty$, $$\mathbb{1}(|X(\omega)|\leq c)\mathbf{1}(0<t\leq |X(\omega)|)=\mathbf{1}(t<|X(\omega)|\leq c)$$ So \begin{aligned} \int_{(0,\infty)}2t\Big(\int_\Omega \mathbb{1}(|X(\omega)|\leq c)\mathbf{1}(0<t< |X(\omega)|)\mathbb{P}(d\omega)\Big) dt&=\int^\infty_0 2t \Big(\int_\Omega\mathbf{1}(t<|X(\omega)|\leq c)\mathbb{P}(d\omega)\Big)\,dt\\ &=\int^\infty_0 2t(\mathbb{P}(t<|X(\omega)|\leq c)\,dt\\ &=\int^\infty_0 2t(\mathbb{P}(|X|>t) -\mathbf{P}(|X|> c))\,dt \end{aligned}