What can I say about $P\bigl[Y-X \le\frac{1}{2}\bigr]$ if $X$ and $Y$ are independent $U[0,1] $ variables?

68 Views Asked by At

Let $X$ and $Y$ be two random independent variables with uniform distribution on $[0,1]$.

What can I say about $P\bigl[Y-X \le\frac{1}{2}\bigr]$?

I tried doing the following:

$$P\Bigl[ Y \le X + \frac{1}{2}\Bigr]$$ Let $X + \frac{1}{2} = Z$. $Z$ is uniform on $\bigl[\frac{1}{2},\frac{3}{2}\bigr]$

Then I evaluated $\int_{\!\frac{1}{2}}^1t\, dt$ but the result is wrong. Can you give me some suggestions?

3

There are 3 best solutions below

0
On BEST ANSWER

Hint. Draw a picture of the unit square and shade the area that matters. Then you can find the answer without integrals (even without pencil and paper after you see the picture).

1
On

The answer is $\int _0^{1/2} \int_0^{x+1/2} \, dy \, dx+\int _{1/2}^{1} \int_0^{1} \, dy \, dx=7/8$. You get this by using the fact that joint density is given by $f_{X,Y} (x,y) =1$ for $0\leq x\leq 1,0\leq y\leq 1$ and $0$ for other values of $x$ and $y$. You just have to figure out the range for $x$ and $y$ from the inequality $y-x \leq 1/2$

0
On

Let $f_X(\cdot)$ be the density of $X$.

You have by the total probability theorem,

\begin{align}\Pr\left(Y-X\le\frac{1}{2}\right)&=\Pr\left(Y\le\frac{1}{2}+X\right)\\&=\int\Pr\left(Y\le\frac{1}{2}+x\mid X=x\right)f_X(x)\,\mathrm{d}x\\&=\int\Pr\left(Y\le\frac{1}{2}+x\right)f_X(x)\,\mathrm{d}x\\&=\int_0^1\left(\int_0^{\min(1/2+x,1)}1\,\mathrm{d}y\right)1\,\mathrm{d}x\end{align}

The rest is pretty straightforward.