The summer after I graduated from high school I attended a summer program which is known among its alumni for having a number of crazy traditions, including some strange celebratory antics whenever someone has a birthday. The problem during my year? Not one person in the camp had a birthday the entire time. It was a science-oriented camp, so of course somebody had to calculate the probability of this happening. I don't remember exactly what it turned out to be (other than impossibly small), but during Thursday's class I realized that with R, I could figure it out in a matter of seconds.
For simplicity's sake I assumed that every day of the year is equally likely to be someone's birthday (which is not true, but close enough for this estimate). There were 97 delegates, plus 29 staph (not a typo - their enthusiasm is "infectious." ha ha.), for a total of 126 people. The program lasted almost four weeks, or about 26 days.
So, the probability of 0 occurrences of an event when there are 126 trials and the odds are 26/365 is:
pbinom(0,size=126,prob=26/365)
Which turns out to be:
9.041928e-05
Or, less than 1 in 10,000!
Subscribe to:
Post Comments (Atom)
3 comments:
Wow using stats to solve a real world problem!! Who knew it could be done. That intersting that the probability is so small. Maybe there is an effect of people who would potentially have a birthday during camp would not sign up for that reason, they want to be at home with family and friends to celebrate. Anyway, its good to see you can apply this stuff.
Sweet application Megan! It is nice to see a practical use for R (in the sense that probability is practical!). How is your independent project coming along? Any more ideas about your workout logs?
very impressive!
i wonder, though, if anyone might have been fibbing about not having a birthday during that time so as to avoid the 'strange celebratory antics'. that's a question of data reliability, though. your calculation is spot-on!
Post a Comment