What is a binomial test?
A binomial test is an exact hypothesis test used when your outcome has two categories (success/failure, yes/no, pass/fail) and you want to compare an observed success rate against a hypothesized probability.
Example: if a coin is supposed to be fair (p₀ = 0.5) and you flip it 20 times, a binomial test tells you whether your observed number of heads is unusually high or low under that assumption.
When should you use this calculator?
- You have a fixed number of independent trials (
n). - Each trial has only two possible outcomes.
- The probability of success is assumed constant under the null hypothesis.
- You want an exact p-value rather than a normal approximation.
Inputs explained
1) Number of trials (n)
This is the total number of observations. It must be a positive integer.
2) Observed successes (k)
The count of successes in your sample. It must be an integer between 0 and n.
3) Null probability (p₀)
This is the expected success probability if the null hypothesis is true. Common values are 0.5, 0.25, 0.1, and so on.
4) Alternative hypothesis
- Two-sided: tests whether the true probability differs from
p₀. - Greater: tests whether the true probability is greater than
p₀. - Less: tests whether the true probability is less than
p₀.
How results are interpreted
The calculator reports an exact p-value. Compare that p-value with your significance level α:
- If
p-value < α, reject the null hypothesis. - If
p-value ≥ α, fail to reject the null hypothesis.
“Fail to reject” does not prove the null is true; it means there is not enough evidence against it at the chosen alpha level.
Formula behind the test
Under the null, X ~ Binomial(n, p₀). The probability of exactly x successes is:
P(X = x) = C(n, x) p₀^x (1 - p₀)^(n - x)
For one-sided tests, p-values are tail probabilities like P(X ≤ k) or P(X ≥ k). For the two-sided exact test, this tool sums probabilities of outcomes that are as or more extreme than the observed outcome (based on probability mass under the null).
Practical example
Suppose a support team claims 80% first-contact resolution. You audit 50 tickets and find 33 resolved on first contact.
n = 50k = 33p₀ = 0.80- Alternative:
p < 0.80
Enter those values to test whether performance is significantly below the target.
Common mistakes to avoid
- Using percentages instead of proportions (enter 0.8, not 80).
- Choosing the wrong tail direction for the research question.
- Interpreting p-value as the probability the null is true (it is not).
- Ignoring study design assumptions such as independence of trials.
Final notes
This binomial test calculator is ideal for quality checks, A/B outcomes, coin-flip style examples, and pass/fail process data. For large-sample settings, normal approximations can be useful, but exact binomial inference is often preferable when sample sizes are modest or proportions are near 0 or 1.