Challenge Questions Blog

Challenge Questions

Stop in and exercise your brain. Talk about this month's Challenge from Specs & Techs or similar puzzles.

So do you have a Challenge Question that could stump the community? Then submit the question with the "correct" answer and we'll post it. If it's really good, we may even roll it up to Specs & Techs. You'll be famous!

Answers to Challenge Questions appear by the last Tuesday of the month.

Previous in Blog: Cooking Onions: Newsletter Challenge (09/02/08)   Next in Blog: The Grazing Goat: CR4 Challenge (09/15/08)
Close
Close
Close
Page 2 of 2: « First < Prev 1 2 Last »
Rate Comments: Nested

Birthday Probability: CR4 Challenge (09/09/08)

Posted September 07, 2008 5:01 PM

This week's CR4 Challenge Question:

How many people must be in a room in order for the probability to be greater than 1/2 that at least two of them have the same birthday? (By "same birthday", we mean the same day of the year; the year may differ.) Ignore leap years.

Thanks to Maths_Physics_Maniac for this question!

Answer:

Given n people, the probability, Pn, that there is not a common birthday among them is

The first factor is the probability that two given people do not have the same birthday. The second factor is the probability that a third person does not have a birthday in common with either of the first two. This continues until the last factor is the probability that the nth person does not have a birthday in common with any of the other n - 1 people.

We want Pn < 1/2. If we simply multiply out the above product with successive values of n, we find that P22 = 0.524, and P23 = 0.493

Therefore, there must be at least 23 people in a room in order for the odds to favor at least two of them having the same birthday.

Reply

Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Good Answers:

These comments received enough positive votes to make them "good answers".

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Anonymous Poster
#98
In reply to #97
Find in discussion

Re: Birthday Probability: CR4 Challenge (08/26/08)

09/17/2008 6:29 AM

I think that number is about right for the US, though the numbers are higher amongst "African Americans".

I understand that there are parts of Africa where the numbers are more than double.

So in some parts of the world there could be a significant probability that a group of 23 people includes two twins - but bear in mind that these twins would not necessarily be a pair.

Reply
Guru
United States - US - Statue of Liberty - New Member Hobbies - Fishing - New Member

Join Date: Nov 2007
Location: Gone to Alabama with my banjo on my knee...
Posts: 5595
Good Answers: 20
#99
In reply to #98

Re: Birthday Probability: CR4 Challenge (08/26/08)

09/17/2008 7:00 AM

I've read the ratio is also higher among those of Scandanavian descent - Swedes, Norwegians, Finns, Danes, etc.

__________________
Veni, vidi, video - I came, I saw, I got it on film.
Reply
Anonymous Poster
#100
In reply to #99

Re: Birthday Probability: CR4 Challenge (08/26/08)

09/17/2008 10:15 AM

The answer was supposed to be revealed yesterday. So is it 548 or what? Don't make me come over there!

Reply
Guru
Hobbies - HAM Radio - New Member Engineering Fields - Mechanical Engineering - New Member United States - Member - New Member

Join Date: Jun 2007
Location: Kiefer OK
Posts: 1325
Good Answers: 22
#101
In reply to #98

Re: Birthday Probability: CR4 Challenge (08/26/08)

09/17/2008 12:46 PM

I understand that there are parts of Africa where the numbers are more than double.

According to Wikipedia, the Yoruba tribe of West Africa has the highest twin birthrate of any ethnic group. But, what is the probability of someone conducting this duplicate birthday experiment in West Africa? Also, what is the probability of future comments in this thread using the word "probability"?

__________________
I wonder..... Would Schrödinger's cat play with a ball of string theory?
Reply
Guru

Join Date: Apr 2007
Posts: 3531
Good Answers: 59
#102
In reply to #101

Probability of using probability in a comment in this probability thread

09/17/2008 1:06 PM

Last question:

Unity, except if they change the title

Reply
Guru
United States - US - Statue of Liberty - New Member Hobbies - Fishing - New Member

Join Date: Nov 2007
Location: Gone to Alabama with my banjo on my knee...
Posts: 5595
Good Answers: 20
#103
In reply to #102

Re: Probability of using probability in a comment in this probability thread

09/17/2008 4:18 PM

You're probably right...

__________________
Veni, vidi, video - I came, I saw, I got it on film.
Reply
Guru
Hobbies - HAM Radio - New Member Engineering Fields - Mechanical Engineering - New Member United States - Member - New Member

Join Date: Jun 2007
Location: Kiefer OK
Posts: 1325
Good Answers: 22
#125
In reply to #102

Are you sure, Fyzzy one?

09/20/2008 3:26 PM

Unity, except if they change the title

What are the chances that I'd be one of them?

__________________
I wonder..... Would Schrödinger's cat play with a ball of string theory?
Reply Off Topic (Score 5)
Power-User

Join Date: Apr 2007
Posts: 319
Good Answers: 4
#104

Re: Birthday Probability: CR4 Challenge (09/09/08)

09/17/2008 11:50 PM

What is the significance of word "AT LEAST" here. If we take the same question without these words will the answer be different?

__________________
sisira
Reply
Guru

Join Date: Apr 2007
Posts: 3531
Good Answers: 59
#110
In reply to #104

Re: Birthday Probability: CR4 Challenge (09/09/08)

09/18/2008 10:08 AM

Without "at least", you would need precisely two people sharing the same birthday. That means that situations where (for example) three people shared one birthday or there were two days on which people shared birthdays would be excluded from the count - so the number of people would be slightly larger.

