Question
For the birthday problem we wrote pk for the probability that k people all have different birth- days. Under mild assumptions, we derived an expression
For the birthday problem we wrote pk for the probability that k people all have different birth-
days. Under mild assumptions, we derived an expression for pk assuming 365 days in a year.
Our expression was
pk = 365!/[(365 −k)!(365)^k ], k ≥1.
We are interested in computing 1 −pk for k = 100 since there were around 100 of us in our class
when I made the bet. However 365! and (365 −k)! are much larger than the largest integer used
in calculators or computers, so instead we use a recursive approach.
(a) Find a recursion for pk of the form pk+1 = pk*fk
The rest of this problem requires a few lines of code in R or Python. Set up code that
computes, for any input k, f0, f1, . . . , fk−1 and p1, p2, . . . , pk−1. It needs to use your answer to
(b) If there were 100 people in the classroom, what was the probability that I would win that
bet?
(c) What is the smallest number of people where the probability of me winning is greater than
1/2, i.e., where the bet is favorable for me?
Step by Step Solution
3.42 Rating (165 Votes )
There are 3 Steps involved in it
Step: 1
a The given expression for pk is pk 365 365 k365k k 1 ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started