# Determine a probability of coin is fair in repeated trial

The probability of getting head in a fair coin is 1/2 and the probability of getting tail in a fair coin is 1/2. While the probability of getting tail in a biased coin is 3/4 and probability of getting head in a biased coin is 1/4.

Suppose we don't know which one is a fair coin, which one is not.

What is the probability that the coin flipped was the fair coin, if 8 heads were observed in 10 trials?

Is it something like P(coin is fair | 8 heads appear in 10 trials)?

• Yes, the probability you are attempting to calculate is correct. Now, you would want to use Bayes' rule to calculate it. – астон вілла олоф мэллбэрг Dec 1 '17 at 4:13
• You need to know the probability for selecting which type of coin to flip, else there's not enough information. For example, is it specified that the coin to be flipped is equally likely to be fair or biased? – quasi Dec 1 '17 at 4:42

$$P(\text{8 heads in 10 tosses}|\text{fair coin})={10\choose{8}}\frac{1}{2}^{10}$$
$$P(\text{8 heads in 10 tosses}|\text{unfair coin})={10\choose{8}}\frac{1}{4}^{8}\frac{3}{4}^2$$
\begin{align*} P(\text{coin is fair}) &= \frac{P(\text{8 heads in 10 tosses}|\text{fair coin})}{P(\text{8 heads in 10 tosses}|\text{fair coin})+P(\text{8 heads in 10 tosses}|\text{unfair coin})}\\\\ &=\frac{{10\choose{8}}\frac{1}{2}^{10}}{{10\choose{8}}\frac{1}{2}^{10}+{10\choose{8}}\frac{1}{4}^{8}\frac{3}{4}^2}\\\\ &\approx 0.9913 \end{align*}
\begin{align*} P(\text{coin is fair}|\text{8 heads in 10 tosses}) &= \frac{P(\text{coin is fair}\cap\text{8 heads in 10 tosses})}{P(\text{8 heads in 10 tosses})}\\\\ &= \frac{0.5\cdot{10\choose{8}}\frac{1}{2}^{10}}{0.5\cdot{10\choose{8}}\frac{1}{2}^{10}+0.5\cdot{10\choose{8}}\frac{1}{4}^{8}\frac{3}{4}^2}\\\\ &\approx 0.9913 \end{align*}