Reply
Power-User

Join Date: Apr 2008
Posts: 107
Good Answers: 1
#105

Re: Birthday Probability: CR4 Challenge (09/09/08)

09/18/2008 3:47 AM

As pointed out previously,

Say, if 23 is the answer, then 24, 25, 26... and so on would give

AT LEAST 2 matched birthdays, or even more, i.e. 3, 4, 5... matched birthdays,

of probability GREATER THAN 1/2.

I therefore challenge it should be the MINIMUM number of people that would give 2 matched birthdays, NOT 3, 4, 5, ... matched birthdays!

Or, any number bigger than this MINIMUM would give more matches!

Reading all inputs, I believe we all agree that, for any 2 person pair, their probability of matched birthday is 1/365, neglecting leap years. (1/365 is therefore Not an average!)

Do you still insist "23" as the correct answer? Using 23, you've included 3, 4, 5,...N matched birthdays already!

AC Wing.

Reply
Power-User

Join Date: Apr 2007
Posts: 319
Good Answers: 4
#106
In reply to #105

Re: Birthday Probability: CR4 Challenge (09/09/08)

09/18/2008 4:37 AM

You have a supporter here. I have been reading the past posts with interest.

Statement 1

When there are 20 people in the room, there is a more than 50% chance AT LEAST one match is there.

Statement2

Until 23 people enter there is a more than 50% chance that birthday of a person already in the room is not matched by the last person (or anyone who entered before) who entered the room.

i.e. When there are 23 people in the room there is a more than 50% chance "???" one match is there.

Can someone tell me an appropriate word for "???"

(May be both of us are stupid and/or stubborn)..don't sue me for calling you that!-I already have two defamation law suits against me for 22 million & 26 million- of course the currency is Sri Lankan Rupees!

__________________
sisira
Reply
Guru
United States - US - Statue of Liberty - New Member Hobbies - Fishing - New Member

Join Date: Nov 2007
Location: Gone to Alabama with my banjo on my knee...
Posts: 5595
Good Answers: 20
#107
In reply to #106

Re: Birthday Probability: CR4 Challenge (09/09/08)

09/18/2008 7:13 AM

Approximately $204K and $240K US respectively, correct? Just curious, I have no intention to sue...

__________________
Veni, vidi, video - I came, I saw, I got it on film.
Reply Off Topic (Score 5)
Power-User

Join Date: Apr 2007
Posts: 319
Good Answers: 4
#108
In reply to #107

Re: Birthday Probability: CR4 Challenge (09/09/08)

09/18/2008 7:45 AM

At the current Ex.Rate 203.7K & 240.7 K to be precise. You seems be very knowledgeable in Sri Lankan currency!

This is only the tip of an iceberg (better call it the tip of a volcano)

Anyway that is what those 2 thugs claim, but to get that they will of course first have to prove that they have a good character. Naturally they will have a hard time proving that and I have all the intentions of making it more difficult.

Luckily in Sri Lanka cost of litigation is cheap, yet ultimately the lawyers will be the winners!

__________________
sisira
Reply Off Topic (Score 5)
Guru

Join Date: Jul 2006
Location: "Dancing over the abyss."
Posts: 4884
Good Answers: 243
#109
In reply to #106

Re: Birthday Probability: CR4 Challenge (09/09/08)

09/18/2008 9:59 AM

"Can someone tell me an appropriate word for "???""

That

milo

__________________
People say between two opposed opinions the truth lies in the middle. Not at all! Between them lies the problem, what is unseeable,eternally active life, contemplated in repose. Goethe
Reply
Guru

Join Date: Apr 2007
Posts: 3531
Good Answers: 59
#112
In reply to #106

Re: Birthday Probability: CR4 Challenge (09/09/08)

09/18/2008 11:01 AM

Your statement 1 is incorrect. I imagine it to be based on the formula

n.(n-1)/365/2

To show that this formula cannot be correct for all cases, consider the situation when there are 28 people in the room. This formula gives the probability as 1.0356. If we allow that to mean 1, that would mean that at least two people share a birthday on every single occasion. But it is possible for 28 people to be born on different days, so that is clearly wrong.

If the formula fails at 28 people, we have no reason to suppose it is correct at 20 people, where I believe that you have used it.

If you now return to SlideRuler's post #5 with a more open mind, you should see that he is not discounting occasions on which more than two people share a birthday - what he is doing is merely to ensure that the occasions on which three people or more share a birthday are each only counted once.

If that still does not convince, I suggest you try with a hypothetical year of three days, and with three people in the room. This will allow you to write down all 27 possible different birthday arrangements, and observe that exactly 6 of these possibilities do not include coincident birthdays. This gives a probability of 7/9 that there will be at least two people with coincident birthdays.

This is the same as given by SlideRuler's formula, whereas the other formula predicts a probability of unity.
I hope that one of these is enough for you either
. to agree the number - or
. to express the basis of your disagreement in a manner that I can follow.

Fyz

Reply
Power-User

Join Date: Apr 2008
Posts: 107
Good Answers: 1
#114
In reply to #106

Re: Birthday Probability: CR4 Challenge (09/09/08)

09/19/2008 2:44 AM

Yes, complete agree with you! We are tuned.

Cheers,

AC Wing.

Reply
Guru

Join Date: Apr 2007
Posts: 3531
Good Answers: 59
#111
In reply to #105

