The probability that the absolute value of the difference between the numbers is greater than one

probability

Pick 2 numbers : one from interval [0,1] and second one from interval [0,2]. Calculate the probability that the absolute value of the difference between the numbers is greater than one.


I defined 2 numbers : $x \in [0,1]$ $y\in[0,2]$. I've been thinking on this problem and came up with a few ideas, but sketching a graph and calculating the field is the easiest (I think). I used the definition of an absolute value and got $x-y>1 \equiv y<x-1 $ – doesn't work since $y\in[0,2]$. $x-y<-1 \equiv y>x+1$. I drew a simple sketch and calculated the area : $1\cdot1\cdot\cfrac{1}{2} = \cfrac{1}{2}$. Is it correct? If it is, how to solve this task without drawing anything, this is using integrals?

Best Answer

Your approach is okay and the area of $\{(x,y)\in[0,1]\times[0,2]\mid |x-y|>1\}$ is indeed $\frac12$.

But in order to find the probability you must divide this by the area of $[0,1]\times[0,2]$ which is $2$.

So the probability equals $\frac14$.


If you want to avoid pictures you can go for finding:$$P\left(\left|X-Y\right|>1\right)=\int_{0}^{1}P\left(\left|X-Y\right|>1\mid X=x\right)dx=\int_{0}^{1}P\left(\left|x-Y\right|>1\mid X=x\right)dx$$$$=\int_{0}^{1}P\left(\left|x-Y\right|>1\right)dx$$where the last equality rests on independence.

Here $Y$ has uniform distribution on $[0,2]$ so that:$$P(|x-Y|>1)=P(Y>1+x)=\frac12(1-x)$$