|
#1
|
|||
|
|||
A birthday puzzle
This is a spin on a classic problem from probability. If you're familiar with that problem, this won't be that difficult but is still interesting.
The manager of a movie theatre announces that a free ticket will be given to the first person in line whose birthday is the same as someone else who has already purchased a ticket. You can get in line at any time. The birthdays are distributed uniformly at random over 365 days. Which position in line should you take? |
#2
|
|||
|
|||
Re: A birthday puzzle
[ QUOTE ]
This is a spin on a classic problem from probability. If you're familiar with that problem, this won't be that difficult but is still interesting. The manager of a movie theatre announces that a free ticket will be given to the first person in line whose birthday is the same as someone else who has already purchased a ticket. You can get in line at any time. The birthdays are distributed uniformly at random over 365 days. Which position in line should you take? [/ QUOTE ] Answer in white: <font color="white">You should stand 20th in line. </font> |
#3
|
|||
|
|||
Re: A birthday puzzle
Why?
|
#4
|
|||
|
|||
Re: A birthday puzzle
Because this is the first position where the probability of two people in line sharing a birthday is greater than 50%.
To illustrate let's enumerate the first several people in line. 1st person: he's screwed since he is first... 2nd person: There is a 1/365 chance of a shared birthday 3rd person: There are now three combinations that result in a shared birthday, so 3/365. 4th person: now there are 6 combinations leading to a 6/365 chance that there is a shared birthday. By now you should see the trend that is the probability of there being a shared birthday somewhere in the line at position n is given by P(shared b-day)_n = Sum(i from 1 to n-1) of i/365 Solving this for n you find the optimal place is n=20. Wait any longer and the odds are greater than 50% that someone will claim the prize before you. Get in line any earlier and you will not have maximized your potential to win. Of course, if your B-day is February 29 then you are just SOL. |
#5
|
|||
|
|||
Re: A birthday puzzle
[ QUOTE ]
3rd person: There are now three combinations that result in a shared birthday, so 3/365... [/ QUOTE ] The combinations don't do you any good. You need a match to win ... if another combination hits, it just means someone ahead of you in line won. |
#6
|
|||
|
|||
Re: A birthday puzzle
[ QUOTE ]
Because this is the first position where the probability of two people in line sharing a birthday is greater than 50%. [/ QUOTE ] No. Even if it were true, that wouldn't necesarily provide the solution. |
#7
|
|||
|
|||
Re: A birthday puzzle
Probability, assuming all are unique - because otherwise somebody else won ...
01. 1/365 02. 1/182.5 03. 1/121.6 ... 18. 1/20.3 19. 1/19.2 Cum = 19/19.2 20. 1/18.3 Cum = 20/18.3 |
#8
|
|||
|
|||
Re: A birthday puzzle
Are you assuming that the "player" values the opportunity and the ticket equally?
|
#9
|
|||
|
|||
Re: A birthday puzzle
Hrm. I took about 3 minutes to write a simple 20 line program to simulate this. Ran a quick 100,000 trial a couple times and the best spot seemed to average out to somewhere between 24.6 - 24.7. I wonder what I screwed up.
|
#10
|
|||
|
|||
Re: A birthday puzzle
I wrote a simple simulation and ran 1MM a couple of times --20 came out as the highest frequency both times.
|
|
|