Inference for Proportions

⚡ Key Takeaways

Inference for proportions uses sample data to draw conclusions about an unknown population proportion pp. Key result: the sampling distribution of p^\hat{p} is approximately Normal with mean pp and standard deviation p(1−p)/n\sqrt{p(1-p)/n}, which lets us build confidence intervals and run hypothesis tests for one or two proportions. Applies to categorical (yes/no, success/failure) data — polls, medical trials, quality control. Developed through the work of Laplace, de Moivre, and the early 20th-century statisticians who formalized hypothesis testing.

💡 The Core Insight

A proportion is just a mean of zeros and ones. Label each "success" as 1 and each "failure" as 0; then p^\hat{p} is the average of these indicators. This means the Central Limit Theorem applies directly: for large enough nn, p^\hat{p} is approximately Normally distributed. Everything else — confidence intervals, zz-tests — flows from knowing the center (pp) and spread (p(1−p)/n\sqrt{p(1-p)/n}) of that Normal curve.

Formal Statement

DefinitionPopulation and Sample Proportion

The population proportion pp is the true fraction of all individuals in a population possessing a given attribute. The sample proportion is

1
p^=Xn\quad \hat{p} = \frac{X}{n}

where XX is the number of successes observed in a random sample of size nn, and X∼Binomial(n,p)X \sim \text{Binomial}(n, p). Derivation hint: Count successes, divide by sample size; each trial is an independent Bernoulli(pp) outcome.

TheoremSampling Distribution of p^\hat{p}

If a Simple Random Sample of size nn is drawn from a population with proportion pp, then p^\hat{p} has

2
μp^=p\quad \mu_{\hat{p}} = p

Derivation hint: μp^=E[X/n]=(1/n)E[X]=(1/n)(np)=p\mu_{\hat p} = E[X/n] = (1/n)E[X] = (1/n)(np) = p using E[Binomial]=npE[\text{Binomial}]=np.

3
σp^=p(1−p)n\quad \sigma_{\hat{p}} = \sqrt{\frac{p(1-p)}{n}}

Derivation hint: Var(X/n)=(1/n2)Var(X)=(1/n2) np(1−p)\text{Var}(X/n) = (1/n^2)\text{Var}(X) = (1/n^2)\,np(1-p); take the square root. Moreover, if np≥10np \geq 10 and n(1−p)≥10n(1-p) \geq 10 (the Large Counts Condition), the distribution of p^\hat{p} is approximately Normal:

4
p^≈N ⁣(p, p(1−p)n)\quad \hat{p} \approx \mathcal{N}\!\left(p,\ \frac{p(1-p)}{n}\right)

Derivation hint: Apply the Central Limit Theorem to the mean of nn Bernoulli indicator variables.

DefinitionStandard Error

Because pp is unknown in practice, we estimate the spread using the observed p^\hat{p}. The standard error of the sample proportion is

5
SEp^=p^(1−p^)n\quad SE_{\hat{p}} = \sqrt{\frac{\hat{p}(1-\hat{p})}{n}}

Derivation hint: Substitute the point estimate p^\hat p for pp in equation [3].

DefinitionConfidence Interval for One Proportion

A level-CC confidence interval for pp is

6
p^  ±  z∗p^(1−p^)n\quad \hat{p} \;\pm\; z^{*}\sqrt{\frac{\hat{p}(1-\hat{p})}{n}}

where z∗z^{*} is the critical value capturing the central CC proportion of the standard Normal curve (e.g. z∗=1.96z^{*}=1.96 for 95%). Derivation hint: Invert the statement P(−z∗≤(p^−p)/SE≤z∗)=CP(-z^* \le (\hat p - p)/SE \le z^*) = C to bracket pp.

DefinitionOne-Sample zz-Test for a Proportion

To test H0:p=p0H_0: p = p_0, compute the test statistic

7
z=p^−p0p0(1−p0)n\quad z = \frac{\hat{p} - p_0}{\sqrt{\dfrac{p_0(1-p_0)}{n}}}