Re: Birthday Probability: CR4 Challenge (09/09/08)

09/18/2008 10:33 AM

The question says the minimum number of people that would produce at least 2 matched birthdays. That is the minimum number that is needed to produce any of 2, 3, 4 and upwards matched birthdays. If we perform the experiment with 23 people in the room a very large number of times, on half of occasions there will be a pair of people with a matched birthday; there will be more than two people with matched birthdays on nearly a quarter of the occasions, and these event will (correctly) be included in the number.

If we demanded exactly two matched birthdays, the number would be even higher.

Reply
Power-User

Join Date: Apr 2008
Posts: 107
Good Answers: 1
#113
In reply to #111

Re: Birthday Probability: CR4 Challenge (09/09/08)

09/19/2008 2:09 AM

You statement, n.(n-1)/365/2 does not produce any answer. Fair enough, we understand what you mean and I have no intention to pinpoint any funny mistakes for purpose other than those necessary for finding out the intended answer.

Let me show my calculations later.

Let's read the original untwisted question again: which states

How many people must be in a room in order for the probability to be greater than 1/2 that at least two of them have the same birthday? (By "same birthday", we mean the same day of the year; the year may differ.) Ignore leap years.

which is of course different to Physicist's input #111:

"the minimum number of people that would produce at least 2 matched birthdays. That is the minimum number that is needed to produce any of 2, 3, 4 and upwards matched birthdays(This is a twisted part, NOT stated in the original question). If we perform the experiment with 23 people in the room a very large number of times, on half of occasions there will be a pair of people with a matched birthday; there will be more than two people with matched birthdays on nearly a quarter of the occasions, and these event will (correctly) be included in the number."

As I said before, now we all agree, that the question had open ceilings, like

1. How many people (Seems no one would argue that we have to look for the minimum of people which I pointed out previously. If not, any number bigger than the minimum would satisfy the required constraints.)

2. probability to be greater than 1/2 (then we can use 1/2 as the minimum probability, any probability bigger than that would give the answer as well, but I am NOT taking it as bigger than unity, as will explain later)

3. at least (meaning this is the lowest requirement)

4. two of them have the same birthday (if 3 and 4 are view collectively together, as they are written together, then situations with only 2 people match starts to satisfy the requirement, and the minimum number of persons that give such 1 coincidence (i.e. 2 persons with matched birthday) is the answer)

My reason to choose 20 is because this is the minimum number of people that would give probability of 1/2 of at least 2 persons have same birthday. If we argue both (2 matches and 2 or more matches)can be possible scenarios of the question, then 20 is still the minimum of the 2 possible answers, hence I stand firm on my ground, 20, as explained.

Read that again:

"at least two of them have the same birthday"

So, any number of people have 1 pair of birthday coincidence will satisfy the required constraints. Of course, any number bigger than this number, the MINIMUM, would also answer this opened ceiling question. But, as we accept the MINIMUM is what we are looking for, then 20 should be the answer. Why? Here is my calculations:

Probability of have 1 pair people with birthday coincidence = 1/365 (ignoring leap years)

Let N be the minimum number of people inside the room that satisfy the requirements, then there are totally

NC2 possible ways of pairing of these N people, each with probability of birthday coincidence = 1/365.

Therefore their total probability of them having birthday coincidence is:

NC2×1/365

and we want to limited these probability to 1/2, hence the equation:

NC2×1/365 = 1/2 (Surely, 1/365 is not meant to be averaging the combination with number of days of the year, although numerically it happens to be the same)

as stated by sahasushank

N=20 (round off to the next integer). This includes combinations of A and B (B and A is treated as same as A and B, and would not repeat counted), A and C, A and D...A and T, B and C, B and D, ...B and T, ...S and T. Yes, combinations of Brenda and Arthur, Arthur and whoever are included in this estimation.

Now, comes Physicists's problem; the question start from asking the number of people, and N is the number of people that is true only at the probability of just bigger than 1/2 and the equations stated clearly about that. Physicists moved to higher number (of different probability) and said then the probability was great than unity, hence the higher number (say, 28) is not true and hence 20 could not be right!

This is like finding the L where L*3=6. When we say L=2, but someone argue that L cannot be equation to 2 because if we took L as 4, the product is not 6 any longer and hence we cannot accept L=2 as the right answer!

NC2×1/365 = 1/2 is only true when the probability is 1/2 and we use this equation only for the situation of finding such MINIMUM number of people, NOT the probability, Pn! N so found therefore satisfies the conditions of probability of great than 1/2, having at least 2 persons of having matched birthday

When understood that 23 actually included the cases of A and B and C, A and B and D, A and C and D..., A and B and C and D and E and F(which is actually more than at least 2 have matched birthdays, number of people so found is therefore not the minimum already)... The only possible way to explain these increased number was of course to twist the question to say they are included, but they are actually NOT!

Honestly, when I read back, I found it is much better than not to say anything about people are wrong, not even telling what was wrong without name! I therefore went off to say who is right only, and I did not want to point out problems!

Actually, had I make anyone feel bad about challenging your statement or pointing out troubles, I did not mean to make you feel bad, I found most of the time, your inputs are all highly valuable and I appreciate those tried to help! It was sometimes disturbing to see stupid politics in the market, especially at work and average people do not bother to care between right or wrong, just make those who can do it right to do all the work.... That's why I took steps to try to point out what I believe to be the truth! No offence meant! When in rush, my sentences tend to be short and concise, nothing meant to be instructive!

