# Probability of picking a biased coin

Suppose you have a bag of 100 coins of which 1 is biased with both sides as Heads. You pick a coin from the bag and toss it three times. The result of all three tosses is Heads. What is the probability that the selected coin is biased?

P(selecting a biased coin) = 1/100
P(getting a head thrice with the biased coin) = 1

P(selecting an unbiased coin) = 99/100
P(getting a head thrice with the unbiased coin) = 1/8

P(selecting a biased coin|coin toss resulted in 3 heads) =
P(selecting a biased coin and getting heads thrice)/
[P(selecting a biased coin and getting heads thrice) +
P(selecting an unbiased coin and getting heads thrice)]

= (1/100)/[(1/100) + (99/800)]
= (1/100)/(107/800)
= 8/107
= 0.0747


Is this correct? Thanks.

• Is this a homework question? – Carlos Accioly Feb 19 '13 at 12:19
• @CarlosAccioly This question was posed to me in an examination on Sunday. Just wanted to verify my answer. – tejas_kale Feb 19 '13 at 12:44
• Hi tejas, a standard-level question on an exam - even if you're pursuing it for self study - falls under the scope of the homework tag. – Glen_b Feb 20 '13 at 2:16
• @Glen_b Got your point. I thought that Carlos' question was to ensure that the poster is not cheating with his homework. Thanks for the info. – tejas_kale Feb 20 '13 at 11:48

Your answer is right. The solution can be derived using Bayes' Theorem:

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

You want to know the probability of $P(\text{biased coin}|\text{three heads})$.

What do we know?

There are $100$ coins. $99$ are fair, $1$ is biased with both sides as heads.

With a fair coin, the probability of three heads is $0.5^3 = 1/8$.

The probability of picking the biased coin: $P(\text{biased coin}) = 1/100$.

The probability of all three tosses is heads: $P(\text{three heads}) = \frac{1 \times 1+ 99 \times \frac{1}{8}}{100}$.

The probability of three heads given the biased coin is trivial: $P(\text{three heads}|\text{biased coin}) = 1$.

If we use Bayes' Theorem from above, we can calculate

$$P(\text{biased coin}|\text{three heads}) = \frac{1 \times 1/100}{\frac{1 + 99 \times \frac{1}{8}}{100}} = \frac{1}{1 + 99 \times \frac{1}{8}} = \frac{8}{107} \approx 0.07476636$$

• Cool! Cool! Cool! – Behacad Feb 19 '13 at 14:33

Here is a write that describes something very similar to that. The Bayes approach is the right way to proceed.

In general, P(biased coin|k heads) = (2^k)/[(2^k) + 99] Where k is no of consective heads

so if the trick coin was tossed 3 times (2^3)/[(2^3) + 99] = 8/(8+99) = 8/107 = 0.07