Why the Choice of Test Matters
A binary outcome can be summarized by a count of successes or by the observed proportion of successes. When the null hypothesis is true, that count has a binomial distribution. A one-proportion z test replaces that discrete distribution with a normal approximation. The approximation can work well when the expected counts are not too small, but sparse or highly imbalanced outcomes can make it unreliable.
The choice is not based only on how large the sample size looks. For example, if the null success probability is very small, even a sample of several hundred observations might have few expected successes. The relevant question is how well the null distribution of the count can be approximated by a normal curve, given the hypothesized proportion and the sample size.
Shared Model and the Two Methods
Both methods require a suitable binary outcome and a design that supports the binomial model: the number of trials \(n\) is fixed, each trial has two outcomes, the success probability is the same for every trial under the model, and trial outcomes are independent. In a sample from a population, the sampling design must also justify treating the observations as independent; sampling a large fraction of a finite population without accounting for that design can violate this condition. Neither method repairs a biased sample, dependent outcomes, or an incorrectly defined success.
Under \(H_0\), the count has mean \(np_0\) and standard deviation \(\sqrt{np_0(1-p_0)}\). The z test standardizes the observed count using those null quantities:
The denominator is the null standard error, \(SE=\sqrt{p_0(1-p_0)/n}\). It uses \(p_0\), not the observed \(\hat{p}\), because the test asks how unusual the data would be if the null value were true. The approximate p-value is the appropriate tail area, or combined tail area, under a standard normal distribution, according to \(H_a\).
The exact binomial test does not approximate the count distribution: it sums binomial probabilities under \(p_0\). For a one-sided alternative, the p-value is the probability, under \(H_0\), of outcomes at least as far in the direction specified by \(H_a\) as the observed count. A two-sided exact p-value requires a stated convention for defining outcomes “at least as extreme”; discreteness means conventions can produce different values.
Why Expected Counts Guide the Approximation
A normal curve is continuous and symmetric, whereas a binomial count takes only integer values from 0 to \(n\). The normal approximation is most dependable when the binomial distribution is not too skewed and has enough probability mass on both sides of its center. A widely used rule of thumb is that both null expected counts, \(np_0\) and \(n(1-p_0)\), should be at least 10 for a one-proportion z test. Some courses or applications use a different cutoff, such as 5, so the relevant convention should be stated. These are diagnostics, not guarantees: the closer counts are to 0, the more cautious one should be.
The check must use the null proportion. The observed data might contain many successes, but that does not make the null distribution less sparse if the hypothesized \(p_0\) is small. If the expected-count check is poor, the exact binomial test is generally a more defensible choice when the binomial assumptions hold.
Worked Examples
Worked Example: Sparse Expected Successes
Suppose a hypothetical quality check examines \(n=20\) independently selected items, each classified as defective or not defective. Let “defective” be success. The question is whether the defect rate is below \(p_0=0.10\), and 1 item is defective. Test \(H_0:p=0.10\) against \(H_a:p<0.10\) at \(\alpha=0.05\).
The binomial model is appropriate if the 20 items have independent outcomes and the same defect probability, as assumed here. Under the null, the expected number defective is \(np_0=20(0.10)=2\), and the expected number not defective is \(n(1-p_0)=20(0.90)=18\). Since the expected success count is well below 10, the normal approximation is questionable; use the exact binomial test.
For a lower-tailed test with \(X=1\), the exact p-value is \(P(X\leq 1)\) under \(X\sim\operatorname{Bin}(20,0.10)\):
The p-value is about 0.3917, much greater than 0.05, so these data do not provide sufficient evidence that the defect rate is below 10%. This is not the probability that \(H_0\) is true; it is the probability, assuming \(H_0\), of observing 1 or fewer defects.
For comparison, the z statistic would be \((0.05-0.10)/\sqrt{0.10(0.90)/20}=-0.7454\), giving an approximate lower-tail p-value of about 0.228. Its difference from 0.3917 illustrates why the sparse expected success count matters. The exact result is the appropriate one here.
Worked Example: Counts Support a z Approximation
In a hypothetical independent survey of \(n=200\) people, 94 answer “yes” to a binary question. Test whether the population proportion differs from \(p_0=0.40\), using a two-sided alternative and \(\alpha=0.05\). Assume the sampling method makes the responses reasonably independent and representative of the target population.
The observed proportion is \(\hat{p}=94/200=0.47\). Under \(H_0:p=0.40\), the expected yes count is \(200(0.40)=80\), and the expected no count is \(200(0.60)=120\). Both are at least 10, so a z approximation is reasonable under the stated binomial assumptions.
The null standard error and test statistic are:
For the two-sided alternative, the approximate p-value is twice the upper-tail standard normal probability:
Because \(0.04331<0.05\), reject \(H_0\) at the 5% significance level. The survey provides evidence that the population proportion differs from 40%. The estimated proportion is 47%, a difference of 7 percentage points from the null value; statistical evidence alone does not establish why the difference occurred.
Worked Example: Very Small Null Proportion
A hypothetical monitoring system records whether an event occurs during each of 10 independent monitoring periods. Suppose the null event probability is \(p_0=0.02\), the observed number of events is \(X=0\), and the question is whether the probability is lower than 0.02. The model assumes the same event probability in every period and independent periods.
The null expected event count is \(10(0.02)=0.2\), while the expected count of periods without an event is \(10(0.98)=9.8\). The event count is extremely sparse, so the exact test is preferable. For \(H_a:p<0.02\), the observed count of zero is the smallest possible count, and the exact lower-tail p-value is:
At \(\alpha=0.05\), this is not significant evidence that the event probability is below 2%. For comparison, the z statistic is \((0-0.02)/\sqrt{0.02(0.98)/10}=-0.4518\), with approximate lower-tail p-value about 0.3257. The large difference is a warning against relying on the z approximation for such a sparse null distribution.
How to Make the Choice
A useful decision process begins with the study question and model, then examines the null distribution. The method should follow from those checks rather than from a preference for a particular calculation.
Define success, state \(H_0:p=p_0\), and choose \(H_a\) to match the question: lower, higher, or different.
Confirm a fixed number of trials, binary outcomes, a common probability, and independence appropriate to the sampling or experimental design.
Calculate \(np_0\) and \(n(1-p_0)\). Small or highly imbalanced counts signal that a normal approximation may be poor.
Use the z test when the expected-count rule is adequately met; use the exact binomial test when sparsity makes the approximation questionable. State the test, tail direction, p-value, and contextual conclusion.
A continuity correction can sometimes improve a normal approximation to a discrete count by shifting the normal boundary by one-half unit. It does not change the underlying fact that the binomial distribution may be highly skewed when expected counts are very small. It is not a reason to ignore a failed expected-count diagnostic; an exact test remains a direct option under the binomial model.
Common Mistakes and Why the Choice Matters
- Checking the observed counts instead of null expected counts. The approximation is assessed under \(H_0\), so calculate \(np_0\) and \(n(1-p_0)\), not just the observed successes and failures.
- Assuming a large \(n\) is enough. A large sample can still have a small expected success count when \(p_0\) is near zero, or a small expected failure count when \(p_0\) is near one.
- Using \(\hat{p}\) in the z-test standard error. A one-proportion score z test uses \(p_0\) in \(SE=\sqrt{p_0(1-p_0)/n}\), because its reference distribution is calculated under the null.
- Treating exact as synonymous with automatically better in every respect. An exact test avoids the normal approximation when the binomial model applies, but its p-values are discrete and may be conservative. The two-sided convention should be clear.
- Ignoring the design. Exact arithmetic does not make dependent observations independent. If the binomial assumptions are not credible, choosing an exact test alone does not solve the modeling problem.
This choice matters because a p-value is evidence measured against a reference distribution. If the z reference distribution poorly represents the sparse null count, its tail probability may not reflect the actual binomial tail. In a report, give enough information for a reader to understand why the method was reasonable: the outcome definition, null proportion, expected counts, and the chosen one- or two-sided alternative.
Check Your Understanding
Use the null model, not just the observed proportion, to justify a method.
- For \(n=40\), \(p_0=0.25\), calculate the null expected success and failure counts. Do they meet the rule of thumb that both are at least 10?
- A study observes 3 successes in 300 trials, with \(p_0=0.01\). Why does the total sample size alone not settle whether a z approximation is adequate?
- In a lower-tailed exact test with observed count \(x\), what binomial probability defines the p-value?
- Why does the one-proportion z-test standard error use \(p_0\) rather than \(\hat{p}\)?
- If trials are dependent, does using an exact binomial calculation by itself make the test valid? Explain.