I take part in CR4 discussions because I found this an interesting place that people are genuinely devoting to find out truth, solving even the hardest questions without compromising anything, yield no way to politics, racist and discriminations. I hope this could be preserved!

Hope that would help, and I cannot guarantee my statement is comprehensive to all readers, if most of you understand, I am happy!

Reply
Guru

Join Date: Apr 2007
Posts: 3531
Good Answers: 59
#115
In reply to #113

Re: Birthday Probability: CR4 Challenge (09/09/08)

09/19/2008 5:38 AM

Unfortunately, this was not only long, but often impenetrable. For example "different to Physisist's input #111". There were two interpretations in #111, and the one that I said corresponded to the challenge was apparently indistinguishable from your interpretation.

But, returning to the real issue:
You appear to agree that n.(n-1)/365/2 cannot be correct because it gives an answer that is obviously nonsense for n=28.
You then proceed to use nC2x1/365 as the basis for your calculations. But
n
C2x1/365 can be written as n!/(n-2)!/2!x(1/365), and this is exactly the same as n.(n-1)/365/2. So you are still trying to use something that gives a nonsense answer when n=28 (check this with your calculator if you are still in doubt).

Now you hopefully recognise that the equation you are using cannot be valid, take a look at the more tractable case that I described - three people in the room and a three-day year. Then perhaps you may be ready to drop your preconceptions about what SlideRuler and MPM were doing in their calculations - and to recreate their actual processes.

