# $\int_{\mathbb R+} P(Y-X>t)dt$ =$\int_{\mathbb R}P(X < y, Y >y)dy$

i have $$E[B]= \int_{\mathbb R+} P(Y-X>t)dt$$ and i want to show this relation :
$$\int_{\mathbb R+} P(Y-X>t)dt$$=$$\int_{\mathbb R}P(X < y, Y >y)dy$$

I first began showing that for t ≥ 0, $$P(Y − X>t) = \int_{\mathbb R^2} 1_{y>x+t}f_{X|Y=y} (x) f_y(y) dxdy$$

But i don't know how to continue

• Even though there's already an accepted answer, I'd still like to link a closely related old post. – Lee David Chung Lin Nov 23 '18 at 6:54

$$\int_{\mathbb R} P(Xy)dy=\int_{\mathbb R}\int I_{\{X and $$\int (Y-X)^{+} dP=\int_0^{\infty} P(Y-X>t)dt$$. I have used Fubini's Theorem and the fact that $$Z=\int_0^{\infty} P(Z>t)\, dt$$ for any non-negative random variable $$Z$$. Take $$Z=(X-Y)^{+}$$.
• The random variables are defined on some probability space and $P$ is the probability measure on that space. – Kavi Rama Murthy Nov 21 '18 at 10:19
• Are you familiar with probability spaces and random variables on them? You are using density functions in your argument but not every random variable has a density. My integrals are over the sample space $\Omega$. – Kavi Rama Murthy Nov 21 '18 at 10:29