- Introduced by
- Classical exact test; textbook treatment by Siegel & Castellan
- Year
- 1988
- Type
- Exact one-sample test for a proportion
What does it do?
The exact binomial test checks whether an observed number of successes in a fixed number of independent binary trials is consistent with a pre-specified success probability p₀.
It computes exact binomial probabilities rather than relying on a normal approximation, which makes it suitable for small samples or proportions near 0 or 1. The page describes the two-sided version. One-sided versions use the same binomial probabilities, with the direction of the alternative fixed before the data are examined.
The intuition behind the method
Imagine flipping a coin n times and counting heads. If the coin's probability of heads were p₀, some head counts would be common and others rare. The test asks how probable the count we actually observed is under p₀, relative to the other possible counts. It adds up the exact probabilities of every outcome that is no more probable than the observed one. If that total is small, the data are hard to reconcile with p₀.
History
The exact binomial test is a classical procedure that follows directly from the binomial distribution, so its probabilities require no approximation. It is presented as the one-sample binomial test for a probability in standard introductory texts, for example Introduction to Statistics and Data Analysis, section 10.4.1.
When to use it
Use the exact binomial test when the outcome is binary, the trials are independent, and a reference probability p₀ was fixed before the data were examined, for example when asking whether a success rate differs from 50%. Because it does not rely on a normal approximation, it is preferred over the normal-approximation proportion test when the sample is small or the observed proportion is near 0 or 1. Do not use it when the observations are dependent, such as repeated measures on the same subjects, or when you need to compare two or more groups or adjust for covariates. With few trials the test has little power, and the smallest attainable p-value depends on n and p₀. Before relying on the test, check whether that smallest value can fall below your chosen significance level.
Limitations and considerations
- It is limited to one binary outcome compared against one fixed probability; it cannot model covariates or compare several groups.
- The success probability p₀ must be specified in advance and cannot be estimated from the same data being tested.
- For large samples it offers little advantage over the simpler proportion (z) test, and because the binomial distribution is discrete, the exact test is often conservative.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Exact: it uses the binomial distribution directly, so it does not introduce normal-approximation error at small sample sizes.
- Few assumptions: a binary outcome, independent trials, and a reference probability p₀ fixed in advance.
- Direct interpretation: it answers whether an observed success count is compatible with a hypothesised probability.
Applications
- Testing whether a coin, die, or other process deviates from a known fair probability.
- Checking whether an observed success or response rate differs from a benchmark value such as 50%.
- Quality-control and behavioural-science studies in which each trial yields a simple success/failure outcome and the sample is small.
How it works
How it works
Each trial has two possible results (success or failure), and the trials are assumed independent with a fixed success probability. The null hypothesis is H0: p = p₀, where p₀ is the reference probability. The two-sided alternative is H1: p ≠ p₀. One-sided alternatives are H1: p > p₀ or H1: p < p₀. Under H0, the number of successes k out of n trials follows the binomial distribution P(X = k) = C(n, k) · p₀ᵏ · (1−p₀)ⁿ⁻ᵏ.
Formula
P(X = k) = \binom{n}{k} p_0^{k}\,(1-p_0)^{\,n-k}No unknown parameters are estimated: p₀ is fixed in advance. For the two-sided test, the p-value is the sum of the binomial probabilities of all outcomes j whose probability is no greater than that of the observed count k. For a one-sided alternative, the p-value is the binomial tail probability in the direction of H1. The significance level α and the direction of H1 must be chosen before the data are examined. H0 is rejected when the exact p-value is smaller than α.
Formula
p\text{-value} = \sum_{\{j\,:\,P(X=j)\,\le\,P(X=k)\}} \binom{n}{j} p_0^{j}(1-p_0)^{\,n-j}Common pitfalls
- Choosing p₀ after inspecting the data rather than fixing it in advance, which invalidates the p-value.
- Applying it to dependent observations, such as repeated measures on the same subject, where the independence assumption fails.
- Using it to compare two groups; for two proportions, a proportion test or chi-square test is the appropriate tool.
- Quoting a normal-approximation p-value for a small sample when the exact binomial p-value is the one that should be reported.
Frequently asked questions
How is the binomial test different from the proportion (z) test?
The proportion test approximates the binomial distribution with a normal distribution, which works best when n·p₀ and n·(1−p₀) are reasonably large. The binomial test computes the exact binomial probabilities, so it remains appropriate in small samples or when the proportion is near 0 or 1, where the normal approximation can be inaccurate.
How small a sample can I use?
The test does not require normality or a large-sample approximation, so its calculation is valid at small n. Its power, however, depends on n and p₀. With very few trials, the smallest attainable p-value may exceed the chosen significance level, so no outcome can lead to rejecting the null hypothesis. Check this before relying on the test.
Can I use it to compare two groups?
No. It tests one observed proportion against one fixed reference probability p₀. To compare two proportions, use a proportion test or a chi-square test of association.
Why must p₀ be set in advance?
The null hypothesis is that the true success probability equals a specific value p₀. If p₀ is read from the same data being tested, the error rate is no longer controlled and the p-value loses its meaning.
Related methods
Sources
Siegel, S. & Castellan, N. J. (1988). Nonparametric Statistics for the Behavioral Sciences (2nd ed.). McGraw-Hill.
ISBN: 978-00705735742016_Book_IntroductionToStatisticsAndDat, Sect. 10.4.1 One-Sample Binomial Test for the Probability p (page not identified)