# how can I show this equation?

Let $(X,Y]$ be a non degenerate random interval and the probability is that:
$P(X\leqslant Y)=1$ , $P(X=Y)=0$.
We define $E[Y-X]$ as its expected length.
Show that $E[Y-X]=\int P(X < t\leqslant Y)dt$

-
Hint: Use Tonelli's theorem. –  Rasmus May 1 '12 at 17:51
And the identity between random variables $Y-X=\int\limits_{\mathbb R}\mathbf 1_{X\lt t\leqslant Y}\mathrm dt$. –  Did May 1 '12 at 18:22

Hint: Use Tonelli's theorem and the identity between random variables $Y−X=\int\limits_\mathbb R\mathbf 1_{X\lt t\leqslant Y}\mathrm dt$.