In: Math
if two people are randomly selected from a class of 30 students, what is the probability that they have the same birthday?
For calculating this, we must first ignore0 the rare case like the leap year which has 29 days in February.
Now, two people are randomly selected from all 30.
For solving this we can use the complement form of this that is
P(at least two have the same birthday) + P(no one has the same birthday) = 1.
Therefore,
P(at least two have the same birthday) = 1 - P(no one has the same birthday)
The first person can have any day of birthday from all 365 days of the year
So, the probability of being a birthday of 1st person on a day is
the probability of birthday of 2nd person other than 1st person is
similarly, for the 3rd person is
similarly, this will continue for all the 30 students.
..........................................
thus, the probability for last person (30th)
So, overall we get that the probability that no one has the same birthday is
Let's rewrite these all in condensed form
as we can see that the denominator 365 is repeating to 30 times so, we can write it as
and the numerator is decreasing from 365 to 336.
SO, we get:
Now, since we are needed to find only for 30 students so, will divide 365! with 335! so, that we can terminate all the extraneous multiplication that exceeding to 30 students.
So, we get
P(no one has the same birthday) =
so on calculating we get the probability =
So, P(at least two have the same birthday) = or can be written as .