# 99 fair coin and 1 coin that has 50% chance of being double headed

bayesianconditional probabilityprobability

A hat contains 100 coins, 99 of them are guaranteed to be fair and 1 that has a $$\frac{1}{2}$$ chance to be double-headed. A coin is randomly chosen at random and flipped 7 times. If it landed heads each time what is the probability that one of the coins is double-headed?

My approach:

Apply Bayes:

P(A) = the probability of it being double-headed.

P(B) = the probability of making 7 heads.

$$P(A|B) = \frac{P(A)P(B|A)}{P(B)}$$

$$P(A) = \frac{1}{100}\frac{1}{2} = \frac{1}{200}$$

$$P(B|A) = 1$$

$$P(B) = (\frac{1}{2}(\frac{1}{100}1 + \frac{99}{100}\frac{1}{2^7}) + \frac{1}{2}\frac{100}{100}\frac{1}{2^7} = \frac{327}{25600}$$

$$P(A|B) = \frac{\frac{1}{200}}{\frac{327}{25600}} = \frac{128}{327} \approx 39.14\%$$

Your work is correct, but only if we assume that the only other possibility for the coin that has a $$1/2$$ probability of being double-headed is that it is fair. This is not explicitly stated in the question. In other words, it could be double-headed, or it could be double-tailed. Or it could be biased in some other way. If it is either double-headed or it is fair, and either is equally likely, then your computation is correct.