Birthday!

If there are 34 people in a party,what is the probability ( in % ) of any two of them not having their birthdays on the same day of the year.

Assume that the year is not a leap year.

Feels nice to post it on my birthday!

You can try out other Different! problems.


The answer is 20.46.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Frank Aiello
Nov 19, 2017

You have n n people at a birthday party. You want to determine the probability that any two of them do not have their birthday on the same day of the year. Let p ( n ) p(n) denote that in a set of n n people chosen at random, at least two people share the same birthday. We have:

p ( n ) = 1 365 × 364 × . . . × ( 366 n ) ( 365 ) n p(n) = 1 - \frac{365 \times 364 \times ... \times (366 - n)}{(365)^n} = 1 365 ! ( 365 n ) ! 36 5 n 1 - \frac{365!}{(365 - n)! 365^n}

Given n n people at a party, we want to determine: what is the probability that any two of them do not have their birthday on the same day of the year? This is simply the complement of p ( n ) p(n) . Thus, the probability is:

1 p ( n ) 1 - p(n) = 1 1 - ( 1 365 ! ( 365 n ) ! 36 5 n ) (1 - \frac{365!}{(365 - n)! 365^n})

In this case, we have n = 34 n = 34 and thus we have that if you have 34 people at a party, the probability of any two of them not having their birthdays on the same day of the year is:

1 p ( 34 ) 1 - p(34) = 1 1 - ( 1 365 ! ( 365 34 ) ! 36 5 34 ) (1 - \frac{365!}{(365 - 34)! 365^{34}}) \approx 20.46

how did you approximate?

Saritesh Tiwari - 3 years, 3 months ago
Adarsh Shetty
Jan 29, 2015

The first person can have his birthday on any of the 365 days. So the second person's birthday must be on any other day except the day on which first person was born i.e 364 days. It goes on like this and the last person i.e 34th person's b'day must be on any of the remaining 332 days. Therefore the probability is 364/365 363/365 362/365....... 333/365 332/365

How did you go about calculating the product?

Vaibhav Nayak - 5 years, 1 month ago
Affan Morshed
Jun 3, 2019

https://brilliant.org/wiki/birthday-paradox/ It is worth noting that this is a pretty big calculation from the equation we were given, so I will be going through 1 possible programming solution My python (I used python for this fairly simple and one of calculation as python is simple) code is this:

#we will look at the probability that an individual will not share a birthday with all previous individuals, and account for it on our probability, then repeat the 
process, until we run out of individuals
p=100#you start at 100% as there is no individual to share his/her birthday with
for i in range(34):#this is just accounting for all the individuals
    p=p*((365-i)/365)#here I am just multiplying p by the probability the (i+1)th person has a new birthday, which is just the number of days left to choose from 
(i.e. 365-the number of birthdays already chosen=365-the number of individuals from before=365-i) divided by the number of days in a year (365)
print(p)#just displaying the result

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...