expected value of time Alice and Bob will be together

1.2k Views Asked by At

I have the following problem in probability theory.
Suppose Alice and Bob agree to meet each other in the train station.
Alice is arriving between 16:00 and 17:00 (uniformly distributed) and stays there for 10 minutes , Bob is arriving between 16:10 and 16:40 (uniformly distributed) and stays there for 5 minutes.
What is the expected value of time that Alice and Bob will be together?

$X=$ time Bob arrives to the station
$Y=$ time Alice arrives to the station
$W=$ time Bob and Alice will be together

Then $X,Y$ are independent continuous random variable and $\mathcal{P}(0 \leq W \leq 5)=1$.
I tried to calculate $E(W|Y=y)$ but couldn't understand how to calculate $f_{W|Y}(w|y)$.

Thank you, Michael

2

There are 2 best solutions below

0
On BEST ANSWER

For clarity, let's use minutes and shift 14:00 to 0. We know that $0 \leq Y\leq 60$ and $10 \leq X \leq 40$. Because the probabilities are uniform $P(X)=\frac{1}{30}$ for any $X$ and $P(Y)=\frac{1}{60}$ for any $Y$. Also, since arrival times are independent, the joint probability distribution would be $P(X,Y)=P(X)P(Y)=\frac{1}{180}$.

Now let's compute the time that Bob and Alice would be together, $W$, as a function of their arrival time. It is quite easy to figure out that \begin{equation} W(X,Y) = \begin{cases} 0 &X < Y-5 \\ X-Y+5 &Y-5 < X < Y \\ 5 &Y < X < Y+5 \\ Y-X+10 &Y+5 < X < Y+10 \\ 0 &X > Y+10 \\ \end{cases} \end{equation}

According to the definition of expected value, $E[W]$ would be $$ E[W] =\int_{10}^{40} \int_{0}^{60} W(X,Y)P(X,Y) dYdX= \frac{1}{180}\int_{10}^{40} \int_{0}^{60} W(X,Y) dYdX. $$ All you have to do is to evaluate this integral. It can be a little time consuming, but it is straightforward.

0
On

Alternative method: for a given time $t$ find the probability that Alice and Bob are both there, then integrate over $t$. Bob can only be there between 1610 and 1645. The probability that he's there increases linearly from $0$ at 1610 to $1/6$ at 1615, stays at $1/6$ till 1640, then decreases linearly to $0$ at 1645. Alice's probability is $1/6$ over the whole interval 1610 to 1645. The answer (confirmed by computer simulations) is $5/6$ of a minute.