Happy biRthday

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

About these ads

5 thoughts on “Happy biRthday

  1. 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.

Discussion

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s