Coin flipping and Bayes' theorem... but where does binomial theorem come in?

756 Views Asked by At

Consider the following question:

You are face with two identical coins. One is fair, and the other comes up Heads 90% of the time. You flip coins, which results in THHHTHHHTH (seven heads, three tails). What is the probability that the coin you’ve been flipping is the unfair one?

Is it safe to assume order is irrelevant and to look for probability of seven heads and three tails with binomial distribution:

Let F be event that coin is fair, B be event that coin is biased, T be the observed toss. Then, using Bayes': $$ P(B|T)=\frac{P(T|B)\times P(B)} {P(T)} $$

$ P(T|B)=\binom{10}{7} \times 0.9^7\times 0.1^3 =0.0574 $

$ P(B)=0.5 $

$ P(T)=P(T|F)\cdot P(F) + P(T|B)\cdot P(B) = 0.1172 $

Thus the probability that the coin flipped is biased is 24.5%

Is this reasoning correct?

2

There are 2 best solutions below

2
On BEST ANSWER

Apart from a minor possible mistake I pointed out in a comment above, this looks good.

Is it safe to assume order is irrelevant and to look for probability of seven heads and three tails with binomial distribution

Let's see: With the binomial distribution, the final formula you get is $$ \frac{\binom{10}3\cdot 0.9^7\cdot 0.1^3\cdot\frac12}{\frac12\cdot\binom{10}3\cdot 0.9^7\cdot 0.1^3 + \frac12\cdot\binom{10}3\cdot0.5^{10}} $$ What happens if we don't use the binomial distribution and instead care about order? We get $$ \frac{ 0.9^7\cdot 0.1^3\cdot\frac12}{\frac12\cdot 0.9^7\cdot 0.1^3 + \frac12\cdot0.5^{10}} $$ which, you may notice, has exactly the same value because algebraically we have only simplified the fraction by $\binom{10}3$. So not only is it safe to assume; it doesn't matter one way or the other.

One final notational nitpick: Is there a specific reason you use both $B$ and $L$ rather than, say, $B$ and $\overline B$?

0
On

Although it does not matter in calculation as demonstrated by Arthur, yet the condition indicates the specific order of the $10$ tosses. So ($F-$ fair, $U-$ unfair): $$P(F\cap HHHHTTHHTH)=\frac12\cdot \frac{1}{2^{10}};\\ P(U\cap HHHHTTHHTH)=\\ \frac12\cdot \left(\frac{9}{10}\right)^7\cdot \left(\frac1{10}\right)^3;\\ P(U|HHHHTTHHTH)=\frac{P(U\cap HHHHTTHHTH)}{P(F\cap HHHHTTHHTH)+P(U\cap HHHHTTHHTH)}=\\ \frac{\frac{9^7}{2\cdot 10^{10}}}{\frac{9^7}{2\cdot 10^{10}}+\frac{1}{2^{11}}}\approx 0.3288.$$