1. Home
  2. Explore
  3. Mathematics
  4. Coin Flip Cheaters

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Coin Flip Cheaters

Speaker 1Speaker 2

Coin Flip Cheaters

3:23
0:00-3:23
  1. Hope

    Okay, Corey, so imagine a bunch of blobs playing a game where they each flip a coin. Heads makes the flipper happy, tails makes the other one sad. Simple, right? But there's a rumor that some blobs are using trick coins that land heads more than half the time.

  2. Corey

    Cheaters! So we need to catch them. But how do we decide if a blob is cheating when even fair coins can sometimes give a streak of heads? We can't be 100% sure, but we need a method that's pretty good.

  3. Hope

    Exactly. Let's design a test. We have three goals: first, if a player has a fair coin, we want a low chance of wrongly accusing them. Second, if they're cheating, we want a high chance of catching them. And third, we want to use as few coin flips as possible.

  4. Corey

    So, we start with a simple test: after five flips, we accuse if all five are heads. But then we calculate the probability of that happening with a fair coin: it's 1/32, or about 3.1%. That's pretty low, so we might set our threshold at 5% for false accusations.

  5. Hope

    Right, and that test meets the first goal beautifully—less than 5% false positives. But what about catching cheaters? If a cheater's coin lands heads 75% of the time, the chance of five heads in a row is only about 24%. So we'd catch only a quarter of them, way below our second goal of 80%.

  6. Corey

    We need a better test. Maybe allow some tails. For example, if we require at least four heads out of five, the false positive rate jumps to nearly 19%—that's too high. And we still don't catch 80% of cheaters. So it's a trade-off.

  7. Hope

    Let's bring in the binomial distribution. It lets us calculate probabilities for any number of heads in a given number of flips. With five flips, the distributions for fair and cheater coins overlap a lot, so it's hard to separate them. More flips can help.

  8. Corey

    If we move to 23 flips, and accuse if the blob gets 16 or more heads, we meet both goals: fewer than 5% false positives and over 80% true positives. That's the smallest test that works for our 75% effect size assumption.

  9. Hope

    And we can calculate a P-value for each result. For a blob that gets 17 heads out of 23, the probability of that or more if the coin is fair is about 1.7%. Since that's below our 5% threshold, we call them a cheater. For 13 heads, the P-value is 34%, so we don't.

  10. Corey

    But here's the catch: all this depends on our assumption that cheaters' coins are biased 75% heads. In reality, they might be only 60% heads. Our test, designed for a 75% effect, might fail. When we simulated a population of 90% cheaters with 60% heads coins, we only caught about a quarter of them!

  11. Hope

    Exactly. The assumption about the effect size is crucial. If we had known the true effect, we'd need 158 flips with a threshold of 90 heads to achieve both goals. That's a huge difference. It's easy to forget that assumptions aren't facts.

  12. Corey

    So we've built up the core of frequentist hypothesis testing. Start with a yes/no question, model what results you'd expect under each scenario, design a test that balances false positives and true positives, and remember that your assumptions deeply affect the test's performance.

  13. Hope

    And that's how scientists often make decisions with limited data. It's not perfect—you can always get false positives or false negatives—but it's a systematic way to handle uncertainty. Next time, we'll look at Bayesian hypothesis testing as an alternative approach.

  14. Corey

    Until then, keep those assumptions in mind and don't let a lucky streak fool you.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent