I found the following problem in an number of places online:
John once bet a fellow gambler that two of the first thirty persons they met and spoke to would prove to have the same birthday. Strong in the thought that he had 365 days running for him, the second hustler was pleased to accept. Suspecting, not unnaturally, a frame-up, he was careful to approach total strangers and chance passers-by, who could not be known to John. He lost the bet on the twenty-eighth question, when a duplicate birthday turned up.
“To tell you the truth,” said John afterward, “on each of the last five guys we spoke to, the odds were already better than even money in my favor. I'll explain the mathematics to you some time.”
Why is this true? At what point did John's chance of filling his bet pass 25%? 50%? 75%? 90%? 99%? (For your calculations, assume there are only 365 unique birthdays.)
N.B. John's statement about "the last five guys" assumes they will talk to all thirty people, regardless of whether the bet condition has been met or not, and the "better than even money" refers to the chance he will win the bet on or before that person.
Answer
Probability two people have the same birthday: $\frac{1}{365}$
Probability that (if the first two of people don't have the same birthday) the third person is a duplicate: $\frac{2}{365}$
So the probability that by the third person, there is a duplicate is: $\frac{1}{365}+(1-\frac{1}{365})(\frac{2}{365})$
The probability that by the nth person they will have found a duplicate:
$P(n) = P(n-1)+(1-P(n-1))*\frac{n-1}{365}=\frac{n-1}{365}+P(n-1)\frac{366-n}{365}$
I don't feel like calculating this exactly by hand so:
$P(15) \approx .255$
$P(23) \approx .509$
$P(32) \approx .754$
$P(41) \approx .903$
$P(47) \approx .955$
$P(57) \approx .99$
$P(366) = 1$
These answers give the probability that he would win the bet by this turn. If, however, he were to say "Given that I have not yet won on turn $n-1$ the probability I will win on turn $n$ is greater than 50%" this does not occur so early. In this case, $P(n-1)=0$ so:
$P(n)=\frac{n-1}{365}$
In order for $P(n)>.5$ then
$n>183$.
No comments:
Post a Comment