Is This Coin Biased? Testing 560 Tails in 1,000 Tosses
Statistics & ExperimentsModel answerLast updated
Run a two-sided one-sample proportion test on 560 tails out of 1,000 tosses at the 5% level, covering hypotheses, test statistic, p-value, and interpretation.
A coin is tossed 1,000 times and lands tails 560 times. Assume the tosses are independent and each lands tails with the same unknown probability p.
At the 5% significance level, decide whether the coin is fair. In your answer:
- State the null and alternative hypotheses and justify your choice of alternative.
- Give the test statistic and explain which distribution (or approximation) it follows under the null, and why that approximation is reasonable.
- Compute or approximate the p-value.
- State your conclusion and explain in plain language what the p-value means.
Optionally, show at least one cross-check (for example a confidence interval or an exact test) and mention a few follow-up questions you would expect.
Hints
Hint 1
Model the number of tails as Binomial(1000, p). Ask whether the question names a direction for the bias before you decide between a one-sided and two-sided alternative.
Hint 2
Compute the mean and standard deviation of the tail count assuming the coin is fair, then convert the observed count to a z-score. Use the standard error under the null, not the one from the sample proportion.
Hint 3
A z-score near 3.8 corresponds to a two-sided p-value on the order of 10^-4. Compare this with the 1.96 cutoff, and remember that the p-value is a statement about the data given a fair coin, not about the probability the coin is fair.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Setup
Let X be the number of tails, so X ~ Binomial(n = 1000, p) with i.i.d. tosses. Observed: x = 560, so the sample proportion is p̂ = 0.56.
1. Hypotheses
- H₀: p = 0.5 (fair coin)
- H₁: p ≠ 0.5 (biased in either direction)
I use a two-sided alternative because the question is simply "is it fair?" and no direction was committed to in advance. A one-sided test is only legitimate if the direction was fixed before seeing the data. Choosing "more tails" after seeing 560 would effectively halve the p-value and inflate the false-positive rate.
2. Test statistic and its distribution
Under H₀:
- E[X] = np₀ = 500
- Var[X] = np₀(1 − p₀) = 250, so SD ≈ 15.81
The normal approximation is well justified: np₀ = n(1 − p₀) = 500, far above the common rule of thumb of 10. By the CLT,
$$ Z = \frac{X - np_0}{\sqrt{np_0(1-p_0)}} \approx N(0,1) \text{ under } H_0 $$
Observed value:
$$ z = \frac{560 - 500}{15.81} \approx 3.79 $$
Equivalently, with proportions: (0.56 − 0.5) / √(0.25/1000) = 0.06 / 0.01581 ≈ 3.79. With a continuity correction, z ≈ (559.5 − 500)/15.81 ≈ 3.76.
The two-sided 5% critical values are ±1.96, and the observed z is nearly double that.
3. p-value
$$ p = P(|Z| \ge 3.79) = 2,(1 - \Phi(3.79)) \approx 1.5 \times 10^{-4} $$
With continuity correction the value is about 1.7 × 10⁻⁴, and the exact binomial test gives essentially the same number. A quick sanity anchor: a 3σ result has two-sided p ≈ 0.0027 and a 4σ result has p ≈ 6 × 10⁻⁵, so 3.8σ should land around 10⁻⁴.
4. Conclusion
Since p ≈ 1.5 × 10⁻⁴ < 0.05, reject H₀. There is strong evidence the coin is not fair, and the estimate points toward a tails bias.
Interpretation: if the coin were truly fair, a deviation of at least 60 tosses from 500 in either direction would occur only about 0.015% of the time. This is not the probability that the coin is fair; the p-value is computed assuming H₀ and says nothing directly about the probability of H₀.
Cross-checks
Confidence interval. For estimation, use the standard error at p̂:
SE = √(0.56 × 0.44 / 1000) ≈ 0.0157
95% CI = 0.56 ± 1.96 × 0.0157 ≈ [0.529, 0.591]
It excludes 0.5, consistent with the test. Note the test uses the null SE (0.0158) and the CI uses the estimated SE (0.0157). They are nearly equal here, but conceptually different.
Chi-square goodness of fit. Expected counts are 500 and 500, observed 560 and 440:
χ² = 60²/500 + 60²/500 = 14.4, with 1 degree of freedom. This equals z² (3.79² ≈ 14.4), so it is the same test with the same p-value.
Exact binomial test. scipy.stats.binomtest(560, 1000, 0.5) avoids the approximation. It is preferable for small n or when p₀ is near 0 or 1.
Common mistakes
- Using a one-sided test without prior justification.
- Wrong standard error, such as √(n·0.5) ≈ 22.4 instead of √(n·0.25) ≈ 15.81, or dividing 0.06 by 0.5 and forgetting the √n.
- Reading the p-value as the probability that the coin is fair.
- Saying "accept H₀" when a test is not significant. The correct phrase is "fail to reject."
- Confusing statistical with practical significance. A 6-point bias is both significant and large. With a huge n, even a 0.1-point bias would be significant, so always report the effect size too.
Likely follow-ups
- Smallest rejecting count at 5%? Need |X − 500| > 1.96 × 15.81 ≈ 31, so 531 or more tails (or 469 or fewer). With continuity correction the boundary is about the same.
- Sample size to detect p = 0.52 with 80% power?
$$ n \approx \left(\frac{(1.96 + 0.84)\times 0.5}{0.02}\right)^2 \approx 4{,}900 $$
- Bayesian view? With a uniform Beta(1,1) prior, the posterior is Beta(561, 441), with mean about 0.56 and a 95% credible interval around [0.529, 0.590], almost entirely above 0.5.