Why Boundary Null Proportions Need Special Treatment
For a binary outcome, a population proportion must be between zero and one. The endpoints, \(p=0\) and \(p=1\), are valid values, but they describe extreme situations: respectively, no individual in the population has the outcome called a success, or every individual does. When one of these values is the null proportion, the usual one-proportion z statistic cannot be calculated. The denominator that measures variability under the null is zero.
That does not mean there is no way to assess the data. Under a binomial model, each boundary null assigns probability one to a single success count. We can compare the observed count with that null distribution directly. If the observed count differs from the only count the null permits, its exact probability under the null is zero. Such a conflict is strong evidence against the null model, but it is also a reason to check how the data were recorded and whether the model assumptions are appropriate.
Why the Usual Z Statistic Fails
For a one-proportion z test, the statistic compares the observed proportion \(\hat{p}\) with the null value \(p_0\), using the null standard error. The usual formula is
To see where its denominator comes from, let each trial be represented by an indicator \(Y_i\), equal to 1 for a success and 0 for a failure. Under the binomial model, \(P(Y_i=1)=p_0\), so \(\operatorname{Var}(Y_i)=p_0(1-p_0)\). Independence gives \(X=Y_1+\cdots+Y_n\) variance \(n p_0(1-p_0)\). Since \(\hat{p}=X/n\), its variance is
The standard error in the z statistic is the square root of this variance. At \(p_0=0\) or \(p_0=1\), \(p_0(1-p_0)=0\), so the null standard error is zero. The statistic is therefore not a usable z score: if \(\hat{p}=p_0\), it has the indeterminate form \(0/0\); if \(\hat{p}\ne p_0\), its denominator is still zero. Neither case produces a finite z statistic to compare with a standard normal distribution.
This is not merely a computational inconvenience. Under either boundary null, the binomial distribution has no spread: it puts all its probability on one count. A standard normal approximation to a variable with no variation cannot supply the usual z-test reference distribution. Instead, assess the count using the binomial probabilities under the null.
Worked Example: One Success Under a Zero-Proportion Null
Suppose a hypothetical process is tested with \(n=12\) independent trials. Let a success be a unit with a particular characteristic. Test \(H_0:p=0\) against \(H_a:p>0\). The observed count is \(X=1\), so \(\hat{p}=1/12\approx0.08333\).
Under \(H_0\), \(X\sim\operatorname{Bin}(12,0)\). The one-sided p-value is the probability, assuming the null, of observing at least as many successes as the observed count:
Every term in the sum is zero because \(k\ge1\). Thus, the exact p-value is 0. At significance level \(\alpha=0.05\), this is evidence against \(H_0\) under the stated model. The z statistic cannot be used instead: its numerator is \(1/12-0>0\), but its denominator is \(\sqrt{0(1-0)/12}=0\), so the ratio is undefined, not a valid infinite z score.
In context, the observed success is impossible if the null model and the recorded data are both correct. Before treating it as evidence that \(p>0\), check whether the outcome was classified or entered incorrectly and whether the trials reasonably meet the model assumptions.
Exact Assessment at the Boundaries
For a one-sided test, the direction of the alternative determines which counts are at least as extreme as the observation. At \(p_0=0\), the only possible parameter values in the direction away from the boundary satisfy \(p>0\). The relevant alternative is \(H_a:p>0\), and larger counts provide evidence in that direction. At \(p_0=1\), the corresponding alternative is \(H_a:p<1\), and smaller counts provide evidence.
The null distributions and one-sided p-values can be summarized directly:
| Null value | Count under the null | Alternative direction | One-sided p-value for observed count \(x\) |
|---|---|---|---|
| \(p_0=0\) | \(X=0\) with probability 1 | \(H_a:p>0\) | \(P(X\ge x\mid p_0=0)\), which is 1 if \(x=0\) and 0 if \(x>0\) |
| \(p_0=1\) | \(X=n\) with probability 1 | \(H_a:p<1\) | \(P(X\le x\mid p_0=1)\), which is 0 if \(x<n\) and 1 if \(x=n\) |
The same boundary logic applies to a two-sided alternative such as \(H_a:p\ne p_0\). Because \(p\) must lie in \([0,1]\), a value different from zero can only be above zero, and a value different from one can only be below one. Under the usual exact tail-probability approach, an observed count outside the null's single-point support has p-value zero; the count matching the null has p-value one. In either case, the result follows from the point-mass null distribution, not from a z approximation.
Worked Example: Fewer Than All Successes Under a One-Proportion Null
In a hypothetical quality check, \(n=8\) units are inspected for a feature claimed to be present in every unit. Let \(p\) be the population proportion with the feature. Test \(H_0:p=1\) against \(H_a:p<1\). Suppose \(X=7\) units have the feature.
The observation is in the direction of the alternative: one inspected unit is a failure. Under the null, \(X\sim\operatorname{Bin}(8,1)\), so \(X=8\) with probability one. The lower-tail p-value is
For every term in the sum, \(k\le7\), so \(8-k\ge1\) and the factor \((1-1)^{8-k}\) is zero. The exact p-value is therefore 0, and the result is evidence against the claim \(p=1\) under the model. The usual z statistic is not defined: its denominator is \(\sqrt{1(1-1)/8}=0\).
A failure in the sample conflicts with the claim that every unit in the population has the feature. As in any boundary case, check that the inspection and classification were reliable before concluding that the population proportion is below one.
Worked Example: A Count That Matches a Zero-Proportion Null
Suppose a hypothetical inspection tests \(n=15\) independent units for a characteristic, with \(H_0:p=0\) and \(H_a:p>0\). No units have the characteristic, so \(X=0\) and \(\hat{p}=0\).
Under \(H_0\), \(X=0\) with probability one. The upper-tail p-value is
The result does not provide evidence against \(H_0\) at \(\alpha=0.05\). Here the z statistic has numerator \(\hat{p}-p_0=0\) and denominator \(\sqrt{0(1-0)/15}=0\), giving \(0/0\), which is undefined. The exact binomial calculation is still straightforward.
A p-value of 1 does not establish that \(p=0\). It says that the observed count is exactly what the null predicts. A positive value of \(p\), especially a small one, could also produce zero observed successes in a sample of 15; the test result alone does not prove that every member of the population lacks the characteristic.
Interpreting the Result and Checking the Model
Boundary tests are unusually decisive when an observation contradicts the null: the exact p-value is zero because the null assigns probability zero to that observed count. But this conclusion is conditional on the binomial model. In particular, the trials must represent a fixed number \(n\) of binary outcomes with a common success probability and independence. If outcomes are dependent, probabilities vary across trials, or the success/failure classification is unreliable, the simple binomial calculation may not describe the data.
An exact p-value of zero is not a statement that the probability of the null hypothesis is zero. A p-value is calculated assuming the null and model; it does not assign probabilities to competing hypotheses. Nor does a contradiction by itself identify its cause. The population may not have the boundary proportion, or there may be a recording, measurement, sampling, or model problem.
If the observed count matches the boundary null, its exact p-value in the relevant direction is one. This means the observation is fully consistent with the null's only possible count; it does not show that alternatives are impossible. In particular, seeing no successes does not prove that the population success proportion is exactly zero.
Common Mistakes
- Calling the z statistic infinite. A nonzero numerator divided by zero is not a finite z statistic and is not a value to compare with a normal distribution. The usual test is undefined at the boundary; use the exact binomial distribution.
- Treating \(0/0\) as a zero statistic. When the observed count matches the null, both numerator and denominator are zero. That ratio is undefined, even though the exact p-value can be calculated.
- Interpreting an exact p-value of zero as the probability the null is true. It means the observed result has probability zero under the specified null model, not that the p-value gives the probability of a hypothesis.
- Ignoring a possible data or model problem. An outcome impossible under a boundary null merits a careful check of measurement, data entry, and assumptions as well as statistical interpretation.
Check Your Understanding
Try these questions without looking back.
- Under \(H_0:p=0\), what value does \(X\) take with probability one in a sample of size \(n\)?
- For \(H_0:p=1\) against \(H_a:p<1\), explain why observing \(x<n\) gives an exact lower-tail p-value of zero.
- Why is a z statistic with a nonzero numerator and zero null standard error not properly described as an infinite z score?
- If \(n=20\) trials produce no successes under \(H_0:p=0\) against \(H_a:p>0\), what is the exact p-value, and what does it mean?
- Name one data-quality or model check that is sensible after observing a success under a null hypothesis of \(p=0\).