<s>[INST] Coin toss puzzle with 1 biased and 2 unbiased coins Three coins are given: one two-head coin and two fair coins. You randomly choose a coin and the first three tosses give heads. What is the probability that 4-th toss is a head.
I have two solutions that give different results. Please help me to find the error.
1st solution:
$$P(\text{first 3 tosses are heads})=\frac{2}{3}\times\frac{1}{8}+\frac{1}{3}\times 1=\frac{5}{12}$$
$$P(\text{first 4 tosses are heads})=\frac{2}{3}\times\frac{1}{16}+\frac{1}{3}\times 1=\frac{3}{8}$$
$$P(\text{4th is head} \mid \text{first 3 tosses are heads})=\frac{P(\text{first 4 tosses are heads})}{P(\text{first 3 tosses are heads})}=\frac{9}{10}.$$
2nd solution:
$$P(\text{4th is head} \mid \text{first 3 tosses are heads})=$$
$$=\frac{2}{3}\times P(\text{4th is head} \mid \text{first 3 tosses are heads and coin is fair})+$$
$${}+\frac{1}{3}\times P(\text{4th is head}\mid\text{first 3 tosses are heads and coin is two-head})=\frac{2}{3}\times \frac{1}{2}+\frac{1}{3}\times 1=\frac{2}{3}.$$
 [/INST] Your second solution is erroneous.
\begin{align}
& \Pr(\text{4th is head} \mid \text{first 3 tosses are heads})\\[10pt]
= {} & \Pr(\text{fair} \mid \text{1st 3 are heads}) \times \Pr(\text{4th is a head} \mid \text{fair & 1st 3 are heads}) \\[4pt]
& {} + \Pr(\text{two-headed}\mid \text{1st 3 are heads} ) \\
& \phantom{{} + \Pr(\text{two-headed})} \times \Pr(\text{4th is a head} \mid \text{two-headed & 1st 3 are heads}) \\[10pt]
= {} & \Pr(\text{fair} \mid \text{1st 3 are heads}) \times \frac 1 2 + \Pr(\text{two-headed}\mid \text{1st 3 are heads} ) \times 1. \tag 1
\end{align}

So we will find $\Pr(\text{fair}\mid\text{1st 3 are heads})$ and $\Pr(\text{two-sided} \mid\text{1st 3 are heads})$.
\begin{align}
& \frac{\Pr(\text{fair}\mid\text{1st 3 are heads})}{\Pr(\text{two-sided} \mid\text{1st 3 are heads})} \\[10pt]
= {} &  \frac{\Pr(\text{fair})}{\Pr(\text{two-headed})} \times \frac{\Pr(\text{1st 3 are heads} \mid \text{fair})}{\Pr(\text{1st 3 are heads} \mid \text{two-sided})} \\[10pt]
= {} & \frac{2/3}{1/3} \times \frac{1/8}{1} = \frac 1 4.
\end{align}
If $p/(1-p) = 1/4$ then $p = 1/5$ and $1-p=4/5$.

Hence on line $(1)$ above we get
$$
\left( \frac 1 5 \times \frac 1 2 \right) + \left(\frac 4 5 \times 1\right) = \frac 9 {10}. 
$$
</s>