Box contains 2 different coins, one is chosen randomly and tossed n times, head came all n times. Probability that n+1 toss is a head too? A box contains two coins: a regular coin and one fake two-headed coin (P(H)=1). One coin is choose at random and tossed $n$ times. 
If the first n coin tosses result in heads, What is the probability that the $(n+1)^{th}$ coin toss will also result in heads?

My solution:
$$\text{Required Probability} = \frac{1}{2}\times \left(\frac{1}{2}\right)^n \times \frac{1}{2}+\frac{1}{2} \times 1^n \times 1$$
 A: The probability of seeing $n$ heads in $n$ tosses of a fair coin is $2^{-n}$.  Thus the total probability of seeing $n$ consecutive heads is $$\frac 12\times 2^{-n}+\frac 12 \times 1$$ Therefore, given that you have in fact observed $n$ consecutive heads the new estimate for the probability that you have the fair coin is $$\frac {\frac 12 \times 2^{-n}}{\frac 12\times 2^{-n}+\frac 12 \times 1}=\frac {1}{1+2^n}$$  and the probability that you have the fake coin is therefore $$\frac {2^n}{1+2^n}$$  It follows that the probability that the next toss is also heads is $$\boxed {\frac 12\times \frac {1}{1+2^n}+\frac {2^n}{1+2^n}=\frac {1+2^{n+1}}{2+2^{n+1}}}$$
Note:  as $n$ goes to $\infty$ this tends to $1$, as it clearly should.
A: First we find the probability that the coin is fair.
To do this we use Bayes theorem, we want $P(A|B)$, where $A$ is the probability the coin is fair and $B$ is the probability the first $n$ flips are heads.
By Bayes theorem:
$P(A|B)=\frac{P(B|A)P(A)}{P(B)}$, the numerator is $\frac{1}{2^{n}}\times \frac{1}{2}$ and the denominator is $\frac{1}{2}+\frac{1}{2^n}\times \frac{1}{2}=\frac{2^n+1}{2^{n+1}}$. hence $P(A|B)=\frac{1}{2^{n}+1}$.
Therefore the final answer is:
$\color {green}{\frac{1}{2^n+1}\times \frac{1}{2}}+\color{\purple}{(1-\frac{1}{2^n+1})}=1-\frac{1}{2(2^n+1)}$
The green part is the probability that it is heads and that the coin is fair, and the purple part is the probability that it is heads and the coin is fake.
