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?
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} $$
$ 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}$