Live data from Hacker News

The Waiting Time Paradox, Or, Why Is My Bus Always Late?

jakevdp.github.io

51–60 of 98 posts

Re: The Waiting Time Paradox, Or, Why Is My Bus Always Late?

#51
post #10

Hah great analysis. One factor with bus' is the schedule is likely planned to minimize early arrivals at the risk of being late more often. Usually when a bus is early it has to sit and wait until its departure time. A late running bus can be more efficient, and if kept until departure time might not ever get a chance to average down the bursts of lateness.

I don't think this is always true. My city measures buses as being on time at inner stops as being between something like 5 minutes early and 1 minute late (yes, you read that right). Timing stops, where they have to wait, are pretty infrequent (mostly bus terminals).

I don't know how common it is but it does exist. And buses perpetually being early means that if you're on time you wait even longer for the next one.

Re: The Waiting Time Paradox, Or, Why Is My Bus Always Late?

#52

In prague, the trams all run on time - within 2 minutes or less of the posted time. So I think this article is incorrect for this particular context.

Trams don’t have traffic in the way that buses do, and there are only minor differences in the drivers that could cause anomalies (I.e. you can’t steer a tram the wrong way) so they’re much easier to keep on time.

Re: The Waiting Time Paradox, Or, Why Is My Bus Always Late?

#53

Nice article. It reminds me of my year living in London, and taking the bus everyday to Imperial College from West End Lane in West Hampstead. There was a stop on both sides of the road - one for the outbound bus, and one for the inbound (the bus went from central London to a terminus and then returned mostly on the same route). Now we did not use schedules - way too inaccurate at rush hour, and the busses there were…

This is pretty counterintuitive. In the game described you should expect to see one 'wrong way' bus per play on average, not half as you might expect. On the other hand, you have an exactly even chance of catching your own bus before seeing a wrong one, so if your scoring system had been +1 for your bus and -1 for one or more wrong ones, then you would indeed score 0 over time. But with your point per bus scoring system your expected score turns out to be -0.5 per play.

Re: The Waiting Time Paradox, Or, Why Is My Bus Always Late?

#55
It's all much easier than that:

It's just the Poisson process, e.g., with a nice chapter in E. Cinlar, Introduction to Stochastic Processes.

Buses come as arrivals. So bus arrivals are a stochastic arrival process where stochastic just means varying randomly over time where, really, the randomly doesn't mean anything, includes deterministic arrivals, that is, known exactly in advance, but also admits any case of unpredictability.

Well, in short, if have a stochastic arrival process with stationary, independent increments, then the arrival process is a Poisson process and there is a number, usually denoted by lambda, so that the times between arrivals are independent, identically distributed random variables with exponential distribution with arrival parameter, the arrival rate, lambda. The stationary means that the probability distribution of the times between arrival does not change over time. The independent increments means that the time from one arrival to the next is independent of all the past history of arrivals.

The exponential distribution has the property, easy to verify with simple calculus, that the conditional expectation of the arrival time given that the arrival time is already greater than some number is the same as the expected arrival time.

So, net, if bus arrivals form a Poisson process, then the time until the next bus arrives is the same after waiting five minutes as not having waited at all.

Cinlar's treatment is nice because it is qualitative, that is, has assumptions that can often be confirmed or believed just intuitively. And we might not believe that bus arrivals meed the assumptions.

This subject can continue with, say, hazard curves for equipment failures and a lot more about Poisson processes.

E.g., the sum of two independent Poisson processes, say, Red buses and Blue buses, assuming that they are Poisson processes, is also a Poisson process with arrival rate the sum of the Red and Blue arrival rates. If randomly throw away some arrivals, then what is left is also a Poisson process with arrival rate adjusted in the obvious way.

In Feller's volume II is the renewal theorem that the sum of independent arrival processes, Poisson or not, with mild assumptions, converges to a Poisson process as the number of processes summed grows. So, if the users of a sufficiently busy Web site act independently with mild assumptions, then the Web site will see arrivals accurately as a Poisson process.

The vanilla Poisson process is Geiger counter clicks.

There is much more to the pure and applied math and applications of Poisson processes.

Re: The Waiting Time Paradox, Or, Why Is My Bus Always Late?

#56

OneBusAway is surprisingly accurate, at least in my experience. Google Maps has very good transit support too. One reason buses are late is because a bus must travel a circuit. Cars provide linear transportation, so the delay can only happen in the direction of your travel. Since buses run a circuit, they are impacted by delays in the direction opposite of your travel as well. Your bus might be late because the retur…

