Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

The New Coffee Room

  1. TNCR
  2. General Discussion
  3. Puzzle time - bias evidence

Puzzle time - bias evidence

Scheduled Pinned Locked Moved General Discussion
5 Posts 3 Posters 46 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • jon-nycJ Offline
    jon-nycJ Offline
    jon-nyc
    wrote on last edited by
    #1

    Years ago Alice bought a special coin from a magic shop which was supposed to flip heads with probability 60%, or was it tails? She's forgotten which.

    Alice flips the coin 10 times and it comes up heads every time, so she decides it was probably biased toward heads.

    Unbeknown to Alice, Bob bought (another copy of) the same coin, and also forgot which way it was biased. With lots of time on his hands, he flips the coin 100 times and gets 55 heads. Like Alice, he decides to treat it as heads-biased.

    Of Alice and Bob, which one actually had the best evidence that the coin was biased toward heads?

    "You never know what worse luck your bad luck has saved you from."
    -Cormac McCarthy

    1 Reply Last reply
    • KlausK Online
      KlausK Online
      Klaus
      wrote on last edited by Klaus
      #2

      It's very close! Not what intuition suggests.

      click to show

      I think this is a pretty straightforward application of Bayes' rule.

      Alice:

      P(HB | 10H) = P(10H|HB) * P(HB)/P(10H)
      = (0.6^10 * 0.5)/( (0.6^10 * 0.5 + 0.4^10 * 0.5)
      = 0.9829540725450702

      Bob:

      The probability of 55H out of 100 flips is 0.0478111801 for head-biased and 0.00082911901 for tail-biased via Binomial distribution formula.

      Hence:
      P(HB | 55H/100) = P(55H/100|HB) * P(HB)/P(55H/100)
      = 0.0478111801 * 0.5 /(0.0478111801 * 0.5 + 0.00082911901 * 0.5)
      = 0.9829540725453817

      This is so close in fact that the difference is maybe just due to rounding errors and they are in fact the same. To find out for sure, one would have to calculate the difference between the two terms symbolically, i.e., via algebraic manipulation. But I can't be bothered to do that now and I'm happy enough with "the chances are practically identical".

      1 Reply Last reply
      • KlausK Online
        KlausK Online
        Klaus
        wrote on last edited by
        #3

        click to show

        WolframAlpha thinks the difference between the two probabilities is 0. I'm not quite sure whether it arrived at this result numerically or analytically, though.

        5d824e4d-4ac1-49f7-afc6-69795b3d17ec-image.png

        1 Reply Last reply
        • HoraceH Offline
          HoraceH Offline
          Horace
          wrote on last edited by Horace
          #4

          ***Not safe for work content? More like too much work content.***

          click to show

          Maybe there's an elegant solution, but otherwise it's a straight math problem. The probability of 10 for 10 is simple, but 45 for 100 less so. I think the binomial theorem could be used, or integrating the probability distribution from 0 to 45. Anyway, that would be too much work for me. I wonder if there's something elegant.

          Education is extremely important.

          1 Reply Last reply
          • jon-nycJ Offline
            jon-nycJ Offline
            jon-nyc
            wrote on last edited by
            #5

            I have an elegant analytic solution:

            click to show

            Suppose you know that your coin has probability heads equal to either p or 1-p. You flip the coin n times and get h heads and t tails, with h+t=n and a difference d=h-t.

            Using the standard Bayesian formula and simplifying, you can show (setting tail probability as q=1-p):

            P(coin bias is p given observing h heads in n coin tosses)

            = (p^d)/((p^d) + (q^d))

            This is a function of the difference in the observed numbers of heads and tails, not the overall number of coin tosses n. So in the example the probabilities must be equal, since 10-0=55-45. Done.

            "You never know what worse luck your bad luck has saved you from."
            -Cormac McCarthy

            1 Reply Last reply
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups