# 129 coins

• Oct 30th 2009, 11:24 AM
Aquafina
129 coins
There is a pile of 129 coins on a table, all unbiased except for one which has heads on both sides. David chooses a coin at random and tosses it eight times. The coin comes up
heads every time. What is the probability that it will come up heads the ninth time as well?
• Oct 30th 2009, 04:12 PM
theodds
The first step to this problem is going to be figuring out the probability that David has the rigged coin, given that he has flipped 8 consecutive heads. As a general rule, if you are dealing with conditional probabilities that look difficult, you should ask yourself "would this be easier if I could flip the conditional around?" If the answer to that question is "yes" then the most straightforward way of tackling the problem is usually Bayes Rule. Let "A" mean the coin is rigged, and "B" be that 8 flips are heads. Then, using Bayes Rule:

$\displaystyle P(A|B) = \frac{P(B|A)*P(A)}{P(B|A)*P(B) + P(B|\mbox{Not }A) * P(\mbox{Not }A)}$

Obviously P(B|A) = 1, since if the coin is rigged, we always flip 8 heads. P(A) = 1/129, since there is only 1 rigged coin in the 129. P(B| Not A) = 1/(2^8) since this is the fair probability of flipping a coin 8 times and getting a head each time. And 128/129 is P(Not A) since there are 128 fair coins and 129 coins in total. If you grind out that probability you should get 2/3.

Now that we have the probability that David has the unfair coin, it is straightforward to calculate the chances of another head. 2/3rds of the time, he is for sure flipping a head. 1/3rd of the time, he has a 1/2 chance of flipping a head. So, the probability of another head is (1)(2/3) + (1/2)(1/3) = 5/6.

[Assuming I didn't make any stupid mistakes]
• Oct 30th 2009, 10:45 PM
Aquafina
Quote:

Originally Posted by theodds
The first step to this problem is going to be figuring out the probability that David has the rigged coin, given that he has flipped 8 consecutive heads. As a general rule, if you are dealing with conditional probabilities that look difficult, you should ask yourself "would this be easier if I could flip the conditional around?" If the answer to that question is "yes" then the most straightforward way of tackling the problem is usually Bayes Rule. Let "A" mean the coin is rigged, and "B" be that 8 flips are heads. Then, using Bayes Rule:

$\displaystyle P(A|B) = \frac{P(B|A)*P(B)}{P(B|A)*P(B) + P(B|\mbox{Not }A) * P(\mbox{Not }A)}$

Obviously P(B|A) = 1, since if the coin is rigged, we always flip 8 heads. P(A) = 1/129, since there is only 1 rigged coin in the 129. P(B| Not A) = 1/(2^8) since this is the fair probability of flipping a coin 8 times and getting a head each time. And 128/129 is P(Not A) since there are 128 fair coins and 129 coins in total. If you grind out that probability you should get 2/3.

Now that we have the probability that David has the unfair coin, it is straightforward to calculate the chances of another head. 2/3rds of the time, he is for sure flipping a head. 1/3rd of the time, he has a 1/2 chance of flipping a head. So, the probability of another head is (1)(2/3) + (1/2)(1/3) = 5/6.

[Assuming I didn't make any stupid mistakes]

Hi what I did was:

P(Biased and 9 heads) = 1/129

P(Fair coin and 9 heads) = 128/129 * (1/2)^9 = 1/498

So adding the 2, it is 5/498

Any comments on why my method is wrong

---

Also I havent done Baye's Theorem before, but I just tried it with the normal conditional probability rule P(A l B) = P (A n B) / P(B) and I got the same answer as you.
• Oct 31st 2009, 07:22 AM
theodds
The fact that 8 heads have already occured influences your opinion about which coin David has. Given that he has flipped 8 consecutive heads it turns out you feel that he has the unfair coin 2/3rds of the time. Another issue is that your method finds the probability of flipping 9 consecutive heads, not the probability of flipping a 9th head given that 8 have already been flipped. You clearly can't have an answer of less than 1/2 for this problem.

You can use the definition of conditional probability (which is what you did) and get the right answer. Bayes Rule is essentially the same thing, and I have a feeling that if you used the definition you probably ended up using Bayes Rule without knowing.

EDIT: There was a typo on my Bayes Formula above (now fixed), but the answer should still be right.