Happy biRthday

[This article was first published on Marginally significant » Rstats, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

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


To leave a comment for the author, please follow the link and comment on their blog: Marginally significant » Rstats.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)