Derivation hint: Standardize p^\hat p under H0H_0; crucially the SE uses the null value p0p_0, not p^\hat p. then find the pp-value from the standard Normal distribution according to the alternative hypothesis.

TheoremTwo-Sample zz-Test and Interval

For comparing two independent proportions p1,p2p_1, p_2, the difference p^1−p^2\hat{p}_1 - \hat{p}_2 has standard error (for a confidence interval)

8
SEdiff=p^1(1−p^1)n1+p^2(1−p^2)n2\quad SE_{\text{diff}} = \sqrt{\frac{\hat{p}_1(1-\hat{p}_1)}{n_1} + \frac{\hat{p}_2(1-\hat{p}_2)}{n_2}}

Derivation hint: Variances of independent quantities add; take the square root of the sum. For a test of H0:p1=p2H_0: p_1 = p_2, use the pooled proportion p^c=X1+X2n1+n2\hat{p}_c = \frac{X_1+X_2}{n_1+n_2} in the standard error:

9
z=p^1−p^2p^c(1−p^c)(1n1+1n2)\quad z = \frac{\hat{p}_1 - \hat{p}_2}{\sqrt{\hat{p}_c(1-\hat{p}_c)\left(\dfrac{1}{n_1}+\dfrac{1}{n_2}\right)}}

Derivation hint: Under H0H_0 both samples share a common pp, best estimated by combining all successes over all trials.

Why It Holds / Derivation

ProofFrom Bernoulli Trials to the Normal Curve

Step 1. Define indicator variables Yi=1Y_i = 1 if individual ii is a success, 00 otherwise. Each YiY_i is Bernoulli(pp) with E[Yi]=pE[Y_i] = p and Var(Yi)=p(1−p)\text{Var}(Y_i) = p(1-p).

Step 2. The total successes X=∑i=1nYiX = \sum_{i=1}^n Y_i, so p^=Xn=1n∑Yi=Yˉ\hat{p} = \frac{X}{n} = \frac{1}{n}\sum Y_i = \bar{Y}. A proportion is literally a sample mean.

Step 3. By linearity of expectation, E[p^]=1n∑E[Yi]=1n(np)=pE[\hat{p}] = \frac{1}{n}\sum E[Y_i] = \frac{1}{n}(np) = p. This gives equation [2].

Step 4. Because the trials are independent, variances add: Var(X)=∑Var(Yi)=np(1−p)\text{Var}(X) = \sum \text{Var}(Y_i) = np(1-p). Then Var(p^)=Var(X/n)=1n2np(1−p)=p(1−p)n\text{Var}(\hat{p}) = \text{Var}(X/n) = \frac{1}{n^2}np(1-p) = \frac{p(1-p)}{n}, giving equation [3].

Step 5. Since p^\hat{p} is a mean of nn i.i.d. variables, the Central Limit Theorem guarantees its distribution approaches Normal as nn grows. The Large Counts condition (np≥10np\ge 10, n(1−p)≥10n(1-p)\ge 10) ensures nn is large enough relative to how skewed the underlying Bernoulli is.

Step 6. Standardizing, Z=p^−pp(1−p)/nZ = \frac{\hat{p}-p}{\sqrt{p(1-p)/n}} is approximately standard Normal — the engine behind both the interval [6] and the test [7]. ■\blacksquare

∎
mathematician · Pierre-Simon Laplace | 1749–1827

Laplace generalized de Moivre's Normal approximation to the binomial and applied it to real proportions — most famously estimating the proportion of male births in Paris and computing the probability that it truly exceeded the female rate. His Théorie analytique des probabilités (1812) effectively created the confidence-interval reasoning we now use for proportions, framing it as "inverse probability."

Building Intuition

🧠 Intuition

Imagine a giant jar of red and white marbles where the true red fraction is pp. Each scoop of nn marbles gives a slightly different red fraction p^\hat{p}. If you imagine all possible scoops, their p^\hat{p} values pile up into a bell curve centered exactly at pp. Three levers control the width of that bell:

  • Sample size nn: it sits under a square root, so to halve the margin of error you must quadruple nn. Diminishing returns are baked in.
  • The true proportion pp: the spread p(1−p)p(1-p) is largest at p=0.5p=0.5 (maximum uncertainty) and shrinks toward the extremes. A near-unanimous population is easy to estimate; a 50/50 split is the hardest.
  • Confidence level: demanding 99% certainty instead of 95% widens the net (larger z∗z^*), trading precision for security.
