# Coin flipping example

I have a bag of 10 coins; 1 of them has heads on both sides, while the rest are normal (have heads on one side and tails on the other). Each face of a coin is equally probable when tossed. You choose 1 of the coins from the bag at random and then flip it 100 times observing heads every time. What is the probability that you chose a normal coin?

The probability that we take a normal coin is 9/10 and in 100 turns, it may be (9/10)^100, but I am not sure if this is correct.

-
What have you tried so far? –  Amelio Vazquez-Reina Mar 16 '14 at 3:44
Hello Challis! Well I don't know from where to start! Updated. –  truе Mar 16 '14 at 3:46
Is it i) you draw a coin, toss, put the coin back and repeat for another 99 times, OR ii) you draw a coin, toss it 100 times? Also, having a head and a tail does not mean it's a fair coin. Does the question specify anything else? –  Penguin_Knight Mar 16 '14 at 3:55
Yes, having tail and head is fair coin. And it's II. @Penguin_Knight –  truе Mar 16 '14 at 4:00
This question is routine bookwork (please read the link carefully). As such it should carry the self-study tag (please edit your question to add the tag), and it should follow the guidelines at the link (please edit your question to be in accord with the guidelines). –  Glen_b Mar 16 '14 at 6:46

Label the coins 1 to 10, and let coin 10 be the one with two heads. Say that we chose coin 1. For the experiment of flipping it 100 times and recording which sides land up, we get $2^{100}$ equally likely outcomes (since the coin is fair), one of which has $100$ heads landing up. The same is true for coins 2 to 9. For coin 10, there are also $2^{100}$ equally-likely outcomes, but all of them have $100$ heads landing up. Thus, the experiment "choose one of the ten coins, flip it 100 times, and record which sides land up" has $10\times 2^{100}$ equally likely outcomes. Of these, $(9\times 1)+(1\times 2^{100})$ have 100 heads landing up. Of these, $1\times 2^{100}$ are for coin 10. Now, the probability that (you chose coin 10) given that (100 heads landed up) is just (the probability that you chose coin 10 and 100 heads landed up) divided by (the probability that 100 heads landed up).

-

You can also look at it from the Bayes rule perspective: you are looking for the probability of the coin being normal, given the result of 100 heads - P(normal|result)

Now, according to said rule: $$P(normal|result) = \frac{P(result|normal)*P(normal)}{P(result)}$$

and, expanding the denominator: $$P(result) = P(result|bad coin) * P(bad coin) + P(result|normal) * P(normal)$$

Finally, plugging in the known values: $$P(result|bad coin) = 1$$ $$P(result|normal) = \frac{1}{2^{100}}$$ $$P(bad coin) = 1 - P(normal) = \frac{1}{10}$$ And you get: $$P(normal|result) = \frac{9}{9+2^{100}} \approx 0$$

-