Advertisement
Advertisement

About Sample Size

Guide: Sample Size Calculation

Too small a sample produces unreliable results with wide confidence intervals — you may miss a real effect (Type II error). Too large a sample wastes resources and can make trivial differences statistically significant.

Calculating the required sample size before collecting data ensures your study has adequate statistical power to detect the effect you care about.

The margin of error (MOE) is the maximum acceptable error in your estimate. If you want to estimate a population mean with a margin of error of ±5 kg, your CI will be: (sample mean) ± 5 kg.

Smaller MOE → more precise estimate → larger required sample size. Halving the margin of error quadruples the required sample size.

You can estimate SD from:

  • Pilot study: Run a small preliminary study (n=20–30) to estimate SD
  • Published literature: Find similar studies and use their reported SD
  • Range rule: Estimate SD ≈ Range / 4 (for approximately normal data)
  • Expert knowledge: Use domain knowledge about the typical spread of the measurement

The required sample size for a proportion is maximised when p = 0.5. If you don't know the expected proportion, use p = 0.5 for the most conservative (largest) sample size estimate.

If you have a good estimate of the expected proportion from prior data (e.g. the baseline rate is around 30%), use that value to get a more accurate and possibly smaller required sample size.

A smaller margin of error gives a more precise estimate but requires a larger sample. Doubling precision (halving E) quadruples the required n.

p(1−p) is maximized at p = 0.5, so using it gives the largest (most conservative) sample size. If you have a better estimate, use it to reduce sample size.