Hugh B. answered 06/13/15
Experienced Mathematics/Statistics/Biostatistics Tutor
The Birthday Problem is a famous problem that has led to a great deal of winning of bets over whether two people will have the same birthday in a room of people – the likelihood that two people will have the same birthday is much higher than people imagine it to be. Your suggestion of what the answer is is pretty close, by the way.
We assume the following:
1. No twins, and more generally, each birthday is independent.
2. Each of the 365 days of the year is equally likely to be a person's birthday.
3. We assume that anyone born on February 29 of a leap year will call their birthday March 1 or February 28 – we rule out February 29th as a birthday.
First, let's compute the total number of possible outcomes. The first person can have any one of 365 birthdays, and for each of those birthdays, the second person can have any one of 365 birthdays, so for two people, 365 x 365 possible outcomes. For each of those outcomes, the third person can have 365 birthdays, so for three people, 365 x 365 x 365, and so on. For six people there are 365 raised to the sixth power possible outcomes.
Next, let's compute the number of outcomes that involve no two people having the same birthday. The first person can have any one of 365 birthdays, but if we require no two people to have the same birthdays, then the second person can only have any one of 364 birthdays for each of those 365 birthdays because we exclude the birthday of the first person in order to not have two people with the same birthday. Similarly, the third person can only have 363 different birthdays, because we exclude the birthdays of the first two people. You should be able to see that the total number of outcomes that involve none of the six people having the same birthday is 365 x 364 x 363 x 362 x 361 x 360.
The probability that no two people of the six will have the same birthday is given by
(365 x 364 x 363 x 362 x 361 x 360) / 365 raised to the sixth power.
Two or more people having the same birthday is the complement of this event. In other words, when it is not true that no two people have the same birthday, then it is true that at least two people have the same birthday. You probably understand that an event and its complement must have probabilities that sum to 1. We will use this fact to wire the probability that at least two people have the same birthday as
The probability that at least two people of the six will have the same birthday is given by
1 – [(365 x 364 x 363 x 362 x 361 x 360) / 365 raised to the sixth power]
I used Excel to compute these probabilities, and they are as follows:
The probability that no two people of the six will have the same birthday is given by
(365 x 364 x 363 x 362 x 361 x 360) / 365 raised to the sixth power = 0.959537516
The probability that at least two people of the six will have the same birthday is given by
1 – 0.959537516 = 0.040462484
That is, about a 4% chance that at least two of the six will have the same birthdays. It turns out that in a group of 23 people, there is slightly more than 50% probability that two people will have the same birthday, and for 50 people the probability becomes 97%, 60 people 99%.
Hope this helps. Feel free to ask questions if not.
Kind regards,
Hugh
Total number of possible outcomes = 12 raised to the sixth power
Total number of outcomes with no two people having the same month = 12 x 11 x 10 x 9 x 8 x 7
Probability that no two people have birthdays in the same month =
(12 x 11 x 10 x 9 x 8 x 7)/ 12 raised to the sixth power = 0.222800926
Probability that at least two people have birthdays in the same month
= 1 - [(12 x 11 x 10 x 9 x 8 x 7)/ 12 raised to the sixth power] = 1 - 0.222800926 = 0.777199074
Please forgive me for the earlier mistake.
Kind regards,
Hugh
Hugh B.
06/13/15
David W.
Now, out of a room of five, we are not looking for the probability of any two of them having the same birthday month (or 1 – probability of all of them having different birthday months), but the problem asks, “what’s the probability that one or more of them has a birthday in the same month as yours?” (pre-specified).
So, the probability of the first of the five people having a birthday in my month is 1/12. The second person’s birthday is independent of the first, so the probability of that person sharing my birthday month is 1/12. And so forth for all five of them. Isn’t this the case? (Note: rather than “the birthday problem,” which asks for any two, this is the “matching socks” problem which asks for a match to yours.
06/13/15
Hugh B.
06/14/15
David W.
06/14/15
David W.
06/14/15
Hugh B.
If we want to find the number of people X for various levels of probability P we can solve P = 1 – (11/12)^X for X, where X is the number of people. For example, for P=0 .99, write
Also, it is clear that as the number of people X -> infinity, (i.e., as X grows without bound), the probability that at least one person shares your birthday approaches 1 asymptotically, and can be made to be as near to 1 as we would like. The easiest way to see this is to again look at the complementary probability. The probability that no one shares your birthday is (11/12)^X, which can be made to be arbitrarily small by making X sufficiently large. In other words, it is not possible to drive the probability that someone shares your birthday to be 1, but it is possible to get it as close to 1 as you would like.
I think it is easier to see what is going in a coin flipping example in which heads and tails are each equally likely and asking a question like what is the probability that we have had at least one head by the X-th flip? As the number of flips increases the sample space of possible outcomes increases very rapidly, while the outcome of "no heads in X flips" is always just one outcome in that sample space regardless of the number of flips. But then since each outcome in the sample space is equally likely, the outcome of "no heads" has a probability that has 1 in the numerator and a rapidly increasing number (i.e., 2^X) in the denominator, so that the probability of "no heads in X flips" approaches zero pretty fast as X increases. The same thing is going on with this birthday example. The birthday example isn't quite as dramatic as with coin flips because with 12 months, the number of outcomes that satisfy "no one born in the month of your birthday" that is in the numerator of the probability also grows with X, it just doesn't grow as rapidly as the denominator.
Best, Hugh
06/14/15
Hugh B.
1 - [(12 x 11 x 10 x 9 x 8 x 7)/ 12 raised to the sixth power]
(12 x 11 x 10 x 9 x 8 x 7)/ 12 raised to the sixth power = 0.222800926
1 - 0.222800926 = 0.777199074
06/13/15