Sampling & EstimationTopic #23 of 33

Sample Size Determination

Planning studies: calculating required sample size for desired precision and power.

Overview

Sample size determination involves calculating how many observations are needed to achieve a desired level of precision or statistical power.

For Estimating a Mean

When σ\sigma is Known

n=(zα/2×σME)2n = \left(\frac{z_{\alpha/2} \times \sigma}{ME}\right)^2

Where MEME = desired margin of error

When σ\sigma is Unknown

Use a pilot study or estimate σ\sigma, or use:

n=(tα/2,df×sME)2n = \left(\frac{t_{\alpha/2, df} \times s}{ME}\right)^2

For Estimating a Proportion

n=p^(1p^)×(zα/2ME)2n = \hat{p}(1-\hat{p}) \times \left(\frac{z_{\alpha/2}}{ME}\right)^2

Conservative Estimate

When pp is unknown, use p=0.5p = 0.5 (maximizes variance):

n=0.25×(zα/2ME)2n = 0.25 \times \left(\frac{z_{\alpha/2}}{ME}\right)^2

For Hypothesis Testing (Power Analysis)

n=(zα+zβ)2×σ2δ2n = \frac{(z_\alpha + z_\beta)^2 \times \sigma^2}{\delta^2}

Where:

  • zαz_\alpha = critical value for significance level
  • zβz_\beta = critical value for power (1β1 - \beta)
  • δ\delta = minimum detectable effect size

Common Values

Confidencezα/2z_{\alpha/2}
90%1.645
95%1.96
99%2.576
Powerzβz_\beta
80%0.84
90%1.28
95%1.645

Practical Considerations

FactorEffect on Required nn
Smaller MELarger nn
Higher confidenceLarger nn
Higher powerLarger nn
Larger σ\sigma or varianceLarger nn
Smaller effect sizeLarger nn

Examples

Example 1: Sample Size for Mean

Estimate mean with ME=5ME = 5, σ=20\sigma = 20, 95% confidence:

n=(1.96×205)2=(39.25)2=7.842=61.5n=62n = \left(\frac{1.96 \times 20}{5}\right)^2 = \left(\frac{39.2}{5}\right)^2 = 7.84^2 = 61.5 \Rightarrow n = 62

Example 2: Sample Size for Proportion

Estimate proportion within ±3%\pm 3\% (ME=0.03ME = 0.03), 95% confidence, unknown pp:

n=0.25×(1.960.03)2=0.25×65.332=0.25×4268=1067n = 0.25 \times \left(\frac{1.96}{0.03}\right)^2 = 0.25 \times 65.33^2 = 0.25 \times 4268 = 1067

Example 3: With Prior Estimate of pp

If we expect p0.20p \approx 0.20, ME=0.03ME = 0.03, 95% confidence:

n=(0.20)(0.80)×(1.960.03)2=0.16×4268=683n = (0.20)(0.80) \times \left(\frac{1.96}{0.03}\right)^2 = 0.16 \times 4268 = 683

Less than conservative estimate since p(1p)<0.25p(1-p) < 0.25

Example 4: For Power Analysis

Detect difference of δ=5\delta = 5, σ=15\sigma = 15, α=0.05\alpha = 0.05, power = 80%:

n=(1.96+0.84)2×15252=7.84×22525=176425=70.6n=71 per groupn = \frac{(1.96 + 0.84)^2 \times 15^2}{5^2} = \frac{7.84 \times 225}{25} = \frac{1764}{25} = 70.6 \Rightarrow n = 71 \text{ per group}

Adjustments

Finite Population Correction

If sampling from population of size NN:

nadj=n1+n1Nn_{\text{adj}} = \frac{n}{1 + \frac{n-1}{N}}

Adjusting for Nonresponse

If expected response rate is rr:

nneeded=nrn_{\text{needed}} = \frac{n}{r}

Sample Size Quick Reference

For 95% CI for mean (σ=10\sigma = 10):

Desired MERequired nn
5.016
2.097
1.0385
0.51537

For 95% CI for proportion (conservative):

Desired MERequired nn
10%97
5%385
3%1068
1%9604