Fair and unfair coins There are 4 fair coins and 1 unfair coin that has only heads. We choose a coin and flip it three times. The result is HHH. What is the probability that the fourth flip is H? 
 A: First, use Bayes' rule to determine the probability of having selected the unfair coin. Call $UC$ the event "we selected the unfair coin" and $FC $  "we selected a fair coin".
$$P(HHH) = P(HHH|UC)P_0(UC) + P(HHH|FC)P_0(FC) = 1\times\frac{1}{5}+\frac{1}{8}\times\frac{4}{5} = \frac{3}{10}$$
$$P(UC|HHH) = \frac{P(HHH|UC)  P_0(UC)}{P(HHH)} = \frac{1}{5}\times\frac{10}{3} = \frac{2}{3}$$
$$P(FC|HHH) = 1-P(UC|HHH)=\frac{1}{3}$$
So we have:
$$P(H|HHH) = P(H|HHH,UC)P(UC) + P(H|HHH,FC)P(FC) = \frac{2}{3}\times1 +\frac{1}{3}\times\frac{1}{2} = \frac{5}{6} $$
A: We would expect the probability to be greater than $\frac{1}{2}$. We must solve for $P(\text{Heads})$. We have
$$P(\text{Heads})=P(\text{Heads}|\text{fair})\cdot P(\text{fair})+P(\text{Heads}|\text{unfair})\cdot P(\text{unfair})$$
However, we cannot just say $P(\text{fair})=\frac{4}{5}$ because we are given that the first $3$ tosses are heads.
$$P(\text{fair|}HHH)=\frac{P(\text{fair} \cap HHH)}{P(HHH)}=\frac{\frac{4}{5}\cdot\frac{1}{2}^3}{\frac{4}{5}\cdot\frac{1}{2}^3+\frac{1}{5}\cdot\left(1\right)^3}=\frac{1}{3}$$
So we have that the probability that the coin was fair when we rolled those $3$ heads was $\frac{1}{3}$ and the probability that it was unfair is $\frac{2}{3}$.
Thus we have 
$$\begin{align*}
P(\text{Heads})
&=P(\text{Heads|fair})\cdot P(\text{fair})+P(\text{Heads|unfair})\cdot P(\text{unfair})\\\\
&= \frac{1}{2}\cdot\frac{1}{3}+1\cdot\frac{2}{3}\\\\
&=\frac{5}{6}
\end{align*}$$
Which agrees with Nicola's answer.
A: $ p(H|HHH) = p(H|unfair) + 4 \cdot p(H|fair)= p(unfair) + p(fair) \cdot p(H) = \dfrac{1}{5} + \dfrac{4}{5} \dfrac{1}{2} = \dfrac{6}{10}$
