Bayes Theorem for coins problem

AI Thread Summary
The discussion focuses on applying Bayes' Theorem to a problem involving a bag of n coins, one of which is a fake coin with two heads. For part a, the probability that a coin is fake given it shows heads is calculated to be 2/(n+1). In part b, the user explores the probability of a coin being fake after flipping it k times and getting heads each time, leading to a formula of 2nk / n(n+1)^k. The calculations highlight the distinction between the probabilities of obtaining heads from the fake coin versus a regular coin. The user expresses uncertainty in their reasoning for part b, particularly regarding the probabilities involved.
Adyssa
Messages
202
Reaction score
3

Homework Statement



I have a bag of n coins, and 1 is fake - it has 2 heads.

a) Determine the probability that if I flip a coin and it comes up heads, the coin is fake.
b) If a coin is flipped k times and comes up heads k times, what is the probability that the coin is fake?

Homework Equations



Bayes Theorem: P(A|B) = [P(B|A) P(A)] / P(B)

The Attempt at a Solution



For part a) I think I have this correctly.

P(fake) = 1/n
P(!fake) = (n-1) / n
P(heads) = P(heads|fake) P(fake) + P(heads|!fake) P(!fake)
= 1 * 1/n + 1/2 * (n-1) / n
= 1/n + (n-1) / 2n
= 2/2n + (n-1) / 2n
= (n+1) / 2n

P(fake|heads) = [P(heads|fake) P(fake)] / P(heads)
= 1 * 1/n / (n+1) / 2n
= 1/n / (n+1) / 2n
= 1/n * 2n / (n+1)
= 2n / n(n+1)
= 2 / (n+1)

For part b), I'm a little stuck. I think the probability of the coin coming up heads k times = P(heads)k or [(n+1) / 2n]k. My reasoning here is that ignoring the fake coin the probability of getting 5 heads in a row would be 1/2 * 1/2 * 1/2 * 1/2 * 1/2 = (1/2)k.

So P(fake|(k heads)) = [P((k heads) | fake) * P(fake)] / P(k heads)
and P((k heads) | fake) = 1, so

P(fake|(k heads)) = [1 * 1/n] / [(n+1) / 2n]k
= [1/n] / [(n+1) / 2n]k
= 1/n * [2n / (n+1)]k
= 1/n * [2nk/(n+1)k]
= 2nk / n(n+1)k

But I'm unsure of my reasoning.
 
Physics news on Phys.org
I think the point is that you flip the same coin k times and it comes up heads k times. So the probability of getting that from a real coin is P(k heads|!fake) = 1/2^k, and P(k heads|fake)=1 . Otherwise the calculation is exactly the same.
 
Last edited:
I tried to combine those 2 formulas but it didn't work. I tried using another case where there are 2 red balls and 2 blue balls only so when combining the formula I got ##\frac{(4-1)!}{2!2!}=\frac{3}{2}## which does not make sense. Is there any formula to calculate cyclic permutation of identical objects or I have to do it by listing all the possibilities? Thanks
Since ##px^9+q## is the factor, then ##x^9=\frac{-q}{p}## will be one of the roots. Let ##f(x)=27x^{18}+bx^9+70##, then: $$27\left(\frac{-q}{p}\right)^2+b\left(\frac{-q}{p}\right)+70=0$$ $$b=27 \frac{q}{p}+70 \frac{p}{q}$$ $$b=\frac{27q^2+70p^2}{pq}$$ From this expression, it looks like there is no greatest value of ##b## because increasing the value of ##p## and ##q## will also increase the value of ##b##. How to find the greatest value of ##b##? Thanks
Back
Top