Figure
Sampling distribution of p^\hat{p}: centered at the true pp, with the 95% confidence band shaded.

```svg

p p − 1.96·SE p + 1.96·SE 95% of all p̂ distribution of p̂ p̂

```

Worked Examples

ExampleConfidence Interval — Election Poll

Given: A random sample of n=1000n = 1000 likely voters; p^=0.52\hat{p} = 0.52 support candidate A. Build a 95% confidence interval for the true support pp.

Step 1 — Check conditions. Random sample ✓. Large counts: np^=520≥10n\hat{p}=520\ge10 and n(1−p^)=480≥10n(1-\hat{p})=480\ge10 ✓. (10% condition: population of voters ≫ 10,000 ✓.)

Step 2 — Standard error (eq. [5]):

SE=0.52×0.481000=0.0002496≈0.0158.SE = \sqrt{\frac{0.52 \times 0.48}{1000}} = \sqrt{0.0002496} \approx 0.0158.

Step 3 — Margin of error, z∗=1.96z^*=1.96:

ME=1.96×0.0158≈0.0310.ME = 1.96 \times 0.0158 \approx 0.0310.

Step 4 — Interval (eq. [6]):

0.52±0.031=(0.489, 0.551).0.52 \pm 0.031 = (0.489,\ 0.551).

Answer:

p∈(0.489, 0.551) at 95% confidence\boxed{p \in (0.489,\ 0.551) \text{ at 95\% confidence}}

Because the interval includes 0.50, we cannot conclude candidate A has majority support.

ExampleHypothesis Test — Defective Rate

Given: A factory claims its defect rate is p0=0.05p_0 = 0.05. An inspector finds X=38X = 38 defects in n=500n = 500 items. Test, at α=0.05\alpha = 0.05, whether the true rate exceeds 5%.

Step 1 — Hypotheses. H0:p=0.05H_0: p = 0.05 vs. Ha:p>0.05H_a: p > 0.05. Sample proportion p^=38/500=0.076\hat{p} = 38/500 = 0.076.

Step 2 — Conditions. np0=500(0.05)=25≥10np_0 = 500(0.05)=25\ge10, n(1−p0)=475≥10n(1-p_0)=475\ge10 ✓.

Step 3 — Test statistic (eq. [7], uses p0p_0):

z=0.076−0.050.05×0.95500=0.0260.000095=0.0260.009747≈2.67.z = \frac{0.076 - 0.05}{\sqrt{\dfrac{0.05 \times 0.95}{500}}} = \frac{0.026}{\sqrt{0.000095}} = \frac{0.026}{0.009747} \approx 2.67.

Step 4 — pp-value (right tail): P(Z>2.67)≈0.0038P(Z > 2.67) \approx 0.0038.

Step 5 — Decision. 0.0038<0.050.0038 < 0.05, so reject H0H_0.

Answer:

z≈2.67, p-value≈0.004⇒reject H0\boxed{z \approx 2.67,\ p\text{-value} \approx 0.004 \Rightarrow \text{reject } H_0}

There is strong evidence the true defect rate exceeds 5%.

Common Misconceptions

⚠️ The SE Switch: p0p_0 vs. p^\hat{p}

A frequent error is using the same standard error formula for both intervals and tests. They differ on purpose:

  • Confidence intervals use SE=p^(1−p^)/nSE = \sqrt{\hat{p}(1-\hat{p})/n} (eq. [5]) — we have no hypothesized value, so we estimate spread from the data.
  • Hypothesis tests use p0(1−p0)/n\sqrt{p_0(1-p_0)/n} (eq. [7]) — we assume H0H_0 is true, so the spread is computed under p0p_0.

