Is This Coin Two Headed After Five Heads in a Row

Last updated: November 29, 2026

Quick Overview

A jar holds 100 coins: 99 fair and 1 with heads on both sides. You draw one at random, flip it 5 times, and see 5 heads. What is the probability it is the two-headed coin, and what is the probability the next flip is heads?

Google
Statistics & Math
Data Scientist
Google
November 29, 2026
Data Scientist
Phone Screen
Statistics & Math
Easy

0

0

0 solved


A jar holds 100 coins: 99 fair and 1 with heads on both sides. You draw one at random, flip it 5 times, and see 5 heads. What is the probability it is the two-headed coin, and what is the probability the next flip is heads?

A classic Bayesian updating question that Google uses in early screens for data roles. The interviewer checks a correct posterior, the predictive probability for the next flip, and comfort thinking about how evidence accumulates.

What the Interviewer Expects
  • Write the prior and likelihood for both hypotheses
  • Compute the posterior
  • Compute the posterior predictive for the next flip
  • Find how many heads make the two-headed coin more likely than not
  • Explain the intuition behind the numbers
Key Topics to Cover
Bayesian updating
posterior predictive
likelihood
prior odds
sequential evidence
How to Approach This
  1. Define your hypotheses (H0 and H1) clearly before performing any test.
  2. Calculate required sample size BEFORE running an experiment, using power analysis.
  3. Remember the Central Limit Theorem: sample means become approximately normal with large n.
  4. Watch for Simpson's paradox. Always segment data by key dimensions.
  5. Distinguish between statistical significance and practical significance.
Possible Follow-up Questions
  • How many consecutive heads until you are 99% sure?
  • What if the jar had 999 fair coins instead?
  • How would one tail change the posterior?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Browse Statistics Questions
Sample Answer
Clarify

All coins look identical, the draw is uniform, and flips are independent given the coin. Let DD be the two-headed coin and FF a fair coin....

Approach

Bayes' rule with two hypotheses. The likelihood of 5 heads is 1 for DD and (1/2)5=1/32(1/2)^5 = 1/32 for FF. Then average the next-flip probability over the posterior....


Submit Your Answer
Markdown supported