Show that $\int_{-\infty}^{\infty} [P(X<x\le Y)-P(Y<x\le X)]dx=EY-EX$

80 Views Asked by At

For every random variables $X$ and $Y$, show that $$\int_{-\infty}^{\infty} [P(X<x\le Y)-P(Y<x\le X)]dx=EY-EX.$$

I'm not sure how to approach this. I tried rewriting $P(X<x\le Y)=1-P(X<x, Y<x)$ and $P(Y<x\le X)=1-P(Y<x,X<x)$ but it just cancels.

1

There are 1 best solutions below

0
On BEST ANSWER

$$\int_\mathbb RP(X\lt x\leqslant Y)\,\mathrm dx=E\left(\int_\mathbb R\mathbf 1_{X\lt x\leqslant Y}\,\mathrm dx\right)$$ $$ \int_\mathbb R\mathbf 1_{X\lt x\leqslant Y}\,\mathrm dx=\mathbf 1_{X\lt Y}\int_X^Y\mathrm dx=(Y-X)^+$$ $$Y-X=(Y-X)^+-(X-Y)^+$$