Libby Owens

2022-07-18

Probability of picking 2 numbers between 0 and 1 to be within 1/2 distance of each other?
What's the probability of picking 2 numbers, x and y, between 0 and 1 such that they will be within the distance of 12 of each other?
In other words, $Pr\left(\text{distance between x and y}\le \frac{1}{2}\right)=?$
I solved the problem through a geometric approach by rewriting the probability as $Pr\left(|x-y|\le \frac{1}{2}\right)$ and graphing $|x-y|\le \frac{1}{2}$
From the graph, I calculated the red area to be 75%.
Question: What would be a non-geometric solution to this problem?

iljovskint

Expert

Step 1
If you pick two numbers greater than $\frac{1}{2}$, subtract $\frac{1}{2}$ from the smaller of the two. If they are the same, subtract $\frac{1}{2}$ from the first number. This is a bijection to the two numbers being over $\frac{1}{2}$ apart.
Step 2
The probability of this not happening is $1-{\left(\frac{1}{2}\right)}^{2}=\frac{3}{4}$

Do you have a similar question?