# A probability question

#### acevialli

##### New Member
Dear all

This may be simple for you guys but I would be grateful for some advice on the following:

A bus stop layby is only long enough for 2 buses. Therefore, if there are 45 buses an hour, with an assumed waiting time of 30 seconds, what is the probability of a 3rd bus arriving, when two buses are already using the layby?

We have had various discussions on the correct way to calculate this in the office (probability at any particular second, initially 45/3600), but I would be interested to see if there is any consensus on this site.

Many thanks and I look forward to the responses.

regards

Asa

#### BGM

##### TS Contributor
You may take a look at simple model like M/M/1 model in queueing theory.

#### Dason

I don't think M/M/1 would be a perfect model here since (at least how I understand it) there will be exactly 45 buses in a given hour. If that's the case then M/M/1 would be a decent approximation but not a perfect model.

#### BGM

##### TS Contributor
Yes, at first glance I thought that OP should be describing the bus coming as a Poisson process with mean arrival rate of 45 buses per hour. Anyway if there is exactly 45 buses, then the bus arrival time will be generated, say (ordered) uniform (the conditional joint distribution of the arrival times given the number of arrivals in Poisson process)

#### acevialli

##### New Member
Thanks for all of your help. Can anyone please nudge me further in the correct direction?

#### BGM

##### TS Contributor
Let me elaborate a little bit more about the details of the above post, in case you want some more concrete idea.

Let $N(t)$ be the counting process, counting the aggregate number of buses arrived up to time $t$ (in minutes). One very popular model will be using (homogeneous) Poisson process to model it (with a certain mean arrival rate).

Let $W_i, i = 1, 2, 3, \ldots$ be the arrival time of the $i$-th bus. Under the Poisson process assumption, the marginal distribution of $W_i$ is a gamma distribution.

However, as Dason pointed out, now we are conditional on $N(60) = 45$,
and in this situation it is well known that the joint distribution of

$(W_1, W_2, \ldots, W_{45})|N(60)=45$

is exactly the same as

$(U_{(1)}, U_{(2)}, \ldots, U_{(45)})$

where $U_i$ are i.i.d. as $\text{Uniform}(60)$ and $U_{(i)}$ are the corresponding order statistics.

Assuming a deterministic waiting time of $\frac {1} {2}$ minutes in the first position of the bus stop. Then we know that the $i$-th bus cannot enter the layby when it arrive the bus stop if and only if the previous two bus does not left yet; in math,

$W_i < W_{i-2} + \frac {1} {2}$

(we absorbed the condition $N(60)=45$ to shorten the notation)

The event we considered there is at least one bus facing this situation within the 60 minutes; in probability notation, it is the union of the above events:

$\bigcup_{i=3}^{45} \left\{W_i < W_{i-2} + \frac {1} {2}\right\}$

and we are calculating the probability of this event. The way to calculate it is another issue; but at least this could be a reasonable way to model the situation you described if we did not misunderstand your post.