Mathwords logoMathwords

Binomial Test — Definition, Formula & Example

A binomial test is a hypothesis test that checks whether a claimed proportion is believable. It adds up exact binomial probabilities to find the p-value, so it works even when the sample is too small for a normal approximation.

Given nn independent trials with a constant success probability pp, the binomial test evaluates H0:p=p0H_0: p = p_0 using the observed number of successes kk as the test statistic. Under H0H_0, X∼Binomial(n,p0)X \sim \text{Binomial}(n, p_0). The p-value is the exact probability, computed from this distribution, of a result at least as extreme as kk in the direction of HaH_a. The formula below is the right-tailed case, Ha:p>p0H_a: p > p_0. For Ha:p<p0H_a: p < p_0 use P(X≤k)P(X \le k), and a two-sided test combines both tails.

Key Formula

p-value=P(X≥k)=∑i=kn(ni)p0 i(1−p0)n−ip\text{-value} = P(X \ge k) = \sum_{i=k}^{n} \binom{n}{i} p_0^{\,i} (1 - p_0)^{n-i}
Where:
  • nn = number of independent trials
  • kk = observed number of successes
  • p0p_0 = proportion claimed by the null hypothesis
  • XX = number of successes, which follows a binomial distribution if the null hypothesis is true

Worked Example

Problem: Your friend claims she can taste the difference between tap water and bottled water. In 10 blind trials, she identifies the bottled water correctly 9 times. At the 0.05 significance level, is this convincing evidence that she does better than guessing?
Step 1: State the hypotheses. Guessing means p=0.5p = 0.5. The expected number of successes is only 5, which is less than 10, so the normal approximation is not appropriate. Use the exact binomial test instead.
H0:p=0.5Ha:p>0.5np0=10(0.5)=5<10H_0: p = 0.5 \quad H_a: p > 0.5 \qquad np_0 = 10(0.5) = 5 < 10
Step 2: Find the probability of each outcome at least as extreme as 9 correct, assuming she is guessing.
P(X=9)=(109)(0.5)10=101024,P(X=10)=(1010)(0.5)10=11024P(X=9) = \binom{10}{9}(0.5)^{10} = \frac{10}{1024}, \qquad P(X=10) = \binom{10}{10}(0.5)^{10} = \frac{1}{1024}
Step 3: Add these probabilities to get the p-value. Then compare it with α\alpha.
p-value=101024+11024=111024≈0.0107<0.05p\text{-value} = \frac{10}{1024} + \frac{1}{1024} = \frac{11}{1024} \approx 0.0107 < 0.05
Answer: The p-value is about 0.0107, which is less than 0.05, so you reject H0H_0. There is convincing evidence that your friend identifies bottled water correctly more than half the time.

Why It Matters

In AP Statistics, you can use the one-proportion z-test only when both np0≥10np_0 \ge 10 and n(1−p0)≥10n(1-p_0) \ge 10. The binomial test covers the small-sample cases that this condition rules out. Examples include early drug trials, quality checks on a handful of parts, and taste tests.

Common Mistakes

Mistake: Using only the probability of the observed count, such as P(X=9)≈0.0098P(X = 9) \approx 0.0098, as the p-value.
Correction: A p-value includes every outcome at least as extreme as the one you observed. For a right-tailed test, add P(X=9)P(X = 9) and P(X=10)P(X = 10) to get P(X≥9)P(X \ge 9).

Related Terms

  • Hypothesis Testing — General framework this exact test follows step by step
  • Null Hypothesis — Supplies the proportion p0 used in binomial probabilities
  • p-value — Computed here exactly by summing binomial probabilities
  • Normal Distribution — Approximates the binomial when expected counts reach 10
  • Z-Test — The large-sample test this exact test replaces when counts are small
  • Test Statistic — Here it is simply the count of successes