Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I randomly chose between 2 coins. One of the coins has a 0.8 chance of heads and a 0.2 chance of tails. The other is a fair coin that has a 0.5 chance of either heads or tails.

I flip this coin twice and get 2 heads. What's the probability that my next flip is heads?

I tried using Bayes' Theorem:

$$ P(H|HH) = \frac{P(HH|H)P(H)}{P(HH)} $$

But then $P(HH|H)$ is not easy to solve...

share|cite|improve this question
up vote 6 down vote accepted

Let $HH$ be the event that we get $2$ heads in a row. Let $H_3$ be the event the third toss is a head. We want $\Pr(H_3|HH)$. Maybe we start from something a little simpler than the Bayes' Theorem that you used, essentially the definition of conditional probability: $$\Pr(H_3|HH)=\frac{\Pr(H_3 \cap HH)}{\Pr(HH)}.$$

We calculate the two probabilities on the right. For $\Pr(HH)$, note that two heads in a row happens with probability $(4/5)^2$ if we use the funny coin, and with probability $(1/2)^2$ if the coin is the ordinary coin. It follows that $$\Pr(HH)=\frac{1}{2}\left(\frac{4}{5}\right)^2+\frac{1}{2}\left(\frac{1}{2}\right)^2.$$

A similar calculation gives us the probability of $HH$, followed by $H_3$: $$\Pr(HH\cap H_3)=\frac{1}{2}\left(\frac{4}{5}\right)^3+\frac{1}{2}\left(\frac{1}{2}\right)^3.$$ Divide.

share|cite|improve this answer
Thank you for fixing typo. – André Nicolas Oct 14 '12 at 4:52
because isn't this the case ? $$Pr(H_1, H_2) = Pr(H_1) * Pr(H_2) = (Pr(H_1|C_1) * Pr(C_1) + Pr(H_1|C_2) * Pr(C_2)) * (Pr(H_2|C_1) * Pr(C_1) + Pr(H_2|C_2) * Pr(C_2))$$ where $C_i$ represents selecting coin $i$ – Curious Jan 10 '15 at 13:26
I guess you did this, $$Pr(H1,H2) = \sum_i Pr(H1, H2 | C_i) P(C_i) = \sum_i Pr(H1 | C_i) Pr( H2 | C_i) P(C_i)$$ which makes more sense, but may I know what makes the equation in my previous comment wrong ? I mean, aren't the heads independent ? – Curious Jan 10 '15 at 13:54
The answer you had proposed would be correct if we picked a coin, tossed it, replaced it, picked and tossed again. But in the problem we pick a coin and flip this coin twice. – André Nicolas Jan 10 '15 at 15:13

If you had coin $A$ (the funny one), you would have a 0.64 chance of two heads; if you had coin $B$ (the fair one), you would have a 0.25 chance of two heads. Assuming you selected between $A$ and $B$ equiprobably, your probability of having coin $A$ is $${0.64\over 0.25+0.64} = {64\over 89}$$

and your probability of having coin $B$ is $1-{64\over 89} = {25\over 89}$.

Your chance of getting a head on the next flip is therefore $${64\over 89}\cdot \frac45 + {25\over 89}\cdot \frac12={637\over 890}\approx 71.6\%.$$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.