top | item 35132728

How well do London buses match their timetables?

9 points| transportguy | 3 years ago |michalpaszkiewicz.co.uk

3 comments

order

DemocracyFTW2|3 years ago

The article links to an in-depth treatment about the Waiting Time Paradox, https://jakevdp.github.io/blog/2018/09/13/waiting-time-parad.... That article does lots of math that go over my head, so I did a very simple thought / NodeJS REPL experiment:

We look at three busses that are scheduled to arrive at 10min intervals, say, at the full hour, 10 past, and 20 past. We assume passengers arrive at a rate of 1 per minute, so if all three busses arrive on time, 10 will be sitting in the 00:10 bus and 10 in the 00:20 one.

Since 1 passenger arrives each minute, we have, in each group, 1 passenger that has just missed the earlier bus, so has to wait for 10 minutes; 1 passenger that has to wait for 9 minutes, and so on, meaning we have to sum up [ 1 .. n ] and divide by n to get the average waiting time,

    avg = ( n ) -> ( [ 1 .. n ].reduce ( sum, a ) -> sum + a ) / n
This gives 5.5, not 5, minutes of average waiting time, so already a little over the naive expectation of dt/2 = 5. Since both sets of passengers are identical otherwise, for our 20 assumed riders, the average waiting time is still 5.5min.

But let's assume the 00:10 bus is late 5min. Late busses are often caused by busy streets, and busy streets mean a lot of people are moving. Regardless, now the busses arrive at 00:00, 00:15, 00:20, meaning there will be 15 people for the 00:10 tour and only 5 for the 00:20 tour, meaning that the first group has an average of avg(15) = 8 minutes to wait, and the second avg(5) = 3. The overall average waiting time is still 5.5min.

But will the 00:20 bus arrive in time? This is in reality a bit unlikely because it will probably experience very similar traffic conditions as the previous tour, meaning its arrival time will be delayed by a similar amount, so we should push its arrival time to 00:25, meaning there are now 10 people instead of 5 waiting for it, so the average waiting time is now closer to (avg(15)+avg(10))/2, which is 6.75, almost 7 minutes instead of the naive assumption of 5.