# Happy biRthday

April 9, 2013
By

(This article was first published on Marginally significant » Rstats, and kindly contributed to R-bloggers)

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)!