Sample Size Calculation - Sizing Significance
Adequate sample size supports study precision, validity, ethical conduct, and efficient resource use.
Core concepts
- Population: The entire group of interest.
- Sample: A subset of the population studied to make inferences about that population.
- Parameter: A true population value, such as the population mean $\mu$.
- Statistic: A sample-derived estimate of a population parameter, such as the sample mean $\bar{x}$.
- Sampling error: The difference between a sample estimate and the true population value that arises by chance. It generally decreases as sample size increases.
Key determinants of sample size
- Significance level ($\alpha$): Probability of a Type I error. It is commonly set at $\mathbf{0.05}$. A lower $\alpha$ requires a larger sample, all else being equal.
- Power ($1-\beta$): Probability of rejecting the null hypothesis when a specified true effect exists. Studies commonly target at least $\mathbf{80%}$ power. Here, $\beta$ is the probability of a Type II error.
- Effect size: The smallest clinically or scientifically important difference to be detected. A smaller target effect requires a larger sample.
- Variability: Greater outcome variability requires a larger sample. This is represented by the standard deviation or variance for continuous outcomes and by $p(1-p)$ for a proportion.
- Desired precision: A narrower confidence interval or smaller margin of error requires a larger sample.
| Error | Description | Symbol | Probability | Implication for Sample Size |
|---|---|---|---|---|
| Type I | Rejecting a true null hypothesis (H₀) (False Positive) | $\alpha$ | $\alpha$ | Lower $\alpha$ (e.g., $\mathbf{0.01}$ vs $\mathbf{0.05}$) → ↑ sample size |
| Type II | Failing to reject a false H₀ (False Negative) | $\beta$ | $\beta$ | Lower $\beta$ (i.e., higher Power $1-\beta$, e.g., $\mathbf{90%}$ vs $\mathbf{80%}$) → ↑ sample size |
⭐ Decreasing the significance level from 0.05 to 0.01 or increasing power from 80% to 90% increases the required sample size, all else being equal.
Sample Size Calculation - Formula Frenzy
Estimating a population proportion
For a simple random sample and a large-sample normal approximation:
$n = \dfrac{Z_{1-\alpha/2}^{2}p(1-p)}{d^{2}}$
- $p$: Expected population proportion.
- $d$: Desired absolute precision (margin of error).
- $Z_{1-\alpha/2}$: Standard-normal critical value for a two-sided confidence level.
⭐ If $p$ is unknown, use $p = 0.50$; this maximizes $p(1-p)$ and therefore gives the largest, most conservative sample size for a fixed $d$ and confidence level.
Estimating a population mean
$n = \dfrac{Z_{1-\alpha/2}^{2}\sigma^{2}}{d^{2}}$
- $\sigma$: Anticipated population standard deviation, usually estimated from prior data or a pilot study.
- $d$: Desired absolute precision (margin of error).
- $Z_{1-\alpha/2}$: Standard-normal critical value for a two-sided confidence level.
Comparing two groups
The appropriate formula depends on the outcome type, allocation ratio, and study design. The main inputs are:
- Significance level $\alpha$ and whether the test is one-sided or two-sided.
- Desired power $1-\beta$.
- The smallest clinically important between-group difference.
- Anticipated variance for means or expected event proportions for binary outcomes.
- Allocation ratio and any pairing, clustering, or repeated-measures structure.
Direction of effects on sample size
- Sample size increases as the confidence level, desired power, or outcome variability increases.
- Sample size increases as the target effect size becomes smaller.
- Sample size increases as the desired margin of error $d$ becomes smaller.
Common critical values for two-sided confidence intervals
- 90% confidence interval: $Z = 1.645$
- 95% confidence interval: $Z = 1.96$
- 99% confidence interval: $Z = 2.576$ (often rounded to 2.58)
Loading diagram…
Sample Size Calculation - Smart Sizing
-
Finite population correction (FPC): Consider the correction when sampling without replacement from a finite population, especially when the sampling fraction is appreciable (commonly more than 5%). If $n_0$ is the initially calculated sample size and $N$ is the population size: $n_{FPC} = n_0 / (1 + (n_0 - 1)/N)$.
-
Design effect (DEFF): Account for the sampling design relative to simple random sampling: $n_{design} = n_{SRS} * DEFF$. For cluster designs with positive intracluster correlation, $DEFF$ is usually greater than 1, so a larger sample is required. For equal cluster size $m$ and intracluster correlation coefficient $\rho$, a common approximation is $DEFF = 1 + (m - 1)\rho$.
-
Nonresponse or attrition adjustment: Inflate the analyzable sample size using the anticipated loss proportion $L$: $n_{recruited} = n_{required} / (1-L)$. For an anticipated 20% loss, divide the required analyzable sample by 0.80. Round the final value up to the next whole participant.
-
Diagnostic-accuracy studies: Calculate sample size separately for the desired precision of sensitivity and specificity when appropriate. The required total sample also depends on disease prevalence because adequate numbers of participants with and without the target condition are needed. PPV and NPV are prevalence-dependent.
-
Pilot and feasibility studies: Determine sample size from the pilot study's objective, such as assessing recruitment, retention, procedure feasibility, or estimating a parameter with specified precision. A fixed rule such as 10-20% of the main-study sample or 30-50 participants is not universally valid. Pilot estimates of variance or effect size may be imprecise and should be interpreted cautiously when planning the definitive study.
High-Yield Points - ⚡ Biggest Takeaways
- Required sample size increases with higher power, a higher confidence level, a smaller target effect, greater variability, or a narrower margin of error.
- Power ($1-\beta$), commonly set at 80% or 90%, is the probability of detecting a specified true effect with the planned statistical test.
- The significance level ($\alpha$), commonly 0.05, is the probability of a Type I error when the null hypothesis is true.
- Estimation formulas differ for proportions, which use $p(1-p)$, and means, which use the variance $\sigma^2$.
- If an expected proportion is unknown, $p = 0.50$ gives the maximum sample size for fixed precision and confidence.
- Cluster sampling usually requires inflation by a design effect when observations within clusters are positively correlated.
- Adjust the calculated sample for finite populations, nonresponse or attrition, and the intended sampling or analysis design when applicable.
Unlock the full lesson and continue reading
Signup to continue reading this lesson and unlimited access questions, flashcards, AI notes, and more