Professional Documents
Culture Documents
Bday Approx
Bday Approx
A. Adhikari
Probability and Mathematical Statistics in Data Science
n1
Y
i=0
365 i
365
Step 1. We will just approximate the product and then subtract from 1 at the end. That
means we will be approximating P (Dn ), the chance that all n students have different birthdays.
P (Dn ) =
n1
Y
i=0
365 i
365
Step 2. Take log to convert the product to a sum, since sums are easier to work with than
products. Notice that each term in the sum is the log of a number that is near 1, and that the
term for i = 0 is 0.
log(P (Dn )) =
n1
X
log
i=0
365 i
365
n1
X
log 1
i=1
i
365
Step 3. Use the approximation log(1 + x) x for small x; this was explained in class and is
P
on page 14 of the text. Then carry out the sum, using the formula ki=1 i = k(k + 1)/2 for positive
integer k.
n1
X i
X
(n 1)n
1 n1
log(P (Dn ))
i =
=
365
365 i=1
730
i=1
Step 4. Invert the log by exponentiation, and subtract from 1.
P (Dn ) e
(n1)n
730
P (Bn ) 1 e
(n1)n
730