3

I'm waiting for two buses, route 20 or route 21. route's 20 bus passes randomly at a rate of 3 buses per hour, while route 21 passes at a rate of 1 bus per hour, independently of the other one. what is the average waiting time if I take the first bus that passes?

I thought I could just divide 1 hour into 4, since theyr'e independent of each other but it doesn't look like I am averaging the right way.

I saw a similar question about this, but the difference is that they're given the exact time interval at which buses pass (e.g 12 minutes). This one just says 3 buses randomly per hour and 1 bus randomly per hour .

2 Answers2

3

The average waiting time will depend on how the arrival times are staggered, without knowing that I don't think we can establish an exact average.

Consider the simplest possibility, that all four buses are staggered equally, i.e. at $15$-minute intervals. Then the average wait time is clearly $7.5$ minutes, since your wait time is equally likely to be any one in the interval $(0,15)$.

Now consider an extreme possibility, like that the bus arrival times have gaps of $1, 1, 1$ and $57$ minutes. If you arrive in one of the three $1$-minute gaps, your average wait time would be $0.5$ minutes, while if you arrive in the $57$-minute gap, your average wait time will be $27.5$ minutes. Assuming your arrival time is uniformly spread over the one-hour interval, the probability of arriving during the $1$-minute gaps would be $\frac{1}{60}$ each, while the probability of arriving during the $57$-minute interval would be $\frac{57}{60}$. Thus your expected wait time in this scenario would be

$$3 \left( \frac{1}{60} \right) (0.5) + \left( \frac{57}{60} \right) (27.5) = 27.1 \text{ minutes}$$

In general, if the gaps between the arrival times for the four buses are $t_1, t_2, t_3$ and $t_4$, the the expected wait time will be

$$ \left( \frac{t_1}{60} \right) \left( \frac{t_1}{2} \right) + \left( \frac{t_2}{60} \right) \left( \frac{t_2}{2} \right) + \left( \frac{t_3}{60} \right) \left( \frac{t_3}{2} \right) + \left( \frac{t_4}{60} \right) \left( \frac{t_4}{2} \right) = \frac{t_1^2 + t_2^2 + t_3^2 + t_4^2}{120}$$

It is not difficult to see that the maximum average waiting time would be just under $30$ minutes (just imagine that the first three gaps in time are close to 0 and the last gap is close to the full hour.) To see that the minimum average waiting time is in fact $7.5$ minutes, we can take advantage of the QM-AM inequality:

$$ \sqrt{\frac{t_1^2 + t_2^2 + t_3^2 + t_4^2}{4}} \ge \frac{t_1 + t_2 + t_3 + t_4}{4} = 15 \text{ minutes} $$

and so

$$\begin{align} \frac{t_1^2 + t_2^2 + t_3^2 + t_4^2}{120} &= \frac{1}{30} \left( \sqrt{\frac{t_1^2 + t_2^2 + t_3^2 + t_4^2}{4}} \right)^2 \\[2mm] &\ge \frac{1}{30} (15)^2 = 7.5 \text{ minutes} \end{align}$$

To get an overall average time would require calculating one over all possible permutations of the time gaps; I don't know whether this is possible, perhaps someone else can suggest a more general solution.

A.J.
  • 3,892
3

The question is not precise enough to get a precise answer: the law of the arrival times of the buses must be specified.

One usual model is the following: the time you would wait for the first bus is an exponential random variable $X_1$ of parameter $\lambda$, and the time for the second bus is another independent exponential random variable $X_2$ of parameter $\mu$.

Then the waiting time for the first bus is $\min(X_1,X_2)$, and it is another exponential variable, of parameter $\lambda + \mu$ (see here).

In your case, $\lambda = 3$ (buses per hour), and $\mu = 1$ (bus per hour). So the first of the two buses should arrive, on average, after $\frac{1}{3+1}$ hours, so, $15$ minutes.

Another model could be the following: we assume that the arrival times of the first bus, in minutes, are $\{X + 20k \ \vert \ k \in \mathbb{Z}\}$, for some random variable $X$ uniform on $[0,20]$, and the arrival times of the second bus, in minutes, are $\{Y + 60k \ \vert \ k \in \mathbb{Z}\}$, for some random variable $Y$ uniform on $[0,60]$. This model is investigated here.

Plop
  • 2,647