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?
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
How to Approach This
- Define your hypotheses (H0 and H1) clearly before performing any test.
- Calculate required sample size BEFORE running an experiment, using power analysis.
- Remember the Central Limit Theorem: sample means become approximately normal with large n.
- Watch for Simpson's paradox. Always segment data by key dimensions.
- 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 QuestionsSample Answer
Clarify
All coins look identical, the draw is uniform, and flips are independent given the coin. Let be the two-headed coin and a fair coin....
Approach
Bayes' rule with two hypotheses. The likelihood of 5 heads is 1 for and for . Then average the next-flip probability over the posterior....