# Probability of having the same birthday

• Feb 18th 2010, 04:38 AM
discprobques
Probability of having the same birthday
I think I know how to do the problem, but I run into the problem that in Excel, the numbers that need to be calculated are too large and thus I cannot get an answer. If you can solve this without having this problem, I would love to know how you did it...

Find the smallest number of people in a room so that the probability that at least two people in the room were both born on April 1 exceeds 1/2. (Assume all birthdays are equally likely and that the year has 366 days.)
• Feb 18th 2010, 08:17 AM
NOX Andrew
If P(n) is the probability that no 2 people (out of n people) share the same birthday, then 1 - P(n) is the probability that at least 2 people (out of n people) share the same birthday.

Now, the 'real' problem is finding P(n).

The probability that the second person does not have the same birthday as the first person is $\frac{365}{366}$. The probability that the third person does not have the same birthday as either the first person or second person is $\frac{365}{366} \times \frac{364}{366} = \frac{365 \times 364}{366^2}$. The probability that the nth person does not have the same birthday as any of the people before that person is $\frac{366!}{(366 - n)! \times 366^n}$. Therefore, $P(n) = \frac{366!}{(366 - n)! \times 366^n}$.

It follows that $1 - P(n) = 1 - \frac{366!}{(366 - n)! \times 366^n}$. The question asks for what n is the probability greater than 1/2 = 0.5. Therefore, solve the inequality $1 - P(n) > 0.5$ for n to answer the question. (In my opinion, it's easier to plug in different values for n until 1 - P(n) exceeds 1/2.)
• Feb 18th 2010, 10:25 AM
discprobques
Hey, thanks for the reply. I think the question you answered though is slightly different than what I asked which changes things a little bit. The problem that I am trying to solve gives a specific date, April 1, rather than just asking what is the probability that any two people will have the same birthday.

Also, there is an important detail that I would like addressed which is that I my calculator and also Excel could not give me an answer based on my approach because i end up taking 366 to a very large power which ends up being too large to calculate. I was wondering if there is a better way to solve it or if I just need a better calculator lol.

Thanks again.
• Feb 18th 2010, 11:36 AM
Quote:

Originally Posted by discprobques
I think I know how to do the problem, but I run into the problem that in Excel, the numbers that need to be calculated are too large and thus I cannot get an answer. If you can solve this without having this problem, I would love to know how you did it...

Find the smallest number of people in a room so that the probability that at least two people in the room were both born on April 1 exceeds 1/2. (Assume all birthdays are equally likely and that the year has 366 days.)

If everyone is at least 4 years old, then the probability that a person was born on April 1 is $\frac{4}{3(365)+366}=\frac{1}{365.25}$

Hence, the probability that any 2 people have an April 1 birthday is $\left(\frac{1}{365.25}\right)^2$

In a room of n people, there are $\binom{n}{2}$ pairings.

The rest was in error.....
i'll redo it.
• Feb 18th 2010, 01:09 PM
discprobques
Also Archie, the problem says to assume that there are 366 days that are equally likely so u dont have to say 365.25. Thanks for the help!
• Feb 18th 2010, 01:55 PM
I guess you could say each birthdate is equally likely,
though they are not, since the probability of being born on Feb29
is a quarter the probability of being born on any other date, if we disconsider seasonal conception bias.

If we have n people in a room (classroom), all born in the same leap year,
then we can use that approximation.

In that case it is simplest to find the probability that less than 2 people have an April 1 birthday.

The probability that no-one has an April 1 birthday is $\left(\frac{365}{366}\right)^n$

The probability that only "Person 1" has an April 1 birthday is $\left(\frac{365}{366}\right)^{n-1}\frac{1}{366}$

The probability is the same for the other n-1 people,
so the probability that just one person of the n has an April 1 birthday is $\frac{n}{366}\left(\frac{365}{366}\right)^{n-1}=n\left(\frac{365^{n-1}}{366^n}\right)$

The probability that at least 2 people has an April 1 birthday is $1-\left(\left(\frac{365}{366}\right)^n+n\left(\frac{ 365^{n-1}}{366^n}\right)\right)$

This >0.5 for minimum n.
• Feb 18th 2010, 02:02 PM
discprobques
Okay, I think that is exactly how I approached it. My problem though was that my calc and Excel both were not able to find an answer because the numbers were getting too big when I was trying larger values of n. Were you able to get an answer?
• Feb 18th 2010, 03:05 PM
awkward
If there are n people in the room, the number of people with birthdays on April 1 has a Binomial distribution with p = 1/366. Check out the BINOMDIST function in Excel-- I think you will find it can handle the numbers involved.

An alternative approach is to assume the number of people in the room has a Poisson distribution with mean n/366. This isn't quite true, but it's very close, and will give you an equation you can solve more easily, although you will still need to use numerical methods (there is no analytic solution).
• Feb 18th 2010, 03:21 PM
vince
THis is one of those problems wherer it is easier to find the compliment of the probability. In fact the answer is very simple in this case.

Denote the event $V$ to correspond to someone sharing your birthday.

Now solve for $V^c$, the compliment.

Thus we are interested in:

$P(V^c)$ = $\frac{365^n}{366^n}$, since $366^n$ is the total number of outcomes, and the total # of ways $V^c$ can happen is $365^n$.

Therefore,

$P(V) = 1-\frac{365^n}{366^n}$

A spreadsheet solution would require use of the solver for a given specified probability. To get a feel, $n$ needs to be 254 for there to be a 1:1 chance that someone has your birthday.
• Feb 18th 2010, 03:41 PM
Hi discprobques,

If you write q=365/366=0.99726775956 and graph

$q^n+\frac{nq^{n-1}}{366}-0.5=0$

you find n=614 as solution.

If you use the binomial distribution as recommended by awkward,
which is clearly the feasible way to solve this,

then this concurs.
• Feb 18th 2010, 03:46 PM
vince
Quote:

Hi discprobques,

If you write q=365/366=0.99726775956 and graph

$q^n+\frac{nq^{n-1}}{366}-0.5=0$

you find n=614 as solution.

If you use the binomial distribution as recommended by awkward,
which is clearly the feasible way to solve this,

then this concurs.

the answer is not n=614 for a .5 probability; it is 254.
• Feb 18th 2010, 03:57 PM
vince
Quote:

I guess you could say each birthdate is equally likely,
though they are not, since the probability of being born on Feb29
is a quarter the probability of being born on any other date, if we disconsider seasonal conception bias.

If we have n people in a room (classroom), all born in the same leap year,
then we can use that approximation.

In that case it is simplest to find the probability that less than 2 people have an April 1 birthday.

The probability that no-one has an April 1 birthday is $\left(\frac{365}{366}\right)^n$

I don't see why you don't just stop here Archie. You yourself would then agree that the compliment of that event can be interpreted as at least one pair of people having April 1st as their birthday, which would correspond to what i wrote above.

The original poster said to solve for:
Quote:

Find the smallest number of people in a room so that the probability that at least two people in the room were both born on April 1 exceeds 1/2
Thus all u have to do is solve for $P(V)=.5$ in terms of n. turns out $n=254 \; for \; P(V)$ to be slightly greater than .5.
Regards, so far as im concerned, you had it...
• Feb 18th 2010, 04:14 PM
vince
actually, on re-reading the question, perhaps Archie is right to account for the probability that no-one even has April 1st as their birthday. What i compute corresponds to fixing April 1st, then walking into a room, and computing the number of people you need to ask to find someone with April 1st as their birthday. So i'm assuming there is already someone with April 1st as their birthday. Perhaps i'm assuming too much...unfortunately i went str8t to an answer before reading anybody else's post -- and assumed too much as a result.