Basic probability question (coins) 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.
 A: 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}$
A: 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}$
A: 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$$
A: Hint: Use the law of total probability.
A: 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!
