Shubham Singh

You have a pile of 100 coins. 1 of the coins is an unfair coin and has heads on both sides. The remaining 99 coins are fair coins. You randomly select a coin from the pile and flip it 10 times. The coin lands heads all 10 times. Calculate the probability that the coin you selected is the unfair coin.

Answer:

This is a Bayes' theorem question. The formula for Bayes' theorem is:

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

In this case:

A = Unfair coin
B = Getting heads 10 times in a row

Hence,

$$ P(\text{Unfair coin} \mid 10 \text{ heads in a row}) = \frac{P(10 \text{ heads in a row} \mid \text{Unfair coin}) \cdot P(\text{Unfair coin})}{P(10 \text{ heads in a row})} $$

We have the following values:

$$ P(10 \text{ heads in a row} \mid \text{Unfair coin}) = 1 \quad \text{(Because both sides of the unfair coin are heads)} $$
$$ P(\text{Unfair coin}) = \frac{1}{100} $$
$$ P(10 \text{ heads in a row}) = \frac{1}{100} \cdot 1 + \frac{99}{100} \cdot \frac{1}{2^{10}} $$

Therefore,

$$ P(\text{Unfair coin} \mid 10 \text{ heads in a row}) = \frac{P(10 \text{ heads in a row} \mid \text{Unfair coin}) \cdot P(\text{Unfair coin})}{P(10 \text{ heads in a row})} $$

$$ = \frac{1 \cdot \frac{1}{100}}{\left(1 \cdot \frac{1}{100} + \frac{1}{2^{10}} \cdot \frac{99}{100}\right)} $$

$$ \approx 0.9118 \quad \text{(or approximately 91.18%)} $$

Therefore, the probability of the coin being unfair given that it landed heads 10 times in a row is approximately 91.18%.