Reply
Fri 25 Oct, 2013 05:15 am
Hi, I have this math problem that I tried to solve using combinations/factorial but with no luck.
There are 20 kids at the party, from whom 2 have birthday.
There are exactly 20 burgers (10 hamburgers, 10 cheeseburgers), that are randomly served to kids (1 kid gets 1 burger).
What's the probability that both kids who have birthday get the same type of burger (both get hamburger, or both get cheeseburger)?
Thanks
@Jack37,
Are any of them vegetarian?
@Jack37,
The probability that each child gets a cheeseburger is 50%. The chance two children have cheeseburgers is 25%, two hamburgers 25%, one of each 50%.
@Jack37,
The first kid is going to get either a hamburger or a cheeseburger - doesn't matter which. The probability that the second kid gets the same type is 9/19 because there are 9 of that type left, and there are 19 kids to distribute them to.
Thanks. How would I calculate this if the 2 kids were always at the end?
For example if there are 20 kids, I wanna know if the last 2 kids get the same type of burger. I have example results for 6, 10 and 256 kids and I need to find out the steps for this:
Probability that last 2 kids get the same type of burger:
if there are 6 kids: 0,625
10 kids: 0,7266
256 kids: 0,95
@Jack37,
It doesn't matter because you don't know anything about the children before them, so it's the same whether they are at the front, back or in the middle. Someone gave you some questionable information. If you have 256 children with half getting hamburgers and half cheeseburgers, the probability of the last two getting the same is not over 90%.
Mark is correct above. The chance for N children is (N-1)/2N.
@engineer,
Actually, it's (N/2 - 1) / (N - 1)
Let's say the person is giving burgers after flipping coin (head=hamburger, tail=cheeseburger), not randomly. He is repeating this until all burgers left are of the same type (or after there are not any left).
Example: There are 20 kids, and 10 hamburgers, 10 cheeseburgers.
Waiter flips coin to know what burger to give to first kid. He repeats this 17 more times for next 17 kids. When he comes to 19th kid, he doesn't need to flip coin because there are exactly 2 cheeseburgers left. What is probability that this situation will happen again?
So let the N be number of kids, including 2 celebrating kids. What is the probability that these 2 celebrating kids are left with same type of burger (cheese or ham). If the order matters now, these kids are always at the end.
Thanks.
@Jack37,
In order for the last two to be one of each, the preceding coin flips would have to have exactly the same number of heads and tails. The chance of flipping N-2 coins and getting exactly (N-2)/2 heads is:
(N-2)! / [(N-2)/2]! / [(N-2)/2]! / 2^(N-2)
so the chance of not getting that is one minus that term. For values of N from 2 to 30 it looks like this:
2 0.00%
4 50.00%
6 62.50%
8 68.75%
10 72.66%
12 75.39%
14 77.44%
16 79.05%
18 80.36%
20 81.45%
22 82.38%
24 83.18%
26 83.88%
28 84.50%
30 85.06%
Thanks a lot, that's exactly what I needed.