# 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$$

• Your solution is correct. – Mark Fischler Aug 15 '16 at 18:08
• This does not look correct to me. If $n$ is very large then you are sure that you must have the weighted coin, in which the desired probability is $1$. Your formula, however, tends to $\frac 12$. Indeed, your value decreases as $n$ increases which makes no sense (to me). – lulu Aug 15 '16 at 18:11
• @MarkFischler I expect you misread the question. The OP correctly calculates the probability of getting $n+1$ consecutive heads, but that is not at all what the question was asking. – lulu Aug 15 '16 at 18:16

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.

• why is that the probability of a fair coin? – Jorge Fernández Hidalgo Aug 15 '16 at 18:21
• @CarryonSmiling That's the portion of the winning results which is explained by the fair coin. Worth remarking that my final answer coincides with yours, so I expect we are saying the same thing in different words. – lulu Aug 15 '16 at 18:22
• @CarryonSmiling On inspection, we are saying the same thing in the same words. – lulu Aug 15 '16 at 18:26

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

$\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)}$