Finding $ \mathbb{P} (|x-y| \geq \rho )$ where $x$ and $y$ are uniform on $[-1,1]$

60 Views Asked by At

Let $x$ and $y$ be two independent random variables distributed according to uniform law over $[-1,1]$.

I would like to compute the following probability, for a parameter $\rho \in (0,1)$:

$$ \mathbb{P} (|x-y| \geq \rho )$$

For $|x-y|= x - y$ (then the other case $|x-y|= -x + y$), I set $Z=x + (-y)$, so that I compute : \begin{align} \mathbb{P} ( Z \geq \rho ) & = 1 - \mathbb{P} ( Z < \rho ) & \\ & = 1 - \int_{-1}^{1} \int_{-1}^{\rho + y } f (y) f(x) \,dy \,dx & \text{ where } f \text{ is the PDF of the unifrom law over } [-1,1]\\ & = 1 - \int_{-1}^{1} F(\rho +y ) f(y) \,dy & \\ & = 1 - \int_{-1}^{1} \frac{\rho + y - (-1)}{1 -(-1)} \frac{1}{2} dy & \\ & = 1 - \frac{1}{4} \big( [(\rho+1 ) y]^{1}_{-1} + [\frac{y^2}{2}]^{1}_{-1} \big) & \\ & = 1 - \frac{1}{2} ( \rho + 1) \end{align}

Is this correct ? ($x-y$ take values between $-2$ and $2$)

1

There are 1 best solutions below

1
On

You need to worry about the case where $\rho+y\gt1$, in which case you only integrate $\int_{-1}^1 dx$.
It might help to draw the region in the $(x,y)$ plane.