Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

There is a pile of 129 coins on a table, all unbiased except for one which has heads on both sides. Bob chooses a coin at random and tosses it eight times. The coin comes up heads every time. What is the probability that it will come up heads the ninth time as well?

To start, $P(H) = (\frac{1}2)^{9}$ (If the chosen coin is unbiased)

or $P(H)= 1^{9}$ (If the chosen coin is biased)

I'm not sure how to combine these to answer the question.I would appreciate it if someone could give an elementary explanation to this. Thanks.

share|improve this question

5 Answers 5

Using Bayes' Rule to find probability of biased coin;

$$ \Pr(Biased\mid8 heads)\\ =\frac{\Pr(8heads\mid biased)\Pr(biased)}{\Pr(8heads\mid biased)\Pr(biased)+\Pr(8heads\mid unbiased)\Pr(unbiased)}\\ =\frac{1/129}{1/129+1/2^{8}. 128/129}=2/3 $$

Thus the probability of head next time is $\Pr(head)=\frac{2}{3}+\frac{1}{3}\frac{1}{2}=\frac{5}{6}$

share|improve this answer
Thanks - I understand everything apart from the last step, where you multiplied $\frac{1}{2} by \frac{1}{3}$ –  Akash Jun 3 at 9:05
It is the probability of getting head if the coin is fair. –  user64066 Jun 3 at 9:17
Uses the law of total probability...think of the cases, the coin can either be biased or unbiased, so condition upon these... From his calculation, we know that the coin is biased with probability $\frac{2}{3}$ and thus unbiased with probability $\frac{1}{3}$. Hence, we can compute, by law of total probability (letting $H$ be the event that the next flip turns heads and $B$ the event the coin is biased) $$\begin{align} \mathbb{P}(H) &= \mathbb{P}(H \mid B)\mathbb{P}(B) + \mathbb{P}(H \mid B^C)\mathbb{P}(B^C) \\&= 1 \cdot \frac{2}{3} + \frac{1}{2} \cdot \frac{1}{3} \end{align}$$ @Akash –  afedder Jun 3 at 9:45
@WarrenHill:You have already got $8$ why are you putting in your calculation again. –  user64066 Jun 3 at 14:20
@user64066 sorry I miss-read the question. You are correct –  Warren Hill Jun 3 at 15:51

Pro Tip: In probability questions relating to coin tosses watch for any occurrence of powers of $2$ as these will simplify calculations.

Let $B$ be the event that the coin selected is biased. We know:

$\mathbb{\large P}(B) = \frac 1{129} , \mathbb{\large P}(\neg B) = \frac{128}{129} = \frac{2^7}{129}$

Let $H_f$ be the event of getting a head on flip number $f$. We know:

$\mathbb{\large P}(\mathop{\large\cap}_{f=1}^n H_f \mid B) = 1 , \mathbb{\large P}(\mathop{\large\cap}_{f=1}^n H_f \mid \neg B) = \frac{1}{2^n}$

So the probability of getting a head on the ninth flip given that a head was obtained on each of the first eight flips is:

$\begin{align}\mathbb{\large P}(H_9 \mid \mathop{\large\cap}_{f=1}^8 H_f) & = \dfrac{\mathbb{\large P}(\mathop{\large\cap}_{f=1}^9 H_f)}{\mathbb{\large P}(\mathop{\large\cap}_{f=1}^8 H_f)} & \text{by rule of conditional probability} \\ & =\dfrac{\mathbb{\large P}(B)\mathbb{\large P}(\mathop{\large\cap}_{f=1}^9 H_f\mid B)+\mathbb{\large P}(\neg B)\mathbb{\large P}(\mathop{\large\cap}_{f=1}^9 H_f\mid \neg B)}{\mathbb{\large P}(B)\mathbb{\large P}(\mathop{\large\cap}_{f=1}^8 H_f\mid B)+\mathbb{\large P}(\neg B)\mathbb{\large P}(\mathop{\large\cap}_{f=1}^8 H_f\mid \neg B)} & \text{by law of total probability} \\ & = \dfrac{\frac{1}{129}\cdot 1+\frac{2^7}{129}\cdot \frac{1}{2^9}}{\frac{1}{129}\cdot 1+\frac{2^7}{129}\cdot \frac{1}{2^8}} & \text{by substitution} \\ & = \dfrac{2^2+1}{2^2+2} & \text{by cancelling common factors} \\ & = \boxed{\dfrac{5}{6}} & \text{by evaluating} \end{align}$

share|improve this answer
Thanks for your effort - whereas this is a slightly more complicated method, it looks neat. –  Akash Jun 4 at 10:25

The first step is to work out the probability that your coin is biased.

The basic approach to this is to say how many ways can I get 8 heads from the biased coin $2^8$ since there are 8 throws and it could land on either side each time, we just have no way of telling the difference.

Now for the other coins there is just one way for each of the coins and the number of unbiased coins is 128.

So the probability that you have the biased coin $P_b$ is:

$$\frac{2^8}{2^8 + 128} = \frac{256}{384} = \frac{2}{3}$$

Knowing this we can work out the probability of 9 heads

$$P_b + (1 - P_b) \cdot \frac{1}{2^9} = \frac{2}{3} + \frac{1}{3}\cdot \frac{1}{512} = \frac{1025}{1536} \approx 0.6673$$

Or if you just want the probability that given you have already seen 8 heads that the next one is heads too.

$$P_b + (1 - P_b) \cdot \frac{1}{2} = \frac{2}{3} + \frac{1}{3}\cdot \frac{1}{2} = \frac{5}{6} \approx 0.8333$$

share|improve this answer
Thanks; this method is very nice and easy to understand. –  Akash Jun 4 at 10:23

Hint: Use the law of total probability.

share|improve this answer

This seems a simple problem of Bayes' theorem.

Probability of the coin being biased coin is: 1/129

Probability of getting head 9 times given the coin is biased: 1.

Probability of the coin being biased: 128/129

Probability of getting head 9 times given the coin is unbiased: $(1/2)^9$

Hence the probability of the event should be: $1∗1/129+(1/2)9∗128/129=5/516$

But it is given that the coin already turns up head 8 times. So the probability of that event= $1∗1/129+(1/2)8∗128/129=3/258$

Hence by Bayes' theorem ,the probability is $(5/516)/(3/258)=5/6$

Correct me if I'm wrong!

share|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.