In: Math
You have 100 coins, and 99 of them are fair (equal probability of heads or tails). One of them is weighted and has a 90% probability of landing on heads. You randomly choose one of the 100 coins. Find the probability that it is a weighted coin, under the following scenarios: (Hint: if your calculator can’t compute 100!, R can, just type factorial(100))
(a) You flip it 10 times and lands on heads 10 times (b) You flip it 10 times and it lands on heads 9 times
(c) You flip it 20 times and it lands on heads 18 times (d) You flip it 100 times and it lands on heads 77 times
(a) Here we have 100 coins, 99 of them are fair and one of them is weightd and 90% probability of landing on heads.
We flip it 10 times and lands on heads 10 times
Pr(Weighted coin l flip it 10 times and lands on heads 10 times )
Probability of any coin landing heads 10 times out of 10 times
Pr(landing 10 time head on 10 times) = Pr(Normal coin) * Pr(Normal Coin landing 10 heads on 10 times) + Pr(Weighted Coin) * Pr(weighted Coin landing 10 heads on 10 times) = 99/100 * (0.5)10 + 1/100 * (0.9)10
Pr(Weighted Coin) = 1/100 * (0.9)10 / [99/100 * (0.5)10 + 1/100 * (0.9)10]
= 0.7829
(b) Pr(Flip 10 times and lands 9 timess) = Pr(Normal coin) * Pr(Normal Coin landing 9 heads on 10 times) + Pr(Weighted Coin) * Pr(weighted Coin landing 9 heads on 10 times)
= 99/100 * 10C9 (0.5)10 + 1/100 * 10C9 (0.9)9 (0.1)
Pr(Weighted coin) = [1/100 * 10C9 (0.9)9 (0.1) ]/ [99/100 * 10C9 (0.5)10 + 1/100 * 10C9 (0.9)9 (0.1) ]
= 0.2861
(c) Here flip it 20 times and lands on heads 18 times
= Pr(Normal coin) * Pr(Normal Coin landing 18 heads on 20 times) + Pr(Weighted Coin) * Pr(weighted Coin landing 18 heads on 20 times)
= 99/100 * 20C18 (0.5)20 + 1/100 * 20C18 (0.9)18 (0.1)2
Pr(Weighted coin) = [1/100 * 20C18 (0.9)18 (0.1)2 ]/ [99/100 * 20C18 (0.5)20 + 1/100 * 20C18 (0.9)18 (0.1)2 ]
= 0.9408
(d) Here flip it 100 times and it lands on 77 times
Pr(Head on 77 times out of 100) =
Pr(Normal coin) * Pr(Normal Coin landing 77 heads on 100 times) + Pr(Weighted Coin) * Pr(weighted Coin landing 77 heads on 100 times)
= 99/100 * 100C77 (0.5)100 + 1/100 * 100C77(0.9)77 (0.1)23
Pr(Weighted coin) = [1/100 * 100C77(0.9)77 (0.1)23 ]/ [99/100 * 100C77 (0.5)100 + 1/100 * 100C77(0.9)77 (0.1)23 ]
= 0.9746