How to Analyze a Loaded Coin with Probability and Statistics
At a glance
- 1. Model the tosses
Let each toss have the same heads probability p, with tosses independent.
- 2. Estimate p
If H heads occur in n tosses, the natural estimate is H divided by n.
- 3. Test fairness
Compare the observed result with the binomial distribution when p equals one-half.
- 4. Quantify uncertainty
Use a confidence interval or posterior distribution to describe plausible values of p.
A coin is loaded if its probability of landing heads is not one-half. Write
For a fair coin, . For a loaded coin, —although a coin may be physically biased even when a small experiment does not detect the bias.
The standard model assumes that tosses are independent and that the same value of applies on every toss. Under that model, the number of heads in tosses has a binomial distribution:
This model is the starting point for both estimating how loaded the coin is and testing whether it is reasonable to call the coin fair.
Estimating the probability of heads
Suppose you observe heads in tosses. The sample proportion
is the usual estimate of the coin’s heads probability.
For example, if a coin produces 62 heads in 100 tosses, then
The estimate is not necessarily exactly equal to the true value of . Random variation can produce 62 heads even when , and a genuinely loaded coin might produce close to 50 heads in a short run.
The standard error of the estimate, when is estimated by , is approximately
For 62 heads in 100 tosses, this is
A rough 95% interval based on the normal approximation is therefore
Because this interval barely excludes 0.5, the evidence against fairness is relatively weak. For small samples or estimates close to 0 or 1, use an exact binomial interval or Wilson interval rather than relying on this simple Wald interval.
Testing whether the coin is fair
To test whether the coin is loaded, set up hypotheses:
against the two-sided alternative
The null hypothesis says that the coin is fair. Under , the number of heads follows
The two-sided binomial p-value measures how likely it would be to obtain a result at least as extreme as the observed result if the coin were fair. A small p-value is evidence against fairness; it is not the probability that the coin is loaded.
If the suspected bias is specifically toward heads, use the one-sided alternative . If either heads or tails could be favored, use the two-sided alternative.
Worked example: 80 heads in 100 tosses
Suppose 100 tosses produce 80 heads and 20 tails. The estimate is
Under the fair-coin hypothesis, the null standard deviation of the number of heads is
The observed result is 30 heads above the null mean of 50, giving the approximate standardized statistic
A continuity-corrected normal approximation uses 79.5 rather than 80 for the upper tail:
The corresponding two-sided tail probability is on the order of , and an exact binomial test also gives a p-value below . Thus, under ordinary significance levels such as 0.05, the data provide extremely strong evidence that the coin is not fair.
An approximate 95% interval using the simple formula is
or approximately . A Wilson interval, which is more reliable for a proportion, is approximately . Both intervals place 0.5 far outside the plausible range suggested by the data.
Can you calculate the probability that the coin is loaded?
Not from the tosses alone in the usual frequentist framework. In that framework, is an unknown fixed parameter, and the test calculates the probability of the data assuming .
If you want a Bayesian probability for exact fairness versus loading, you need a Bayesian model that assigns prior probability to those competing possibilities. For example, choose a prior distribution for , then calculate the posterior distribution after observing the tosses. With a uniform prior, , observing heads and tails gives
For 80 heads in 100 tosses, the posterior is . A Bayesian probability such as depends on this prior and can be computed from that beta distribution, but it measures the posterior probability that the bias is toward heads, not generally the probability that the coin is loaded.
Because the Beta prior is continuous, it assigns probability zero to the exact value , and the posterior therefore has . To obtain a nontrivial posterior probability of exact fairness versus loading, use a prior with a point mass at together with a continuous alternative model for loaded coins.
Common mistakes
- Calling any unequal result proof of loading. A fair coin does not produce exactly half heads in every finite sequence.
- Using as certainty. The observed proportion is an estimate and has sampling uncertainty.
- Confusing a p-value with . A p-value assumes the null; it does not give the null hypothesis’s probability.
- Ignoring the direction of the test. Use a one-sided test only when a bias in a specified direction was justified before examining the data.
- Assuming independence without checking the experiment. Tosses influenced by a mechanical device, changing surfaces, or changing launch conditions may not follow one fixed binomial model.
- Stopping as soon as the result looks unusual. Repeatedly checking results and stopping selectively changes the reported evidence; decide the sampling plan in advance when possible.
References
- Introduction to the Practice of Statistics, David S. Moore, George P. McCabe, and Bruce A. Craig
- All of Statistics, Larry Wasserman
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.