View Single Post
  #29  
Old 07-25-2005, 07:14 PM
BruceZ BruceZ is offline
Senior Member
 
Join Date: Sep 2002
Posts: 1,636
Default Re: A birthday puzzle

[ QUOTE ]
[ QUOTE ]
[ QUOTE ]
[ QUOTE ]
Why would the number of people in line affect the likelihood of the 2nd person's birthday matching the first person's?

[/ QUOTE ]

It wouldn't. But it would effect the chance of any person in line getting more than one shot at it. The game will be over as soon as the first ticket is bought. If you don't match birthdays with the first in line you are just out of luck because you won't get any more chances. But if you do match birthdays your most advantageous place to be is second in line so that someone in front of you who also matches won't take the prize away from you.

PairTheBoard

[/ QUOTE ]

I can't pretent to want to figure out the right answer to this question, but this, without a doubt, is not it.

[/ QUOTE ]

Under the assumption that there are a billion people in line, what's wrong with it?

PairTheBoard

[/ QUOTE ]

It sounds like you are only taking one factor into account. The further back you are in line, the more chance there is that someone in front of you will match and take the prize away from you, that is true. The other factor is that the earlier you are in line, the less chance you have of matching anyone ahead of you. These two competing factors produce a maximum probability of first matching which happens to occur at the 20th position.

To win, two things must happen. First, everyone ahead of you must have different b-days, or else someone else will win. The number of ways that n people can have different b-days is 365*364*363*... (n terms) = 365!/(365-n)! = P(365,n). In Excel, P is the =PERMUT function. The total number of ways the n people can have b-days is 365^n, so the probability that no one ahead of you has the same b-day is P(365,n)/365^n. Now, when the n people in front of you have different b-days, the probability that one of them has your b-day is n/365. So all together, the probability that you win is:

P(365,n)/365^n * n/365.

This has a maximum of 3.232% at n=19, so we want 19 people ahead of us, meaning that we want to be 20th.
Reply With Quote