Today is my birthday. It’s also the birthday of a close friend. What an incredible coincidence! Or wait, may be is just expected. One more time R comes into our help, because it has a built-in function to answer our question.
Which is the probability of two coincident anniversaries among a group of 17 people? (yes we have a mailing list, so I can count my friends semi-objectively without the fear of not counting them all). Just type:
pbirthday(n= 17, classes = 365, coincident = 2)
The answer is approximately 0.3, that is 3 of every 10 friend groups (of that size) have at least two anniversaries that coincide. Not that impressive, isn’t it?. But the beauty of stats is that stats are here to correct your intuition. To have an impressive coincidence (and statistical significant) you will need a group of 47 people, none of them with coinciding birthdays. And then, probably nobody will be amazed.
qbirthday(prob = 0.95, classes = 365, coincident = 2)
Anyway, happy birthday to all readers celebrating today (if any)!
Actually, I think the effect of the birthday problem on intuition is that a surprisingly *small* group of people has a surprisingly *large* chance of having a shared birthday. So for your group of 17 people, an intuitive guess at the probability might be 1/20 (17/365), and the real answer is six times bigger than that. I am surprised by how large it is.
I don’t think statistical significance has any relevance here – what is your null hypothesis? What parameter are you estimating?
My “I learned this today” is that the birthday distribution is in R. I never knew that before. Thank you for sharing this.
Yes, I was also surprised that R has this function implemented in the basic stats package.
Sorry for the “statistically significant” part. I am not fond of p-values, but I am a frequentist by training, so I can’t help. I was just referring to the fact that the probability of not having any coincidence on a 47 people group is 0.05.
Fair enough. I just tend to think of the birthday problem as a piece of probability,
Nice post and nice function. I wrote about this last year using ggplot2: http://jason.bryer.org/posts/2012-01-31/given-a-room-with-n-people-in-it-what-is-the-probability-any-two-will-have-the-same-birthday.html
I like your figure! very clear.