Why the Null Standard Error Has Its Own Formula
A sample proportion varies from sample to sample, even when the population proportion stays fixed. If a population has a particular proportion of people with an outcome, one random sample may contain slightly more of them and another slightly fewer. A hypothesis test asks whether the observed sample result is unusual under a specified null claim. To assess that, we need to know the amount of sample-to-sample variation predicted by the null model.
For a one-proportion test, this predicted spread is the null standard error. Its formula is not chosen by convention alone: it follows from the variance of independent binary outcomes. This tutorial derives that formula and explains the conditions under which the derivation applies. It does not use the standard error to calculate a test statistic.
The Model Behind the Derivation
Consider a study that records one binary outcome for each of \(n\) observational units. Code a success as 1 and a failure as 0. Let \(X_i\) be the indicator for the outcome of unit \(i\): \(X_i=1\) for a success and \(X_i=0\) for a failure. The number of successes in the sample is \(X=\sum_{i=1}^{n}X_i\), and the sample proportion is \(\hat{p}=X/n\).
Under the null hypothesis, the population success proportion is \(p_0\). The usual one-proportion model assumes that the sample size \(n\) is fixed, each outcome has the same success probability \(p_0\), and outcomes are independent. Equivalently, the indicators are independent and each has a Bernoulli distribution with probability \(p_0\) of being 1. Under this model, \(X\) has a binomial distribution with parameters \(n\) and \(p_0\).
These assumptions matter. If observations are dependent, the variability of the total can include covariance terms, so the binomial variance calculation below need not apply. A random sample from a much larger population is commonly treated as approximately independent; for sampling without replacement from a finite population, the usual independence model is an approximation when the sampling fraction is small. The formula here is the standard one under the independent Bernoulli model.
Deriving the Null Variance
An indicator \(X_i\) takes only the values 0 and 1. Under the null model, \(P(X_i=1)=p_0\) and \(P(X_i=0)=1-p_0\). Its expected value is \(p_0\). Since \(X_i^2=X_i\) for either possible value, its variance is
The sample proportion is the average of the \(n\) indicators: \(\hat{p}=(X_1+\cdots+X_n)/n\). For independent random variables, the variance of a sum is the sum of their variances. Dividing a random variable by \(n\) divides its variance by \(n^2\). Applying those facts gives the full derivation:
\(\hat{p}=(1/n)\sum_{i=1}^{n}X_i\), where each \(X_i\) is an independent 0-or-1 indicator with success probability \(p_0\).
\(\operatorname{Var}(\sum_{i=1}^{n}X_i)=\sum_{i=1}^{n}\operatorname{Var}(X_i)=n p_0(1-p_0)\).
\(\operatorname{Var}(\hat{p})=\operatorname{Var}((1/n)\sum X_i)=(1/n^2)n p_0(1-p_0)=p_0(1-p_0)/n\).
The standard deviation is the square root of the variance, so \(SE_0(\hat{p})=\sqrt{p_0(1-p_0)/n}\).
This derivation also shows that \(E(\hat{p})=p_0\) under the null: the expected value of an average is the average of the expected values, so \(E(\hat{p})=(1/n)\sum_{i=1}^{n}p_0=p_0\). Thus, under the null model, the sample proportion is centered at the null value and its standard deviation describes its expected sampling spread around that value.
Worked Applications
Worked Example: A Null Proportion of 0.40
Suppose a hypothetical quality-control process is being assessed with a fixed sample of \(n=100\) items. The null claim is that the proportion needing repair is \(p_0=0.40\). Assume the items' outcomes are independent and have the same probability \(0.40\) of needing repair. Find the null standard error of the sample proportion.
The model is appropriate for this calculation because the sample size is fixed, the binary outcomes share the null probability, and independence is assumed. The null expected numbers of items needing and not needing repair are \(100(0.40)=40\) and \(100(0.60)=60\), respectively.
Substitute the null proportion and sample size into the derived formula:
The null standard deviation of the sample proportion is about 0.0490, or 4.90 percentage points. In repeated samples of 100 items under this null model, the sample proportions have this standard deviation around 0.40. This describes model-based sampling variability; it does not say that every sample proportion will be within 0.0490 of 0.40.
Worked Example: A Relatively Uncommon Outcome
In a hypothetical survey, \(n=250\) independently selected participants are asked whether they experienced a specified side effect. Consider the null claim \(p_0=0.08\). Find the null standard error, and check the model's expected success and failure counts.
Assume the sample size is fixed and that each participant's binary response is independent, with the same side-effect probability under the null. The expected success count is \(np_0=250(0.08)=20\); the expected failure count is \(n(1-p_0)=250(0.92)=230\). Both expected counts are at least 10, which supports using a normal approximation to the sampling distribution when one is needed. The variance derivation itself follows from the binomial model.
The calculation is
The null standard error is about 0.0172, or 1.72 percentage points. It is the standard deviation of the sample proportion under the specified 8% null model and sample size of 250. It is not the observed proportion's distance from 0.08; that distance depends on the survey data.
Worked Example: How Doubling Sample Size Changes the Standard Error
Consider two hypothetical independent samples under the same null proportion, \(p_0=0.50\). The first has \(n=100\); the second has \(n=400\). Find both null standard errors and compare them. In each case, assume fixed sample size, a common success probability of 0.50, and independent outcomes.
For \(n=100\), the expected success and failure counts are both 50. For \(n=400\), they are both 200, so the expected-count check is satisfied for either normal approximation. The calculations are
The sample size increases by a factor of four, while the standard error is divided by two. In general, with \(p_0\) held fixed, \(SE_0(\hat{p})\) is proportional to \(1/\sqrt{n}\), not \(1/n\). Quadrupling the sample size halves the null standard error; doubling the sample size multiplies it by \(1/\sqrt{2}\).
What Determines the Size of the Null Standard Error?
The formula separates two sources of variation. The term \(p_0(1-p_0)\) describes the variation in an individual binary outcome under the null. It is largest at \(p_0=0.50\) and smaller when the null proportion is nearer 0 or 1. The division by \(n\) reflects averaging: more independent observations reduce the variance of the sample proportion.
Taking the square root is essential because a standard error is measured on the same scale as the statistic. Here \(\hat{p}\) is a proportion, so \(SE_0(\hat{p})\) is also expressed in proportion units. For instance, 0.0172 corresponds to 1.72 percentage points. The variance, by contrast, is in squared proportion units.
The formula uses \(p_0\) because it describes variability if the null model is true. Replacing \(p_0\) with the observed \(\hat{p}\) would calculate a different estimated standard error, often used for other purposes. It would not be the standard error derived under the null hypothesis. Keeping these two quantities distinct is important when interpreting a one-proportion test.
Common Mistakes and a Practical Check
- Using the observed proportion in a null calculation. The reasoning “the sample proportion is what we observed, so use it in the null standard error” confuses the data with the null model. For the null standard error, substitute the hypothesized value \(p_0\).
- Forgetting the square root. The expression \(p_0(1-p_0)/n\) is the null variance, not the null standard error. Take its square root to return to proportion units.
- Dividing by \(n\) instead of \(\sqrt{n}\) in the standard error. The variance is divided by \(n\); taking the square root gives a standard error proportional to \(1/\sqrt{n}\).
- Assuming the formula applies without a sampling model. Its derivation uses a fixed \(n\) and independent outcomes with common success probability. Dependence between outcomes can change the variance.
- Treating a standard error as a guaranteed range. A standard error measures standard deviation, not a maximum possible error. Many sample proportions can fall more than one standard error from \(p_0\).
A useful check is to confirm that \(0\leq p_0\leq1\), that \(n\) is the number of independent binary observations in the model, and that the result is the square root of a nonnegative variance. If \(p_0\) is 0 or 1, the model predicts no sampling variation and the formula gives a standard error of 0. For a meaningful test of a non-boundary proportion, the null value is ordinarily between 0 and 1.
Check Your Understanding
Use the independent Bernoulli model unless a question asks you to identify a limitation.
- State the three main assumptions used to derive the null standard error.
- For \(p_0=0.30\) and \(n=100\), write the substitution into the null standard error formula and calculate the result.
- Explain why the variance of one 0-or-1 indicator with success probability \(p_0\) is \(p_0(1-p_0)\).
- If \(p_0\) stays fixed and the sample size is multiplied by 9, by what factor does the null standard error change?
- Explain why using \(\hat{p}\) instead of \(p_0\) does not give the standard error derived under the null model.