What is the probability that the witches will meet at the coffee shop?

543 Views Asked by At

I am trying to solve this probability question:

Two witches make a nightly visit to an all-night coffee shop. Each arrives at a random time between 0:00 and 1:00. Each one of them stays for exactly 30 minutes. On any one given night, what is the probability that the witches will meet at the coffee shop?

A similar question has already been asked here but I am trying to work out on this problem using a different approach than the one mentioned in above link that is a graph based approach (the same approach is also mentioned in the link to the question) and couldn't find mistake in my approach. Here is what I did:

Let $U_1$ be a random variable denoting the arrival time of first witch and let $U_2$ be the random variable denoting the arrival time of second witch. Both $U_1$ and $U_2$ follows Uniform Distribution i.e. $U_1 $~$ Uniform(0, 1)$ and $U_2 $~$ Uniform(0, 1)$ where I have mapped time 0:00 to $0$ and time 1:00 to $1$.

Now we have to find out $P(|U_1-U_2| \leqslant \frac12)$

$$=> P(\frac{-1}2 \leqslant U_1-U_2 \leqslant \frac12) = \int_0^1 P[(\frac{-1}2 \leqslant U_1-U_2 \leqslant \frac12)|U_1=x]*f_{U_1}(x) dx$$

$$=\int_0^1 P[(\frac{-1}2 \leqslant x-U_2 \leqslant \frac12)|U_1=x]*f_{U_1}(x) dx$$

$$=\int_0^1 P[(\frac{-1}2-x \leqslant -U_2 \leqslant \frac12-x)]*f_{U_1}(x) dx$$

$$=\int_0^1 P[(x-\frac{1}2 \leqslant U_2 \leqslant x+\frac12)]dx$$ (Since $f_{U_1}(x)$ is pdf of Uniform distribution so it is $1$)

$$=\int_0^\frac 12 P(x-\frac{1}2 \leqslant U_2 \leqslant x+\frac12)dx+\int_\frac 12^1 P(x-\frac{1}2 \leqslant U_2 \leqslant x+\frac12)dx$$

$$=\int_0^\frac 12 P(U_2 \leqslant x+\frac12)dx+\int_\frac 12^1 P(x-\frac{1}2 \leqslant U_2)dx$$ (Since in range $[0,\frac 12]$, $x-\frac 12 \in [\frac{-1}2,0]$ and $U_2 \geqslant 0$ and similarly, in range $[\frac12, 1]$, $x+\frac 12 \in [1, \frac 32]$ and $U_2 \leqslant 1$)

$$=\int_0^\frac 12 (x+\frac 12)dx+\int_\frac 12^1 (\frac 12-x)dx$$

$$[\frac {x^2}2+\frac x2]_0^\frac 12+[\frac x2-\frac {x^2}2]_\frac12^1$$

$$=\frac 12[\frac 14+\frac 12]+\frac 12[(1-1)-(\frac 12 -\frac 14)]$$ $$=\frac 12[\frac 34]+\frac 12[-\frac 14]$$ $$=\frac 38 - \frac 18$$ $$=\frac 14$$

But the correct answer is $\frac 34$. What I am doing wrong?

1

There are 1 best solutions below

0
On BEST ANSWER

The arithmetic error is in the second integral. Indeed,

$$\int_\frac 12^1 P(x-\frac{1}2 \leqslant U_2)dx$$ is clearly positive since it is the integral of a non-negative function.

We see that

$$\int_\frac 12^1 P(x-\frac{1}2 \leqslant U_2)dx=\int_{\frac 12}^1 1-\left(x-\frac 12\right)\,dx=\int_{\frac 12}^1\left(\frac 32-x\right)\,dx=\frac 38$$