# Waiting for the bus

Although the public transportation system in Madrid is very good, I don’t usually take the bus or the train to move around. But sometimes my car decides I should take public transportation (bus or train). One of things I always found intriguing is that I always wait way more for the bus than what is expected according to the frequency quoted by the transportation companies at the bus or train stop. For example: if the frequency of the buses is 4 per hour, you should expect a bus each 15 minutes on average, although fluctuations around this value may occur due to traffic conditions. Thus, arriving at the bus stop at random will get you an average of 15/2 = 7.5 minutes of wait. I have the impression I always wait 15 minutes instead. How can this be? Is it that I am so unlucky I always arrive at the bus stop when the previous bus has just left?

The answer to this question is the famous waiting time paradox in queueing theory: in short, let’s assume that the times between two buses are given by the variable . In the ideal world, will be a deterministic variable. In the example above, minutes. However, due to traffic conditions and other variables, is distributed around 15 minutes. For example, the following graphic shows the “lateness”of non-frequent buses in Great Britain, extracted from the Bus Punctuality Statistics GB 2007 report

As we can see, although most of the buses were late only less than a couple of minutes, but there is an significant fraction of them that were late more than 5 minutes. And even some of them came earlier than expected! Assuming that our buses come at times drawn from the above distribution, let’s see how a day will look like from the bus stop:

Buses arrived at the bus stop (vertical lines) with time between them given by . After my car breaks down, I arrive at the bus stop at the time given by the vertical arrow. Thus I have to wait a time . The question is: what is the average value of ? Given that my car breaks at random, I can assume that my arrival time is completely at random, uncorrelated with bus time tables. However, if the time I get to the bus stop is random, I have more probability to get to the bus stop in an interval in which the time between buses is bigger. Specifically, the probability that I arrive at an interval with time between buses is

where is the average value of time between buses. Given the interval , the waiting time is equally distributed (since my arrival is random), and thus we have to multiply the above probability by . Finally, we average over all possible , giving

which give us the distribution of waiting times. The average value of is the given by

where is the variance of the times between buses. This equation is the main result. It says:

- If buses come at perfect and regular time intervals, then and the waiting time is what we expect: . That is if we expect a bus each 15 minutes, I will wait (in average) 7.5 minutes.
- However, in real world, buses do not arrive at perfect times and then > 0. Thus, waiting time is always greater than . In fact, the distribution of lateness above shows that there is a large fraction of buses with long delays and then could be very big, controlling the waiting time.

In fact, the GB Bus Punctuality Report shows that in average, waiting time exceeds 40% the expected time . That is: due to the variance in times between buses, you (and me) end up waiting a time greater than the average time between buses. And that is my feeling: if trains/buses come each 15 minutes, I end up waiting 15 minutes, not 7.5.

In a ideal world, bus timetables would quote both the frequency of the buses and their variance , so we can estimate the waiting time. Unfortunately, they just tell us part of the story…

Ha, very neat Esteban. I have to think a bit more about this, but the presentation is very clear. I’ve never really thought about this problem as (a) in Brazil buses never really promise to arrive with a given frequency, and (b) the trains I take in the US are pretty much on time always!

Thank you Artur. I came accross the paradox when reading about response time in emails. In fact is the same kind of thing…

Hi Esteban,

in traffic science I have learned that this is called “bus bunching” and is simply caused by any small delay self-amplifying. If a bus has a delay it has to pick up more people, because there is more waiting time available at the next station. The station after, even more people are waiting plus more people want to get off the bus, and so on…. The good thing about this is, that in the very end you have two buses following each other. If you know this you can let the crowded one pass and get your free seat in the next one. Of course buses can overtake each other and therefore this works more reliable with trains.

*just noted that is a very old post, but someone found it intersting enough to tweet…

Thank you Mario

(and thanks to the one that tweeted it!)

Indeed what you mention is my experience when I was in Oxford. Bus bunching was always a problem specially during rush hours. However, the waiting time paradox is not due to bus bunching. It has to do with different times between buses. Actually, bus bunching is a way produce a high heterogeneous distribution of times between buses and thus the variance sigma is large and thus we have larger waiting times. But one can have the paradox without bus bunching.

Best