Here (for what it is worth) is my attempt at a different description of the first stages:
N.B. the versions in square braces show the correspondence with SlideRuler's presentation
1 person in room:
. probability = 0 . [=1-(365/365)]
2 people in room:
. probability = 1/365 . [= 1-(365/365)*(364/365)]
3 people in room:
. probability of no previous coincidences = 364/365
. probability of coincidence if there were no previous coincidences = 2/365
. => probability of additional coincidence = (364/365).(2/365)
. Total probability of there being a coincidence =
. 1/365 + (364/365).(2/365) . [= 1 - (365/365)*(364/365)*(363/365)

Reply
Guru

Join Date: Apr 2007
Posts: 3531
Good Answers: 59
#118
In reply to #115

Re: Birthday Probability: CR4 Challenge (09/09/08)

09/19/2008 12:01 PM

I missed that you wrote:

"Now, comes Physicists's problem; the question start from asking the number of people, and N is the number of people that is true only at the probability of just bigger than 1/2 and the equations stated clearly about that. Physicists moved to higher number (of different probability) and said then the probability was great than unity, hence the higher number (say, 28) is not true and hence 20 could not be right!

This is like finding the L where L*3=6. When we say L=2, but someone argue that L cannot be equation to 2 because if we took L as 4, the product is not 6 any longer and hence we cannot accept L=2 as the right answer!"

It is not like that at all. I am not saying that the formula [Probability = function(N)] is wrong because the answer it gives for the probability at N=28 is not 1/2. I am saying that it is wrong because the formula gives an at N=28 that is simply not possible. In principle you could propose a range of validity for the formula, but to justify this range you would need to have a mechanism that could be shown to not to influence the result inside the range of validity, but that does influence the result outside it.

In this case, you have a formula that I believe we all agree is accurate for N=1 and for N=2. I think we also agree that it fails for N=28.
So the question is: where does it fail, and what is the reason. If you could find a mechanism that only appears for values of N>20 and that would cause it to fail, that would at least allow you to rationalise that it could be right at N=20. However, you have not attempted to do this, and you are unlikely to find such a mechanism.
On the other hand, a mechanism has been proposed that would cause the formula to fail at N=3. In the circumstances, I imagine you would want to examine that mechanism rather more carefully.

Reply
Power-User
Hobbies - Musician - guitar fan Greece - Member - Engineering Fields - Software Engineering -

Join Date: Jul 2007
Location: Athens, Greece
Posts: 259
Good Answers: 18
#116
In reply to #113

Re: Birthday Probability: CR4 Challenge (09/09/08)

09/19/2008 8:00 AM

The quiz is an old timer and I thought I knew how to get that magical 23. Nevertheless, I admit I got almost convinced when I saw your approachNC2×1/365 = 1/2 which at first seemed perfectly valid. I scratched my head for some time, but now I think I can see where's the flaw:

In order to use multiplication to calculate the probability of various events occurring separately, it is necessary that they are independent. Otherwise, we need to consider conditional probabilities.

Coming to our case now, the probability that a pair is good (i.e. it gives a birthday match), depends on whether another pair is good or not, therefore not all pairs of theNC2 ones are independent. Imagine, for example, that we have three people, A, B and C. If it is given that neither A and B are a good pair, nor A and C, then we know that the chance that the B and C are a good pair is not 1/365 but 1/364.

It is so easy to slip when dealing with probabilities. That's why I've always hated them...

__________________
tkot
Reply
Guru
United States - US - Statue of Liberty - New Member Hobbies - Fishing - New Member

Join Date: Nov 2007
Location: Gone to Alabama with my banjo on my knee...
Posts: 5595
Good Answers: 20
#119
In reply to #116

Re: Birthday Probability: CR4 Challenge (09/09/08)

09/19/2008 1:12 PM

"That's why I've always hated them..."

Probably so...

__________________
Veni, vidi, video - I came, I saw, I got it on film.
Reply Off Topic (Score 5)
Power-User

Join Date: Apr 2008
Posts: 107
Good Answers: 1
#134
In reply to #116

Re: Birthday Probability: CR4 Challenge (09/09/08)

09/24/2008 9:09 AM

Are you saying that if there are red, green and blue balls in a bag, then matching one of the color with a 4th ball is NOT an independent event? This is well established!

Everyone has one and only one birthday, the probability of matching one pair of person is therefore always 1/365, according to the given conditions. Matching A and B is 1/365, matching A and C is the same! It is NOT linked event, not mutually exclusive... Whether A is born on Jan 1, doest not affect if B would be born in Jan 1. (As we discussed, seasonal, holiday factors that affect reception is not considered here).

Tell me if you have a better answer!

AC Wing.

Reply
Power-User

Join Date: Jun 2007
Posts: 141
Good Answers: 2
#117
In reply to #113

Re: Birthday Probability: CR4 Challenge (09/09/08)

09/19/2008 11:31 AM

When I first looked at this challenge, I thought the answer was 20, too. I enjoy this forum, and learn from it frequently, as in this case. Fyz is right, the answer is 23.

A basic definition of probability is the number of favorable outcomes / the number of total outcomes. If I understand your argument correctly, you state that combinations with more than two matching birthdays should not be included, and doing so inflates the number to 23. However, if you don't include these combinations in the calculation, then the number goes beyond 23 because there are less favorable outcomes.

I admit my understanding of this subject is, shall I say, woeful. I cannot explain why this problem is set-up to find the probability for not matching first. My guess is that the combinatorial math for this approach is much easier to determine. Indeed, what would be the math for determining the amount of combinations with only matching pairs of 2 birthdays? I set-up a small piece of VBA code an used an example of four dice. Total combinations, 6^4 or 1296. Number of combinations where all four dice are the same, 6. Number of combinations where three dice are the same, 120. Number of combinations where only 2 are the same(possible for combination to have two pair), 810. Number of combinations where there are no matches, 360. In this case, the combinatorial math would have predicted (5*4*3*2)/6^4 = 360 combinations with no matching dice, or 1296-360= 936 combinations with matching dice. I do not know the combinational math to derive the number of combinations with just pairs (2) matching dice from "n" number of dice.

I went as far as downloading a 520 page document titled "Introduction to Probability" by Charles M. Grinstead and J. Laurie Snell, and found that it had this exact problem on page 77, example 3.3. While the presentation of the math is different from what was offered as a solution here, the result was still the same, with 23 people the probability is just over 50% there is a matching birthday.

The download was free, and I found it informative. A link to it is provided at http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/book.html

Reply
Guru

Join Date: Apr 2007
Posts: 3531
Good Answers: 59
#120

Probability of exactly one coincident birthday

09/19/2008 1:16 PM

Once we have the probability of one or more coincident birthday pairs, the probability of a single pair is not that difficult to find – provided that you can accept a recurrence relation rather than an explicit formula (there's probably an explicit formula lurking, but I didn't find it).

Suppose with N people in room, this probability is P1(N).

Add one more person:
. If there was previously exactly one coincident birthday, this would have a 1/365 probability of becoming multiple (or 364/365 of remaining as a single event).
. If there were previously no coincident birthdays {probability =365!/(365-N)!/365N}, the probability of creating a coincidence would be N/365

This leads to the following recurrence relation:
P1(N+1) = P1(N).364/365 + N/365.(365!/(365-N)!/365N

Relevant probabilities are given in the table below for N=1 to 28.
You can see that for a probability greater than 0.5 we would need 24 people to be in the room

By the way, the maximum probability of there being exactly a single coincident pair peaks at N=54, with a value of ~ 0.9066687

P.S. I was in two minds whether to mark this "off topic".

Number ofNo birthdaySingle birthday
peoplecoincidencescoincidence
110
20.9972602740.002739726
30.9917958340.00819666
40.9836440880.01632595
50.9728644260.027060882
60.9595375160.040313653
70.9437642970.055976424
80.9256647080.073922653
90.9053761660.094008667
100.8830518220.116075453
110.8588586220.139950638
120.8329752110.165450623
130.8055897250.19238282
140.7768974880.22054798
150.747098680.249742547
160.7163959950.279761006
170.6849923350.310398198
180.6530885820.341451544
190.6208814740.372723169
200.5885616160.404021867
210.5563116650.435164909
220.5243046920.465979649
230.4927027660.496304919
240.4616557420.525992203
250.4313002960.554906575
260.401759180.582927399
270.3731407180.6099488
280.3455385280.635879897
Reply Score 2 for Off Topic
Guru
United States - US - Statue of Liberty - New Member Hobbies - Fishing - New Member

Join Date: Nov 2007
Location: Gone to Alabama with my banjo on my knee...
Posts: 5595
Good Answers: 20
#121
In reply to #120

Re: Probability of exactly one coincident birthday

09/19/2008 4:07 PM

I'm glad you didn't mark it OT, it would have made the GA I voted you relatively useless. I note that to the number of (what I would regard as) significant decimal places, the (number of people = 23) is essentially a 50:50 split between "no coincident" and "1 coincident" birthdays. That means that 23 should be the correct answer to the OP, and it matches the answer I remember from some 40+ years ago when I first heard the explanation of the answer to this problem.

FWIW, that explanation was short, simple, and easy to understand, but, curse the luck, impossible (for me, at least) to remember! Ah, the Mists of Time - how they DO obscure...

__________________
Veni, vidi, video - I came, I saw, I got it on film.
Reply
Guru

Join Date: Apr 2007
Posts: 3531
Good Answers: 59
#124
In reply to #121

Re: Probability of exactly one coincident birthday

09/20/2008 5:26 AM

I'm certain the original explanation was the same as SlideRuler's, except supported by diagrams or arm-waving. Can't manage the armwaving on CR4, but different wording and some daft detail might help.

You want the probability of there being at least one coincidence, which must be the same as:
1 - (probability of zero coincidences).

For distributions that give zero coincidences with N people, (365-N) days of the year are unoccupied, so the probability of it still being zero coincidences when you add a person is (365-N)/365.
Thus, if the probability of zero coincidences for N people is P0(N), then the probability of zero coincidences for (N+1) people is P0(N).(365-N)/365, which gives
P0(N) = 365/365.364/365...(365-(N-1))/365 = 365!/(365-N)!/365N

So the probability of at least one coincidence for N people is:
Pcoincident(N) = 1 - 365!/(365-N)!/365N

N.B. although the principles in my post #120 were correct, there was a silly mistake. I've resubmitted a corrected version #123 (with check sums). You'll see that the probability never even approaches 0.5. Naturally, I've voted against the G.A.s of the original.
BTW, the challenge read "more than 1/2" - not almost exactly 1/2.

Reply
Power-User

Join Date: Jun 2007
Posts: 141
Good Answers: 2
#122
In reply to #120

Re: Probability of exactly one coincident birthday

09/19/2008 5:23 PM

I'm not quite following you're post. Are you stating probability for just pairs, as in no matches containing more that 2 birthdays?

Reply
3
Guru

Join Date: Apr 2007
Posts: 3531
Good Answers: 59
#123
In reply to #120

Re: Probability of exactly one coincident birthday

09/20/2008 5:20 AM

Once we have the probability of one or more coincident birthday pairs, the probability of a single pair is not that difficult to find – provided that you can accept a recurrence relation rather than an explicit formula (there's probably an explicit formula lurking, but I didn't find it).

Suppose with N people in room, this probability is P1(N).

Add one more person:
. If there was previously exactly one coincident birthday, there would be (N-1) days on which there were birthdays. So we would have an (N-1)/365 probability of the additional day creating multiple birthday matches (or (366-N)/365 of remaining as a single pair).
. If there were previously no coincident birthdays {probability =365!/(365-N)!/365N}, the probability of creating a coincidence would be N/365

This leads to the following recurrence relation:
P1(N+1) = P1(N).{(366-N)/365} + N/365.{365!/(365-N)!/365N}

Relevant probabilities are given in the table below for N=1 to 30.
We find that the probability of exactly a single match never reaches 0.5 - in fact the maximum probability of exactly one coincident pair is only ~0.386, and this is with 28 people in the room.

N.B. To check that I have not this time made another trivial error, I have included calculation of the multiple-birthday-match probability, and also of the zero-match probability based on the numbers calculated, plus the standard result to allow comparisons. It is still possible that I've made a more subtle mistake - so I'm open to correction.

NumberSingle pairmultipleAs calculatedFormula
peoplematchmatchesno matchesno matches
10011
20.0027400.9972602740.99726027
30.0081977.51E-060.9917958340.99179583
40.0163035.24E-050.9836440880.98364409
50.0269490.0001860.9728644260.97286443
60.0399810.0004820.9595375160.95953752
70.0552060.0010290.9437642970.9437643
80.0723980.0019370.9256647080.92566471
90.0912980.0033250.9053761660.90537617
100.1116220.0053260.8830518220.88305182
110.1330630.0080790.8588586220.85885862
120.15530.0117240.8329752110.83297521
130.1780060.0164050.8055897250.80558972
140.2008460.0222570.7768974880.77689749
150.2234910.029410.747098680.74709868
160.2456210.0379830.7163959950.71639599
170.2669310.0480770.6849923350.68499233
180.2871340.0597780.6530885820.65308858
190.3059680.0731510.6208814740.62088147
200.3231990.088240.5885616160.58856162
210.3386240.1050640.5563116650.55631166
220.3520770.1236190.5243046920.52430469
230.3634220.1438750.4927027660.49270277
240.3725640.165780.4616557420.46165574
250.3794430.1892570.4313002960.4313003
260.3840350.2142060.401759180.40175918
270.3863490.240510.3731407180.37314072
280.3864310.2680310.3455385280.34553853
290.3843520.2966160.3190314630.31903146
300.3802160.3261010.2936837570.29368376
Reply Good Answer (Score 3)
Power-User

Join Date: Jun 2007
Posts: 141
Good Answers: 2
#126
In reply to #123

Re: Probability of exactly one coincident birthday

09/22/2008 12:03 PM

If you are looking at the probability of only one single matched birthday pair in a room of "n" people, may I suggest the following approach:

If a single match exists in a room of people, and one of the people exits whose birthday matches, then you now have a room with no matching birthdays, the probability of for this "n-1" group is

P(No Match, n-1) = (365 * 364 * 363 * .... (365 - n))/365^(n-1)

Now the next person entering the room has a probability of matching with this group is equal to the product of probability of no matches to the "n-1" point and the probability of matching next (which is the 1 - the probability of no matches for "n");

P(Match, n) = P(No Match, n-1) * (1 - (365 * 364 * 363 * ... (365 - n + 1))/365^n)

Running the math, I calculated that the probability max is 0.26597 at 23 people (however coincidental that may be).

Comparing these probabilities with those generated for any match, the numbers look ok, and are equal for the n=2 scenario as expected, and are never greater than the any match probabilities.

I have a table of data, but I don't know how to post it.

Reply
Guru

Join Date: Apr 2007
Posts: 3531
Good Answers: 59
#127
In reply to #126

Re: Probability of exactly one coincident birthday

09/22/2008 1:20 PM

I can't see any basis for what you suggest.

As I said before, I'm certain that the basis of the method I presented is sound - the only question is whether I've made an elementary mistake. Anyone willing to take the trouble to follow the method should also be able to spot any careless slips.

N.B. that the method can readily be extended to larger numbers of coincident birthdays if desired.

Reply
2
Power-User

Join Date: Jun 2007
Posts: 141
Good Answers: 2
#128
In reply to #127

Re: Probability of exactly one coincident birthday

09/22/2008 6:43 PM

Hello Fyz,

Maybe I'm sick but I find this stuff interesting. However, I lack your experience with this subject and I'm still having problems following the logic of your post. I did run my equation against known data, only to find that is does not hold up. I did eventually derive an equation that did match known data ( I used dice). It is a non iterative equation based on the number of combinations containing only a single matching pair. It uses the logic of Pascal's triangle:

Probabilitysingle pair={single pair combinations}/(total combinations)

Probabilitysingle pair= {365!/(365-(n-1))! * n!/(2*(n-2)!)}/365n

I tried to use your posted equation, but I must have entered something wrong because I could not get it to work. None the less, the equation here generated the same results as your post. We're at the same place, but I don't completely understand your route, but that's my loss.

Reply Good Answer (Score 2)
Guru

Join Date: Apr 2007
Posts: 3531
Good Answers: 59
#129
In reply to #128

Re: Probability of exactly one coincident birthday

09/23/2008 4:48 AM

Your explicit equation is definitely an improvement on my recurrent version, so you've found the expression that I didn't. Naturally, you get the GA vote.

But I tried my equation again - and it seemed to work. Maybe I'm entering what it should be rather than what I wrote - or maybe the problem is with the calculated number being
P1(N+1) = function{P1(N)} rather than
P1(N) = function(P1(N-1)
as it's only too easy to take the value of N from the wrong line in the way I've written it.

Reply
Power-User

Join Date: Jun 2007
Posts: 141
Good Answers: 2
#130
In reply to #129

Re: Probability of exactly one coincident birthday

09/23/2008 10:19 AM

Thanks, Fyz. I'll take it as a compliment.

Reply
Power-User

Join Date: May 2008
Posts: 103
Good Answers: 6
#131
In reply to #123

Re: Probability of exactly one coincident birthday

09/24/2008 5:38 AM

Congratulations on "keeping your cool" and objectivity with the exchanges you had with AC_Wing.

You have shown great insight into the problem and deserve a GA somewhere. I gave it here

Reply
Power-User

Join Date: Apr 2008
Posts: 107
Good Answers: 1
#133

Re: Birthday Probability: CR4 Challenge (09/09/08)

09/24/2008 8:56 AM

For those who supported me, I haven't given up yet. I just did not want to bother with this kind of arguement!

The minimum size of population that gives 1 coincidence, is good enough as the number of people for at least 2 person having matched birthday at the specified probability. If 20 satisfied the conditions, of course 28 must be at higher probability and using 28 as number of different probability to argue 20 is not right, is totally unfounded.

Physicists is very good at his English. Good job that maths is nothing like you can twist. Including 2, 3, 4, ... 23 coincidences means it was an answer higher than what is expected. I noticed also, the simulation is done using the condition described by SlideRuler's, i.e. more than 1 coincidence of birthday!

There is nothing new from Physicist and SlideRuler's. Telling the same thing again and again, might lead somebody to believe you are right, but it does not change the truth though! Are there anything new so that you can shake off the incursion of extra matches that Physicist tried to twist?

I wasn't going to bother with this, let me show you one last time, when I'll be free next! Say your opinions all now so that, I don't have to repeat again and again my point of views!

AC Wing.

Reply
2
Guru

Join Date: Apr 2007
Posts: 3531
Good Answers: 59
#135
In reply to #133

Re: Birthday Probability: CR4 Challenge (09/09/08)

09/24/2008 10:42 AM

As you will see, I have so-far tried to avoid ad hominem arguments.
What I have done is try to say things in different ways in case I was not sufficiently clear the first times. It so happens that my skills at English were never very highly rated, so I shall take that bit as a compliment (albeit with the back of a hand wearing a knuckleduster).

However, given that my supposedly excellent English describing a simple sanity check for the formulae has apparently not encouraged (or enabled) you to perform the check, I shall present the results here. Hopefully, that will also show that words/arguments describing mathematical methods can be treated as mathematics

What I shall do is compare the different formulae with a case for which I can present exhaustive results (a three-day year and the uncorrelated birthdays of three people).

The table shows all 27 possibilities for the three day year, with people labelled a, b, and c for convenience.

Day 1Day 2Day 3Repetitions
a, b, c..triplet
a, bc.pair
a, b.cpair
a, cb.pair
ab c.pair
abcnone
a, c.bpair
acbnone
a.b, cpair
b, ca.pair
ba, c.pair
bacnone
ca, b.pair
.a, b, c.triplet
.a, bcpair
cabnone
.a, cbpair
.ab, cpair
b, c.apair
bcanone
b.a, cpair
cbanone
.b, capair
.ba, cpair
c.a, bpair
.ca, bpair
..a, b, ctriplet

You can see that there are 18 pairs and 3 triplets.
As the birth-dates are independent, each of the 27 possibilities has equal probability.
So, the probability of exactly two coincident birthdays (a pair) is 18/27 = 2/3, and
the probability of at least two coincident birthdays (a triplet) is 21/27 = 7/9

SlideRuler's (and Maths_Physics_Maniac's) formula for at least two coincident birthdays gives (1-3/3*2/3*1/3) =7/9.

Your chosen formula =3C2/3 gives (3.2.1/(2.1)/1)/3 = 1

My recurrence relation for exactly two matches gives:
. P1(1)=0, P1(2)=1/3, P1(3)=1/3.2/3+2/3.2/3 = 2/3

So, at least for this particular case, we have exact correspondence between SlideRuler's/Maths_Physics_Maniac's formula and the exhaustive check for the probability of "at least two people having coincident birthdays"; my recurrence relation also gives the same result as the exhaustive check for exactly one coincident pair of birthdays. Although non-exhaustive individual cases cannot be used to show that a general result is correct, they do indicate that it is worth looking into whether the basis of the results is correct. On the other hand, even one incorrect result from a formula indicates either that the formula does not have a sound underlying basis, or that some (possibly trivial) mistake was made in the derivation.

Reply Good Answer (Score 2)
Guru

Join Date: Apr 2007
Posts: 3531
Good Answers: 59
#137
In reply to #133

Probability of exactly one coincident birthday - explicit formaula

10/08/2008 10:08 AM

Explicit formula for a single pair of coincident birthdays.

Although I would have presented this in any case, perhaps the main significance is that is shows how the basis of the approach proposed by AC_WING can be extended to include the number of combinations of dates on which individual birthdays can occur – and thus to give the correct answer.

We may calculate the probability of exactly a single pair of coincident birthdays as follows:

We use Y to be the number of days in a year, and N to be the number of people in the room.
Obviously, the number of days on which there will be birthdays is (N-1). These are selected from the Y days in the year, so the number of different possibilities for the selected days is YC(N-1).
The number of possible choices of coincident pairs of birthdays is NC2.
The number of possible orderings of the (N-1) birthdates is (N-1)!.

Therefore, the total number of different ways in which exactly two people can share a birthday is:
YC(N-1). NC2. (N-1)!

On the other hand, the total number of different ways that the birthdays of N people can be distributed is YN.

Therefore, the probability of exactly two people sharing one birthday is:
YC(N-1).NC2.(N-1)!/YN

I have checked results using the above formula against the results given in post #123 using the recurrence relation.
Failing mistypes in this posting (and much to my relief) they are identical.

Reply
Anonymous Poster
#136

Re: Birthday Probability: CR4 Challenge (09/09/08)

09/29/2008 12:18 AM

My guess is that there would need to be 183 people in the room in order for you to have a better than 1/2 chance of having the same birthday. (1/2 365 possible dates)

Reply
Guru

Join Date: Apr 2007
Posts: 3531
Good Answers: 59
#138
In reply to #136

Re: Birthday Probability: CR4 Challenge (09/09/08)

10/09/2008 3:18 PM

I think you are trying to answer a different question: How many other people would there have to be in the room before there is a 50% chance that you have the same birthday as one of the others? But what happens if, as is likely, some of them share the same birthday? Obviously there will be fewer days on which they have birthdays, so the probability that you share a birthday with one of them will be reduced. The answer to this new question is the same as the number of people that would have to be in the room for the expected number of days on which people have birthdays to exceed 365/2. That would need significantly more than 183 people. the actual value is the value of N for which (364/365)N becomes less than 0.5. As (1-δ)^N decays approximately exponentially with increasing N, my first estimate for this would be about 365.ln(2), or 253 - which it turns out gives the expected number of different days on which the other people have a birthday is 182.67.

Reply
Associate

Join Date: Dec 2008
Location: Bombay, India
Posts: 47
Good Answers: 1
#139

Re: Birthday Probability: CR4 Challenge (09/09/08)

03/31/2009 6:56 AM

Old as the hills.

__________________
There is a tide in the affairs of men. Which, taken at the flood, leads on to fortune; Omtted, all the voyage of their life is bound in shallows and in miseries
Reply
Reply to Blog Entry Page 2 of 2: « First < Prev 1 2 Last »

Good Answers:

These comments received enough positive votes to make them "good answers".

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Copy to Clipboard

Users who posted comments:

3Doug (4); AC Wing (17); agua_doc (1); Anonymous Poster (12); Bill H. (1); charsley99 (1); Chazl (1); cnpower (9); DavidO (1); davidpm (3); Dazed and confused (2); ddk (1); Dedaelus (1); Duckinthepond (3); EnviroMan (7); Goodho (1); High Lander (2); Janissaries (1); jim35848 (3); Labyguy (1); Lendog (9); Maths_Physics_Maniac (1); Milo (8); Physicist? (25); Ried (2); sahasushank (10); ShakespeareTheEngineer (2); Sisira (7); SlideRuler (2); Snaketails (2); tkot (1)

Previous in Blog: Cooking Onions: Newsletter Challenge (09/02/08)   Next in Blog: The Grazing Goat: CR4 Challenge (09/15/08)

Advertisement