Expected amount of time a bus at the front of the line has to wait until it is full and can leave

probabilityrenewal-processesstochastic-processes

Suppose that an airport has a shuttle bus that operates as follows. The bus waits until there are $20$ people on board and then it leaves. Assume that there are a large number of buses waiting in line so that as soon as one bus is full and leaves another bus is available to load
passengers. Assume that the time between consecutive passenger arrivals is $i.i.d.$ (I am assuming uniform iid – there is no information that is given about it in the question) with mean $15$ seconds.

$a)$ What is the expected amount of time a bus at the front of the line has to wait until it is full and can leave?

$b)$ In the long run, how many shuttle busses leave per hour?

My work :

If I am thinking correct it's a Renewal Process. As, it is given that the time between consecutive passengers is iid – so the value of $\mu$ is 15.

Let $Y_{1}$,$Y_{2}$,$Y_{3}$,$Y_{4}$$Y_{20}$ be the arrival time of all the buses before the bus is full and it leaves.

And $T_{n}$ = $\sum_{i=1}^{20}$ $Y_{i}$

SLNN also implies that $\lim_{n\to\infty}$ $\frac{T_{n}}{n} = \mu$

So, the waiting time is just $\mu * n = 20*15 =300?$

that means one bus takes around 5 minutes and therefore 12 buses will leave in one hour? Am I doing it correct?

Edit: How can I approach – if it is non – uniform?

Any help is appreciated…

Best Answer

Let $Y_1,Y_2,\ldots$ are arrival times of consecutive passengers. Let $T_1=Y_1+\ldots+Y_{20}$ be the load time of first bus, $T_2=Y_{21}+\ldots+Y_{40}$ be the load time of second bus and so on. The values $Y_1,Y_2,\ldots$ are i.i.d. and $\mathbb E[Y_1]=15$ seconds. Then $T_1,T_2,\ldots$ are also i.i.d. with expectation $$ \mathbb E[T_1]=\mathbb E[Y_1+\ldots+Y_{20}] =\mathbb E[Y_1]+\ldots+\mathbb E[Y_{20}] = 20\cdot 15 = 300 \text{ seconds}. $$ We used the property of expectation: expected value of a sum of random variables with finite expectations is the sum of expected values of these random variables. This was the answer to question (a).

To answer to (b), consider large number of busses $n$. It will take $T_1+\ldots+T_n$ seconds for $n$ busses to leave. Transform this time into hours: there is $3600$ seconds in an hour, and $$ \frac{T_1+\ldots+T_n}{3600} $$ is the total number of hours for $n$ busses to leave. So $$ \frac{n}{\frac{T_1+\ldots+T_n}{3600}} = 3600 \cdot \frac{n}{T_1+\ldots+T_n} $$ is a mean number of busses per hour. Let $n\to \infty$ and get the average number of busses per hour: $$ 3600 \cdot \frac{n}{T_1+\ldots+T_n} = \frac{3600}{\frac{T_1+\ldots+T_n}{n}}\xrightarrow{SLLN} \frac{3600}{\mathbb E[T_1]} = \frac{3600}{300}=12 $$ as you have already found.

Related Question