Have you ever had this feeling that bus (or tram, or train, etc.) leaves exactly 1 minute before you get to the stop AND the next one is forever away? Or you come to a crossroad which is usually very quiet, but exactly as you are about to cross it, there are like 100 cars going in every direction?

Apparently, both of those phenomenon’s can be explained with what is called “Hitchiker’s paradox”. To save you a bit of clicking, the upshot is that:

… if you take an interval of observation that is big enough, you will observe as many arrivals below 10 minutes and as many arrivals above 10 minutes. And you will see that the average waiting time is 10 minutes.

I’ve learned about long time ago and as soon as I did I started noticing it everywhere. Not that those things didn’t happen with me before, so it is probably some variant of Baader-Meinhof phenomenon.

Anyway, the point of this post is to check it with “real” data that I’ve collected myself (hence “Quantified-self” in the title). The source of the data is my notes every time I came to the tram stop that I take every day to work. Since it happens at around the same time every day, I thought that it should be quite consistent and all variance is explained by the paradox above. Ultimately, I want to find out whether, in general, arrival of tram to my stop follows the Poisson distribution with $$\lambda$$ equal to 4 minutes (official interval at the stop).

That all being said, the data is as follows:

library(ggplot2)
stops <- c(4, 2, 6, 4, 0, 5, 1, 3, 2, 3, 1, 2, 3, 4, 3, 4, 7, 5,
3, 3, 0, 2, 2, 2, 2, 0, 3, 1, 0, 4, 5, 1, 2, 4, 3, 2,
8, 2, 2, 5, 5)

ggplot(tibble::enframe(stops), aes(x = value)) +
geom_bar() +
labs(title = "How long I waited each time",
x = "Minutes",
y = "Frequency")

And $$\lambda$$ is:

parms <- MASS::fitdistr(stops, "poisson")
parms
##     lambda
##   2.9268293
##  (0.2671817)

So, in fact, whatever feeling I had of trams being too slow to arrive, it looks like they come (on average) even faster than they should. What would I have done without math?