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.
 A: 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
$$
A: 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).
