starman2112,

The way the problem was phrased was “2 coin flips happen, and I have a machine that tells me either if both are Tails or not, this time it turns out that there is at least 1 heads”.

That is exactly what my program simulates. We’re only interested in the times when this time, it turns out that there is at least one heads. If they both land tails, then we don’t record anything about the flip, because the question is “if they aren’t both tails, what is the probability that they are both heads?”

Think of it this way: generate n pairs of flipped coins, and put them in Bucket 0. Take every pair of coins that has at least one heads, and put it in Bucket 1. You’ll be leaving 25% of the pairs in Bucket 0–specifically, the TT pairs. The TH, HT, and HH pairs are all in Bucket1. Now, 33% of the pairs in Bucket 1 are HH.

When I tell you that I’ve flipped a pair of coins, there’s a 25% chance that they landed HH. But when I tell you that at least one is heads, it’s like pulling a random pair out of Bucket 1. We don’t know whether that pair was in Bucket 1 because of the nickel, dime, or both.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • [email protected]
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • oklahoma
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • Ask_kbincafe
  • SuperSentai
  • feritale
  • KamenRider
  • All magazines