Skip to content

Sample size calculation

This module outlines the mathematical foundations for sample size calculation in biomedical research, a critical step to ensure study validity and precision. It details the specific formulas used for estimating population means and proportions, the essential variables required (precision, confidence level, and variance), and the necessary adjustments for real-world study designs, such as design effects and non-response rates. Mastering these calculations allows investigators to determine the minimum number of participants needed to achieve statistically significant and reliable results.

Key points

  • Primary Variables Sample size depends on Precision dd, Confidence Level ZZ, and Population Variance σ2\sigma^2 or Prevalence pp.
  • Confidence Level Conventionally set at 95% Z=1.96Z = 1.96.
  • Mean Formula n=(Z2×σ2)/d2n = (Z^2 \times \sigma^2) / d^2 (used for continuous data).
  • Proportion Formula n=(Z2×p×q)/d2n = (Z^2 \times p \times q) / d^2 (used for categorical data).
  • Estimation of pp If unknown, use 0.5 (50%) to obtain the maximum required sample size.
  • Adjustments Must account for Design Effect (in cluster sampling), Non-response (dropouts), and Confounding variables (10% increase per confounder).
  • Software Tools Common tools include Epi Info, OpenEpi, and PS (Power and Sample Size Calculation).

1. Foundational Variables

  • Precision dd Also known as the margin of error. It defines how close the estimate should be to the true value. Range is typically 0.01 to 0.05.
  • Confidence Level ZZ The degree of certainty. A 95% confidence level uses a standard normal deviate ZαZ_\alpha of 1.96.
  • Variance/Prevalence
    • Rare conditions = Larger sample size needed.
    • Common conditions = Smaller sample size needed.

2. Calculation for Estimating a Mean (Continuous Variables)

  • Formula n=Z2×σ2d2n = \frac{Z^2 \times \sigma^2}{d^2}
  • Estimating σ\sigma (Standard Deviation) if unknown
    1. Conduct a pilot survey.
    2. Refer to previous literature.
    3. Use the expected range divided by six (Range/6).
  • Example d=5d=5, Z=1.96Z=1.96, σ=20  ⟹  n=(1.962×202)/52≈62\sigma=20 \implies n = (1.96^2 \times 20^2) / 5^2 \approx 62.

3. Calculation for Estimating a Proportion (Categorical Variables)

  • Formula n=Z2×p×qd2n = \frac{Z^2 \times p \times q}{d^2}
    • pp = estimated prevalence/proportion.
    • q=1−pq = 1 - p.
  • Simplified Concept Often referred to as 4pq/d24pq/d^2 in research discussions.
  • Source of pp Must come from previous prevalence studies, not correlation studies.
  • Conservative Estimate If pp is unknown, use 0.5 to ensure the study is adequately powered.
  • Example p=0.8p=0.8, q=0.2q=0.2, d=0.04d=0.04, Z=1.96  ⟹  n=(1.962×0.8×0.2)/0.042=384Z=1.96 \implies n = (1.96^2 \times 0.8 \times 0.2) / 0.04^2 = 384.

4. Mandatory Adjustments and Corrections

  • Design Effect (DEFF):
    • Used for cluster sampling (where subjects are not independent).
    • Multiply initial nn by a constant (usually 1 to 2).
  • Non-Response Rate:
    • Add a buffer (e.g., 10%) to account for dropouts or lost-to-follow-up.
  • 10% Confounder Rule:
    • Increase sample size by 10% for every anticipated confounding variable.

5. Practical Tools and Documentation

  • Software Options:
    • Epi Info and OpenEpi (CDC supported).
    • PS (Vanderbilt University).
  • Methodology Requirements: Always cite the software used and state the exact parameters Z,p,d,σZ, p, d, \sigma entered into the calculation.