In my experience Google Maps is mostly useless - I know this because OneBusAway is so accurate and they always disagree.

Although Google Maps' transit planner is invaluable for finding possible combinations of buses to use, I rely on OneBusAway to tell me which one is actually going to be faster right now.

Re: The Waiting Time Paradox, Or, Why Is My Bus Always Late?

#57
post #13

> a Poisson process is a memoryless process that assumes the probability of an arrival is entirely independent of the time since the previous arrival. In reality, a well-run bus system will have schedules deliberately structured to avoid this kind of behavior: buses don't begin their routes at random times throughout the day, but rather begin their routes on a schedule chosen to best serve the transit-riding public.…

> What is an actual phenomenon that is well modeled by a poisson process?

Geiger counter clicks.

Arrivals between, say, 2-3 PM at a busy Web site.

Equipment failures for equipment with a constant hazard curve -- if can find such equipment.

Time between road kills on a highway.

Re: The Waiting Time Paradox, Or, Why Is My Bus Always Late?

#58
post #46
post #23

Earlier quoted context omitted.

That's a nice idea but ignores all the people sitting in their offices or homes, choosing to go or not go out of their places down to the bus stop. Better to consider each bus stop as an asset to invest in, the more valuable it is, the more people you can serve.

@mmt to clarify, you seem to be treating bus stops independent of alternative means of transportation. Measuring the average wait time of people at the bus stop is not enough: there are people who chose to ride a bike today instead of waiting at the bus stop, because of what happened to them yesterday at the bus stop.

> you seem to be treating bus stops independent of alternative means of transportation

Perhaps you misunderstood my point, which was more about data and statistics, as is the article itself, rather than transportation.

A similar argument could apply to the article's example of "average class size", where that's a valid statistic when observed by a teacher (or facilities manager), but misleading to a potential student. Something like "average size of a freshman's classes" would be more meaningful to a prospective student, and "oversampling" would not be a valid complaint there, either.

> instead of waiting at the bus stop, because of what happened to them yesterday at the bus stop.

It sounds like you're suggesting that there's an even better measure than the two I proposed, rather than the original measure being better. If so, I don't dispute that there could be many more, as I never claimed "best".

In this instance, though, measuring people who never show up to the bus stop in the first place is impossible, and even measuring those who showed up but abandoned waiting (i.e. never boarded) is impossible without additional instruments (whereas, presumably, electronic fare collection equipment could closely enough approximate counting boardings).

Re: The Waiting Time Paradox, Or, Why Is My Bus Always Late?

#59

Earlier quoted context omitted.

Your use of "of course" seems to imply that there's some statistical reason that the probability of the next bus being inbound vs outbound wouldn't be equal. Is there? If so, it seems like it must be a different reason than the one in the article. What am I missing...?

Because we might score -1, -2 or worse if 2 or 3 busses went in the other direction before ours came, but if ours came first, we score 1. We get on the bus and thus don’t know if another one or more arrives first on our side.

This reminds me of a mathematical paradox that makes me doubt your conclusion: "In this country, every couple wants to have one daughter. They keep having children until they have a daughter, and then they stop. What gender balance should we expect?"

Couples can have any number of sons, and every couple has exactly one daughter. Still, the accepted mathematical solution is an equal gender ratio for the couples' children.

Re: The Waiting Time Paradox, Or, Why Is My Bus Always Late?

#60
post #42
post #32

Earlier quoted context omitted.

Also, gaussians are great approximations for large n, too, since the convolution of any distribution with itself n times (for n "large enough") is close to gaussian (by the CLT. More generally, there are very nice error estimates for many distributions). I suspect this analysis can be carried out and yield quite good results in the gaussian case (a careful analysis might even yield error bounds on the result).

Yes. If you spend your whole life on one long multi-transfer bus journey, you'll end up with a gaussian. It's a bit less clear that gaussians should be used when e.g. fitting a coordinate to an astronomical feature, which might not actually be symmetrical. The other useful property that the gaussian has is its separability, in the 2D case. That is unique to the gaussian and counts for a lot.

Eh, I don’t think that many are required. Convergence to a Gaussian is pretty fast (you should check out page 299 of [0]), at four or five a Gaussian is already a quite good approximations.

———

[0] https://www.dartmouth.edu/~chance/teaching_aids/books_articl...

Post reply on HN