Two Plus Two Older Archives

Two Plus Two Older Archives (http://archives2.twoplustwo.com/index.php)
-   Probability (http://archives2.twoplustwo.com/forumdisplay.php?f=23)
-   -   A birthday puzzle (http://archives2.twoplustwo.com/showthread.php?t=299697)

jason_t 07-24-2005 10:18 PM

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?

BruceZ 07-25-2005 06:27 AM

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>

astarck 07-25-2005 07:41 AM

Re: A birthday puzzle
 
Why?

07-25-2005 11:51 AM

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.

SheetWise 07-25-2005 12:07 PM

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.

SheetWise 07-25-2005 12:18 PM

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

07-25-2005 12:22 PM

Re: A birthday puzzle
 
I still like the idea of going with a twin brother or sister.

SheetWise 07-25-2005 12:26 PM

Re: A birthday puzzle
 
Are you assuming that the "player" values the opportunity and the ticket equally?

LetYouDown 07-25-2005 12:52 PM

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.

jason_t 07-25-2005 12:59 PM

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.


All times are GMT -4. The time now is 07:50 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.