Suppose $X$ and $Y$ have joint density $f(x, y) = 2$ for $0 < y < x < 1$.

Find $P(X − Y > z)$.

The answer is supposedly $\frac{(1-z)^2}{2}$ but I couldn't figure out why. I have tried doing the following:

$\int_{0}^{1} \int_{z+y}^{1} 2 dxdy$

since $x > z + y$ and $1 > x > y$ hence x is bounded by $(z + y) < x < 1$. Then I tried integrating over the interval $[0, 1]$ for y but I'm pretty sure the condition $y < x$ somehow affects the limit of the integral.

Please help, Thank You!


Always look to the support.

When $0<Y<X<1$ and $X-Y>z$, then $0<z<X-Y<X<1$ and $0<Y<X-z$ so....

$$\begin{align}\mathsf P(X-Y>z) &=\mathbf 1_{0<z<1} \int_z^1\int_0^{x-z}2~\mathrm dy~\mathrm d x+\mathbf 1_{z\leqslant 0}\\[2ex]&=(1-z)^2\mathbf 1_{0< z\leq 1}+\mathbf 1_{z\leq 0} \end{align}$$

  • $\begingroup$ What does the bolded 1_z <= 0 mean here? $\endgroup$ – Fardeem Apr 28 '19 at 6:38
  • $\begingroup$ @Fardeem It is an indicator function; a piecewise function that equals one when the indicated condition is true, otherwise equals zero. $$\begin{align}\mathbf 1_{z\leq 0}&=\begin{cases}1&:&z\leq 0\\0&:&\text{otherwise}\end{cases}\\[2ex](1-z)^2\mathbf 1_{0<z\leq 1}+\mathbf 1_{z\leq 0}&=\begin{cases}1&:&z\leq 0\\(1-z)^2&:&0<z\leq 1\\0&:&\text{otherwise}\end{cases}\end{align}$$ $\endgroup$ – Graham Kemp Apr 28 '19 at 14:31
  • $\begingroup$ But the book says the answer is $\frac{(1-z)^2}{2}$. Are you sure this is the answer? $\endgroup$ – Fardeem Apr 29 '19 at 16:58
  • $\begingroup$ Yes, quite sure. @Fardeem $\endgroup$ – Graham Kemp Apr 29 '19 at 23:19
  • 1
    $\begingroup$ @Fardeem To be sure, check that $\lim\limits_{h\to 0^+}\mathsf P(X-Y>h) = 1$ as it should. $\endgroup$ – Graham Kemp Apr 29 '19 at 23:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.