Mixing these gives a wrong test statistic. Likewise, two-sample tests pool (eq. [9]) but two-sample intervals do not (eq. [8]).

⚠️ What "95% Confident" Does NOT Mean

A 95% confidence interval does not mean "there is a 95% probability that pp lies in this interval." Once computed, the interval either contains the fixed (but unknown) pp or it does not. The 95% refers to the long-run capture rate of the procedure: if we repeated the sampling endlessly, about 95% of the resulting intervals would trap the true pp.

CounterexampleWhen the Normal Approximation Fails

Suppose a rare disease has true prevalence p=0.01p = 0.01 and you sample n=200n = 200 people. Then np=2<10np = 2 < 10 — the Large Counts condition fails. The sampling distribution of p^\hat{p} is strongly right-skewed (you'll often see 0, 1, or 2 cases, never negative ones), so a Normal-based interval like p^±1.96 SE\hat{p}\pm 1.96\,SE can dip below 0 — nonsense for a proportion. Here one must use the exact Binomial or a corrected method (e.g. the Wilson or Agresti–Coull interval).

Connections

connection

Inference for proportions is one face of a unified framework:

  • It is a special case of Inference for Means — a proportion is the mean of 0/1 data, with the twist that the spread p(1−p)p(1-p) is determined by the center, so we use zz rather than tt.
  • It rests entirely on the Central Limit Theorem and the Normal Distribution.
  • The underlying success count obeys the Binomial Distribution, the exact distribution we approximate.
  • The two-sample test connects to the Chi-Square Test: a 2×22\times 2 table's chi-square statistic equals the square of the two-proportion zz-statistic.
  • The logic of pp-values and confidence intervals belongs to the broader theory of Hypothesis Testing and Confidence Intervals.

Real-World Applications

🔬 Where this appears

Historical Development

⏳ History
- 1713 — Jacob Bernoulli's Ars Conjectandi states the Law of Large Numbers, proving p^\hat{p} converges to pp — the philosophical foundation of using samples to estimate proportions.
- 1733 — Abraham de Moivre derives the Normal approximation to the binomial, the first version of equation [4].
- 1812 — Pierre-Simon Laplace generalizes de Moivre's result and applies "inverse probability" to real proportions (e.g. sex ratios at birth).
- 1908 — William Sealy Gosset ("Student") publishes the tt-distribution; though aimed at means, it sharpens thinking about small-sample inference relevant to proportions.
- 1920s — Ronald Fisher formalizes significance testing and the pp-value, giving the one-sample proportion test its modern form.
- 1927 — Edwin B. Wilson proposes the Wilson score interval, a more accurate alternative to the simple p^±z∗SE\hat{p}\pm z^*SE interval, especially for small nn or extreme pp.
- 1933 — Jerzy Neyman and Egon Pearson introduce the confidence interval concept and the hypothesis-testing decision framework (Type I / II errors).
- 1934 — Clopper and Pearson publish the exact binomial interval, the gold-standard guaranteed-coverage method.
- 1998 — Agresti and Coull popularize the "add-2-successes-and-2-failures" adjustment, dramatically improving the textbook interval's accuracy.

Subtleties & Limits

open-problem

The "obvious" Wald interval p^±z∗p^(1−p^)/n\hat{p}\pm z^*\sqrt{\hat{p}(1-\hat{p})/n} has a notoriously erratic actual coverage: for a nominal 95% interval, real coverage can dip well below 90% even for moderately large nn, oscillating chaotically with pp — a phenomenon documented by Brown, Cai, and DasGupta (2001). There is no single universally "best" interval: the exact Clopper–Pearson is conservative (over-covers), Wald is unreliable, and Wilson/Agresti–Coull are good compromises. Choosing the right method for small samples, extreme proportions, or clustered/non-independent data (where the variance formula [3] breaks down) remains an active practical concern, motivating bootstrap and Bayesian credible intervals as alternatives.

See Also

Binomial Distribution · Central Limit Theorem · Confidence Intervals · Hypothesis Testing · Inference for Means · Chi-Square Test · Sampling Distributions · Normal Distribution