1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Bayes Theorem for coins problem

  1. May 23, 2012 #1
    1. The problem statement, all variables and given/known data

    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?

    2. Relevant equations

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

    3. 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.
     
  2. jcsd
  3. May 24, 2012 #2
    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: May 24, 2012
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Bayes Theorem for coins problem
  1. HELP ,(bayes theorem) (Replies: 9)

  2. Bayes theorem problem (Replies: 10)

  3. Bayes' Theorem (Replies: 8)

Loading...