Of the 1,696 adults aged 18 to 39 who had their blood pressure measured in the National Health and Nutrition Examination Survey (NHANES) of 2017 to 2018, 389 had hypertension. That is a share of $389/1696 = 0.2294$. Suppose a study could examine only 50 of them. It would see some number of hypertensive participants, perhaps 9, perhaps 14, and would report the share it saw as its estimate. How far can that estimate stray from 0.2294, and with what probability?
The answer is the sampling distribution of the sample proportion: the distribution of the share we would see over all possible samples. Every interval and test for a proportion in the rest of the unit rests on it. It comes in two forms. The exact form is the binomial distribution, which gives the probability of every possible count. The approximate form is a normal distribution with the same mean and standard deviation. It turns questions about a proportion into the same $z$ calculations used for means.
First we define the outcome and the population. Then we derive the mean and standard error of the sample proportion. Next come the normal approximation and the continuity correction that makes it accurate. Finally the skewness of the binomial shows when the approximation can be trusted. The article assumes The Binomial Distribution, and every later article in the unit builds on its results.
Hypertension as a yes-or-no outcome
The data are the nonpregnant adults examined in NHANES 2017 to 2018 who had at least one systolic and one diastolic reading: 5,182 people. Each person's systolic and diastolic pressures are the means of up to three readings. These are variables BPXSY1 to BPXSY3 and BPXDI1 to BPXDI3 in the file BPX_J. A diastolic reading of 0, recorded when the sounds persist to zero, is treated as missing.
A person has hypertension if any of these holds:
- the mean systolic pressure is at least 130 mm Hg;
- the mean diastolic pressure is at least 80 mm Hg;
- the person reports currently taking medicine prescribed for high blood pressure (variable BPQ050A in the questionnaire file BPQ_J).
This is the definition the National Center for Health Statistics used for the same survey years. It follows the 2017 American College of Cardiology and American Heart Association guideline (Ostchega et al., 2020). Sex (RIAGENDR), age in years (RIDAGEYR) and pregnancy status (RIDEXPRG) come from the demographics file DEMO_J.
| Group | Adults | With hypertension | Proportion |
|---|---|---|---|
| All | 5,182 | 2,837 | 0.5475 |
| Men | 2,541 | 1,488 | 0.5856 |
| Women | 2,641 | 1,349 | 0.5108 |
| Aged 18 to 39 | 1,696 | 389 | 0.2294 |
| Aged 40 to 59 | 1,574 | 919 | 0.5839 |
| Aged 60 and over | 1,912 | 1,529 | 0.7997 |
| Men aged 18 to 39 | 822 | 261 | 0.3175 |
| Women aged 18 to 39 | 874 | 128 | 0.1465 |
As in the earlier units, these adults are treated as a finite population to draw samples from. Its true proportions are known, so every method can be checked against the truth. That is a teaching device. NHANES is a complex survey that oversamples some groups, and national estimates need its sampling weights. For ages 18 to 39 the published weighted prevalence is 22.4% (Ostchega et al., 2020), close to the unweighted 0.2294 here. For all adults, though, the unweighted share, 0.5475, is well above the published crude 48.2%, because older adults are oversampled.
The young adults, with $p = 0.2294$, are the population for the rest of this article.
The count and the proportion
Here is the idea in one sentence: a sample proportion is a sample mean of zeros and ones, so its center and spread follow from those of a single yes-or-no observation.
Draw one adult at random from the 1,696 and record $Y = 1$ if the person has hypertension and $Y = 0$ if not. This is a Bernoulli variable with success probability $p = 0.2294$. The Binomial Distribution shows that its mean is $E[Y] = p$ and its variance $\operatorname{Var}(Y) = p(1 - p)$. So the standard deviation of a single yes-or-no observation is $\sqrt{p(1-p)} = \sqrt{0.2294 \times 0.7706} = 0.4204$. A measurement such as blood pressure has a mean and a separate spread. A binary outcome has no separate spread parameter: once $p$ is known, so is the variance.
A sample of $n$ adults gives $n$ such observations $Y_1, \ldots, Y_n$. Their sum $X = Y_1 + \cdots + Y_n$ is the number with hypertension, and the sample proportion is
$$\hat{p} = \frac{X}{n} = \frac{1}{n}\sum_{i=1}^n Y_i,$$
the notation of the course's formula sheet. The sample proportion is a sample mean, the mean of zeros and ones. Everything known about sample means therefore applies to it. In particular, this article is a special case of the sampling distribution of the mean.
Suppose the observations are independent with the same $p$. That holds exactly for sampling with replacement, and very nearly for a small sample from a large population. Then $X$ has the binomial distribution with parameters $n$ and $p$,
$$P(X = x) = \binom{n}{x} p^x (1 - p)^{n - x}, \qquad x = 0, 1, \ldots, n,$$
developed in The Binomial Distribution. Its mean and variance follow from the Bernoulli ones, since means add and variances of independent variables add:
$$E[X] = np, \qquad \operatorname{Var}(X) = np(1 - p).$$
Dividing $X$ by the constant $n$ divides the mean by $n$ and the variance by $n^2$:
$$E[\hat{p}] = p, \qquad \operatorname{Var}(\hat{p}) = \frac{p(1 - p)}{n}, \qquad \operatorname{SE}(\hat{p}) = \sqrt{\frac{p(1 - p)}{n}}.$$
So $\hat{p}$ is unbiased for $p$, and its standard error shrinks like $1/\sqrt{n}$. For samples of 50 young adults, $\operatorname{SE}(\hat{p}) = \sqrt{0.2294 \times 0.7706/50} = 0.0595$. A typical sample proportion lands about six percentage points from the truth.
Check your understanding. A second study wants its typical error to be half as large, about three percentage points. How many young adults must it examine?
Four times as many, 200. The standard error shrinks like $1/\sqrt{n}$, so halving it takes four times the sample.
Two features of the standard error matter later:
- It depends on the unknown $p$. That is what makes intervals for a proportion less simple than they first appear (Confidence Intervals for a Proportion).
- It is largest at $p = 0.5$, where $p(1-p) = 0.25$, and shrinks toward zero as $p$ approaches 0 or 1. That is why $p = 0.5$ is the cautious planning value when a sample size has to be chosen without knowing $p$ (Tests and Sample Size for a Proportion).
Sampling without replacement
A real sample of 50 from 1,696 people is drawn without replacement. So the observations are not quite independent: each hypertensive person drawn leaves slightly fewer for the rest of the sample. The count then has the hypergeometric distribution. It has the same mean $np$ and a variance smaller by the factor $(N - n)/(N - 1)$, where $N$ is the population size. The square root of this factor is the finite population correction. Here it is $\sqrt{1646/1695} = 0.9854$, which turns the standard error of 0.05946 into 0.05859.
Does the correction show up in real samples? The script drew 10,000 samples of 50 without replacement for each of 30 random seeds. The mean of the 10,000 sample proportions had median 0.22944 across the seeds (interquartile range 0.22918 to 0.22971), matching $p = 0.2294$. Their standard deviation had median 0.05855 (0.05824 to 0.05881), matching the corrected standard error.
The correction is under 1.5% here, and the rest of the article ignores it, as is usual when the sample is a small fraction of the population. It matters when the fraction is large, and the tests article meets a case where it does.
So much for the center and the spread of $\hat{p}$. What about its shape?
The normal approximation
The sample proportion is a mean of $n$ independent observations with mean $p$ and variance $p(1-p)$. So the central limit theorem applies: the distribution of $\hat{p}$ approaches a normal one as $n$ grows,
$$\hat{p} \approx N\!\left(p,\ \sqrt{\frac{p(1-p)}{n}}\right), \qquad Z = \frac{\hat{p} - p}{\sqrt{p(1-p)/n}} \approx N(0, 1),$$
in the formula sheet's notation, where the second argument of $N$ is the standard deviation. Equivalently, the count $X$ is approximately normal with mean $\mu = np$ and standard deviation $\sigma = \sqrt{np(1-p)}$. This special case of the central limit theorem, for sums of Bernoulli variables, is often called the de Moivre–Laplace theorem. Abraham de Moivre and Pierre-Simon Laplace worked it out long before the general theorem.
How large must $n$ be? The figure shows the binomial probabilities for samples of 10, 30 and 100 young adults, with the approximating normal curve laid over them.
Even at $n = 100$, though, the bars sit on whole numbers while the curve is spread over the line. How should one be read against the other?
The continuity correction
Here is the idea: treat each bar as covering the stretch of the line from half a unit below its count to half a unit above. So each whole number $x$ is identified with the interval from $x - 0.5$ to $x + 0.5$. A probability for $X \le x$ is then the normal area up to $x + 0.5$, and a probability for $X \ge x$ is the area above $x - 0.5$:
$$P(X \le x) \approx \Phi\!\left(\frac{x + 0.5 - np}{\sqrt{np(1-p)}}\right), \qquad P(X \ge x) \approx 1 - \Phi\!\left(\frac{x - 0.5 - np}{\sqrt{np(1-p)}}\right),$$
where $\Phi$ is the standard normal distribution function. The first is the formula sheet's "$z$-score with continuity," $Z = (x + 0.5 - \mu)/\sigma$.
Check your understanding. Without the half unit, what does the normal curve give for the probability of exactly 11 hypertensive adults in a sample of 50?
Zero. A single point under a continuous curve has no area. Without the correction, the approximation to $P(X \le x)$ also leaves out half of the bar at $x$. The worked case below shows what that costs.
A worked case
Back to samples of 50 young adults. Here $\mu = 50 \times 0.2294 = 11.468$ and $\sigma = \sqrt{50 \times 0.2294 \times 0.7706} = 2.973$. The probability of seeing 8 or fewer hypertensive adults is approximated by
$$z = \frac{8.5 - 11.468}{2.973} = -0.998, \qquad \Phi(-0.998) = 0.1590.$$
The table compares this and three other probabilities with three alternatives:
- the exact binomial value;
- the normal approximation without the correction;
- the exact hypergeometric value for drawing 50 of the 1,696 without replacement.
| Event | Exact binomial | Normal, no correction | Normal, with correction | Hypergeometric |
|---|---|---|---|---|
| $X \le 8$ | 0.1588 | 0.1217 | 0.1590 | 0.1550 |
| $X \ge 16$ | 0.0907 | 0.0637 | 0.0875 | 0.0875 |
| $9 \le X \le 14$ | 0.6874 | 0.5996 | 0.6871 | 0.6946 |
| $X = 11$ | 0.1334 | 0 | 0.1319 | 0.1353 |
With the correction, the normal approximation is within 0.0032 of the binomial in every row. Without it, the errors are up to 0.09 for the three ranges and 0.13 for the single count. The correction is not a refinement for purists: at this sample size it is most of the accuracy. The last column shows that the binomial is itself an approximation to sampling without replacement. Here it is a slightly worse one than the corrected normal is to the binomial.
At $n = 50$ and $p = 0.23$, then, the approximation works well. When does it not?
When the approximation can be trusted
The approximation fails in a characteristic way. A binomial distribution with $p < 0.5$ is skewed to the right. It cannot go below zero, and when $np$ is small its mean sits close to that wall. A normal curve is symmetric and cannot follow. The skewness of $X$, its third central moment divided by $\sigma^3$, measures the asymmetry.
Here is the plan of the derivation. We find the third central moment of one Bernoulli variable, add it up over the $n$ independent trials as we would a variance, and divide by $\sigma^3$. For one Bernoulli variable, the third central moment is
$$E[(Y - p)^3] = p(1-p)^3 + (1-p)(-p)^3 = p(1-p)\left[(1-p)^2 - p^2\right] = p(1-p)(1-2p).$$
Third central moments of independent variables add, as variances do (The Central Limit Theorem proves it). So for the sum the third central moment is $np(1-p)(1-2p)$. Dividing by $\sigma^3 = [np(1-p)]^{3/2}$,
$$\text{skewness of } X = \frac{1 - 2p}{\sqrt{np(1-p)}}.$$
It has three properties:
- it is zero at $p = 0.5$ for every $n$;
- it shrinks like $1/\sqrt{n}$;
- for a given $n$, it grows as $p$ moves toward 0 or 1.
For the young adults it is 0.407 at $n = 10$, 0.235 at $n = 30$ and 0.129 at $n = 100$: the three panels of the figure above.
The formula sheet's rule is to use the normal approximation when both $np \ge 5$ and $n(1-p) \ge 5$, and otherwise to use exact binomial probabilities. Some texts require 10 rather than 5. The rule is a way of keeping the skewness small: with $p$ small, $np \ge 5$ means a skewness of at most about $1/\sqrt{5} = 0.45$.
Check your understanding. Two binomials sit exactly at the threshold $np = 5$: ten trials with $p = 0.5$, and a hundred trials with $p = 0.05$. Which one does the normal curve fit better?
The ten trials. Their binomial is symmetric, with skewness 0, while the hundred trials with $p = 0.05$ have skewness 0.413. The rule treats the two alike, but the skewness does not. To see what the rule buys, the script computed, for each $n$, the largest error of the continuity-corrected approximation to $P(X \le x)$ over all $x$.
| $p$ | $n$ | $np$ | Skewness | Largest error, with correction | Without correction |
|---|---|---|---|---|---|
| 0.5 | 10 | 5.0 | 0 | 0.0027 | 0.1230 |
| 0.2294 | 22 | 5.0 | 0.274 | 0.0175 | 0.1171 |
| 0.05 | 100 | 5.0 | 0.413 | 0.0267 | 0.1160 |
| 0.2294 | 100 | 22.9 | 0.129 | 0.0085 | 0.0556 |
| 0.05 | 200 | 10.0 | 0.292 | 0.0191 | 0.0831 |
The table confirms the answer. At the threshold $np = 5$, the error of a probability computed from the normal curve is about 0.003 for a symmetric binomial, about 0.02 for $p = 0.23$, and about 0.03 for $p = 0.05$. Whether that is acceptable depends on the probability being computed. An error of 0.02 is small beside a probability of 0.5 and large beside a tail probability of 0.025. For $p = 0.2294$ the largest error stays below 0.01 only from $n = 74$ on ($np = 17$). For $p = 0.05$ it is still above 0.01 at $n = 400$.
The tails are where it matters most, because confidence intervals and tests use them. Take $p = 0.05$ and $n = 100$, so that $np = 5$, right at the threshold. The normal approximation says that $\hat{p}$ falls more than 1.96 standard errors from $p$ with probability 0.025 on each side. The exact probabilities are 0.0059 below and 0.0282 above, 0.0341 in all. The total is off by a third. The split between the two sides is lopsided by a factor of almost five, because the wall at zero cuts off the left tail. At $n = 400$ the two tails are 0.0190 and 0.0307, still unequal.
Any method that assumes symmetric normal tails for $\hat{p}$ inherits this. It is the first of two reasons that the textbook interval for a proportion behaves badly; the lattice of whole numbers is the second (Confidence Intervals for a Proportion).
Two further cautions about the rule:
- It is stated in terms of $p$, which in practice is unknown. Checking it with $\hat{p}$ in place of $p$ is common but does not guarantee what the rule intends. Brown, Cai and DasGupta (2001, §2.3) make this point about the conditions attached to the textbook interval.
- When $p$ is very small and $n$ large, so that $np$ is moderate but $p$ itself is tiny, the Poisson distribution with mean $np$ approximates the binomial better. It is the subject of The Poisson Distribution.
Exact probabilities need no approximation
If the approximation has these limits, why use it at all? It was indispensable when binomial probabilities had to be added by hand. Software now computes them exactly for any $n$, and the formula sheet lists the exact form beside the approximation:
$$P(X \le x) = \sum_{k=0}^{x} \binom{n}{k} p^k (1 - p)^{n-k}.$$
The approximation keeps two roles:
- It explains the behavior of $\hat{p}$: its center, its spread, and how both depend on $n$ and $p$.
- It gives closed-form confidence intervals, tests and sample sizes that can be computed and reasoned about directly, as the rest of the unit shows.
Where an exact calculation is available and the sample is small, the exact calculation should be used. Even exact methods have a cost of their own, as the tests article shows.
Summary
| Quantity | Formula |
|---|---|
| Sample proportion | $\hat{p} = x/n$ |
| Mean and standard error of $\hat{p}$ | $E[\hat{p}] = p$, $\operatorname{SE}(\hat{p}) = \sqrt{p(1-p)/n}$ |
| Mean and standard deviation of $X$ | $\mu = np$, $\sigma = \sqrt{np(1-p)}$ |
| Normal approximation | $Z = (\hat{p} - p)/\sqrt{p(1-p)/n} \approx N(0, 1)$ |
| Continuity correction | $P(X \le x) \approx \Phi((x + 0.5 - \mu)/\sigma)$; $P(X \ge x) \approx 1 - \Phi((x - 0.5 - \mu)/\sigma)$ |
| Skewness of $X$ | $(1 - 2p)/\sqrt{np(1-p)}$ |
| Rule of thumb | $np \ge 5$ and $n(1-p) \ge 5$; otherwise exact binomial probabilities |
| Sampling without replacement | multiply the standard error by $\sqrt{(N - n)/(N - 1)}$ |
What we have learned
A sample proportion is a sample mean of zeros and ones. Its mean is $p$ and its standard error is $\sqrt{p(1-p)/n}$, 0.0595 for samples of 50 young adults. For large samples it is approximately normal, and the continuity correction makes the approximation accurate to within 0.0032 at $n = 50$. The binomial's skewness, $(1 - 2p)/\sqrt{np(1-p)}$, decides how large is large enough. The rule $np \ge 5$ still allows errors of 0.02 to 0.03, and lopsided tails, when $p$ is far from one half.
The standard error contains the unknown $p$. An interval for $p$ must estimate it somehow, and the obvious way, putting $\hat{p}$ in its place, turns out to have a cost. Confidence Intervals for a Proportion measures that cost exactly and shows what to use instead.
In Python
from math import sqrt
from scipy import stats
n, p = 50, 0.2294
mu, sigma = n * p, sqrt(n * p * (1 - p))
print(stats.binom.cdf(8, n, p)) # exact: about 0.1588
print(stats.norm.cdf((8 + 0.5 - mu) / sigma)) # with continuity correction: about 0.1590
print(stats.hypergeom.cdf(8, 1696, 389, n)) # without replacement: about 0.1550
Every number in this article is computed by tools/experiments/applied-statistics/normal-approximation-to-the-binomial.py in the site's repository, using the NHANES loader in proportions.py beside it; its binomial functions were checked against scipy 1.17.1.
References
- Brown, L. D., Cai, T. T., and DasGupta, A. (2001). Interval estimation for a binomial proportion. Statistical Science, 16(2), 101–133. record · 4 pages
- National Center for Health Statistics (2020). National Health and Nutrition Examination Survey 2017–2018: Demographic Variables and Sample Weights (DEMO_J), Blood Pressure (BPX_J) and Blood Pressure and Cholesterol questionnaire (BPQ_J) data files. Centers for Disease Control and Prevention. https://wwwn.cdc.gov/nchs/nhanes/continuousnhanes/default.aspx?BeginYear=2017 record · 45 pages
- NIST/SEMATECH. e-Handbook of Statistical Methods, §7.2.4 (Does the proportion of defectives meet requirements?). National Institute of Standards and Technology. https://www.itl.nist.gov/div898/handbook/ record · 30 pages
- Ostchega, Y., Fryar, C. D., Nwankwo, T., and Nguyen, D. T. (2020). Hypertension Prevalence Among Adults Aged 18 and Over: United States, 2017–2018. NCHS Data Brief No. 364. National Center for Health Statistics. record · 6 pages
- Pagano, M., Gauvreau, K., and Mattie, H. (2022). Principles of Biostatistics (3rd ed.). CRC Press. The course text. record · 35 pages