2
$\begingroup$

$A$ and $B$ are supposed to meet.

$A$ arrives in a randomly chosen (uniform distribution) moment between $2$ and $3$ pm.

$ B$ arrives at $2$ pm with probability equal to $0,5$ and in a randomly chosen (with uniform distribution) moment between $2$ and $3$ pm with probability $0,5$ .

Find the expected value of the amount of time which the person who arrives first spends waiting for the other.

Here are my thoughts:

$A$ has a uniform distribution on $[2,3]$ , but I don't know what the random variable for person $B$ looks like.

We need to express random variable whose values are amounts of time of waiting, using the random variables we find for person $A$ and $B$.

Could you explain to how to do that and tell me if it's a good approach?

$\endgroup$
1
  • 2
    $\begingroup$ Let $X$ be the random variable describing person $A$'s arrival time, and $Y$ be the random variable describing person $B$'s arrival time. The time waited (by the earlier to arrive) is then $|X-Y|$, or rather the time waited by person $A$ is $\min\{0,Y-X\}$. Try integrating using your formulae for expected value on the two separate regions, $x\geq y$ and $x<y$ respectively. $\endgroup$
    – JMoravitz
    Feb 27, 2015 at 22:15

2 Answers 2

3
$\begingroup$

The random variable for $B$ has pdf $g(b)=1/2$ over the interval from $t=2$ to $t=3$, together with a point mass of $1/2$ at $t=2$. As you've pointed out, $A$ has pdf $f(a)=1$ on this interval. To compute the expected waiting time, it's convenient to break the calculation up into three disjoint pieces:

  • $B$ arrives at $t=2$
  • $B$ arrives later ($t>2$), but before $A$
  • $A$ arrives before $B$

The first case contributes $${\rm Pr}(B=2) \int_2^3 (a-2)f(a)\,da = 1/4$$ to the expectation. The second case contributes $$\int_2^3 f(a)\,da \int_2^a (a-b)g(b) \,db=1/12.$$ The third case also contributes $1/12$; I leave that integral to you. So the expected waiting time is $5/12$ hour, or $25$ minutes.

$\endgroup$
8
  • $\begingroup$ Thank you. Could you show me how to formally write down random variable for person $B$? $\endgroup$
    – Bruce
    Feb 28, 2015 at 8:34
  • $\begingroup$ Is it $1/2 \cdot$ uniform distribution density function with constant $1$ on $[2,3]$ plus $1/2$ characteristic function of the set $\{2\}$? $\endgroup$
    – Bruce
    Feb 28, 2015 at 8:45
  • $\begingroup$ Could you explain to me why the integrals look like that? I mean, the two variables are independent. That is why we multiply integrals. But why do we multiply density functions by $(a-2), (a-b)$? When it comes to the second case contribution, we only consider the case when $B$ comes later than $A$, that is why we multiply the density function by $(a-b)$, right? $\endgroup$
    – Bruce
    Feb 28, 2015 at 9:16
  • $\begingroup$ So in the third case, we consider uniform distribution density function for $B$, multiplied by $1/2$ and integrate it over $[2,3]$ and then consider only the case where $A$ comes before $B$ so we integrate $(b-a)f(a)$ over $[2,3]$. Is that correct? $\endgroup$
    – Bruce
    Feb 28, 2015 at 9:22
  • 1
    $\begingroup$ I think you've got it. In general, to find the expected value of some function $w(a,b)$, where $a$ and $b$ have some joint density function $\mu(a,b)$, you integrate $w(a,b)\mu(a,b)\,da\,db$ over the entire probability space. Here $w(a,b)$ is the waiting time, and $\mu(a,b)=f(a)g(b)$ but there's a point mass, so we've split the space up so that, on each piece, both $w$ and $\mu$ have a simple (easily integrable) form. So, in the second piece, $\mu(a,b)=f(a)g(b)=1/2$, and $a>b$ so the waiting time $w(a,b)$ is $a-b$. In the third piece $w(a,b)$ will be $b-a$. $\endgroup$
    – Tad
    Feb 28, 2015 at 14:47
1
$\begingroup$

Isn't a good approach to calculate the average wait time if B arrives at 2pm (50% probability) and the average wait time if B doesn't arrive at 2pm (50% probability), then average these two average times out, in 50% - 50% proportion.

If B arrives exactly at 2pm, then B's average wait will be 30 minutes.

If B doesn't arrive exactly at 2pm, I believe the average wait time (by A or B) will be a third of the maximum wait time, or 20 minutes (I'm basing this on the answer I got to a very similar question about what the average difference was between two odd numbers with the same number of digits).

Weighting these two figures 50% - 50% as per the probabilities for the two scenarios, you arrive at an average wait time of 25 minutes.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .