Power analysis

Power analysis

How calculating the chance a study will detect a real effect lets researchers choose the sample size in advance, balancing false positives, false negatives, effect size and cost.

What it is

Statistical power is the probability that a study will detect an effect of a given size when that effect really exists, that is, correctly reject a false null hypothesis. Power analysis uses the relationship among four quantities: the significance level α (the accepted false-positive rate, usually 0.05), the power 1 − β (usually 0.80 or 0.90), the effect size and the sample size n. If three are fixed, the fourth is determined. Most often it is used before data collection to find the sample size needed. A study that is too small will probably miss real effects and gives unreliable estimates, while one that is too large wastes resources and, when humans or animals are involved, exposes more subjects than necessary to risk.

It answers questions such as: How many samples per group do I need to detect a 10% difference? What power does my existing study have? What is the smallest effect I could detect with the budget I have? Funders, ethics committees and journals commonly require a sample-size justification.

Fundamentals

Type I and II errors and power

Testing a hypothesis can lead to two errors: a Type I error (false positive, rejecting a true null; probability α) and a Type II error (false negative, failing to reject a false null; probability β). Power = 1 − β. Under the alternative hypothesis, the test statistic follows a shifted distribution, and power is the area of that distribution beyond the critical value. Power increases with larger effect size, larger sample size, larger α (more lenient), and lower variability; one-sided tests have more power than two-sided ones when the direction is known. A study with 80% power will miss a real effect of the assumed size 1 time in 5.

Effect size

The effect size is the magnitude of the difference or association that is considered meaningful, expressed in a standardized or raw unit. For two means, Cohen’s d = (μ1 − μ2)/σ, with conventional benchmarks of 0.2 (small), 0.5 (medium) and 0.8 (large); for correlations, r of 0.1, 0.3 and 0.5; for ANOVA, f of 0.1, 0.25 and 0.4 (or η2); for proportions, Cohen’s h or the odds ratio; for chi-square tests, w. These benchmarks are only rough, and the best practice is to base the effect size on the smallest effect of scientific or practical interest, or on estimates from pilot data or prior literature (published effects are often inflated by publication bias, so planning on them gives underpowered studies; using a conservative fraction or the lower bound of an interval is wiser). The variability σ is likewise taken from earlier data or pilot studies.

Sample-size formulas

For comparing two independent means with equal group size n per group and a two-sided test:

n = 2 (z1−α/2 + z1−β)2 σ2 / Δ2 = 2 (z1−α/2 + z1−β)2 / d2

With α = 0.05 (z = 1.96) and power 0.80 (z = 0.84), n ≈ 15.7/d2 per group: about 393 per group for d = 0.2, 64 for d = 0.5 and 25 for d = 0.8. For a single mean or paired differences, n = (z1−α/2 + z1−β)2 σ2/Δ2. For two proportions p1 and p2: n = (z1−α/2 + z1−β)2 [p1(1 − p1) + p2(1 − p2)] / (p1 − p2)2. For a correlation, n = [(z1−α/2 + z1−β)/arctanh(r)]2 + 3. For one-way ANOVA, regression, mixed designs, survival analysis (number of events needed, d = 4(z1−α/2 + z1−β)2/(ln HR)2 for equal allocation) and others, noncentral distributions are used, usually through software. Because sample size grows with 1/d2, halving the effect size quadruples the required n.

Practical adjustments

  • Attrition and missing data: inflate n by 1/(1 − dropout rate).
  • Clustering: in cluster-randomized or nested data, multiply by the design effect, 1 + (m − 1) ICC, with cluster size m and intraclass correlation ICC.
  • Multiple comparisons: using a stricter α (Bonferroni) requires more subjects.
  • Unequal allocation: ratios other than 1:1 need more total participants.
  • Complex models (mixed models, SEM, machine learning) often use simulation-based power analysis: simulate many datasets from the assumed model, analyze each, and count the share of significant results.

Post-hoc power and precision-based planning

“Observed power” computed from a completed study’s own effect estimate is just a transformation of the p-value and gives no new information, and it should not be used to explain a non-significant result; confidence intervals are the proper tool. A sensitivity analysis (given n, which effect could be detected with 80% power) is acceptable. An alternative approach is precision-based planning: choose n so that the confidence interval has a desired width (for a mean, n = (z1−α/2 σ/E)2 for margin of error E), which suits estimation rather than testing. Underpowered research also overestimates effect sizes among significant findings (the “winner’s curse”, Type M error) and may produce Type S (wrong sign) errors.

Typical applications and limits

Used for planning clinical trials, laboratory and animal experiments, surveys, A/B tests and computational benchmarks. Limits: the answer is only as good as the assumed effect size and variance; real data may violate the assumed model; and power calculations do not protect against bias or poor design.

Basic operation

  1. Define the primary analysis. Fix the main hypothesis, test, and outcome measure.
  2. Choose α and target power. Typically 0.05 and 0.80–0.90, adjusting α for multiple tests.
  3. Determine the effect size. Use the smallest meaningful effect, informed by pilot data or conservative literature values.
  4. Estimate variability. Obtain σ, baseline rates or ICC from earlier data.
  5. Calculate sample size. Use formulas or software, or simulation for complex models.
  6. Adjust for reality. Add allowance for attrition, clustering and unequal groups.
  7. Test sensitivity. Recalculate under optimistic and pessimistic assumptions, and examine the cost-feasibility trade-off.
  8. Collect the output. You obtain a justified sample size or power curve; simulation-based approaches and reporting are covered in the video.

Good practice

  • Plan power before collecting data. Do it as part of the protocol.
  • Base effect sizes on meaning, not convenience. Avoid choosing an effect to make n small.
  • Be conservative with literature estimates. Published effects tend to be inflated.
  • Allow for dropout. Plan for realistic final sample size.
  • Do not report post-hoc power. Use confidence intervals instead.
  • Respect ethics. Studies with people or animals should be neither underpowered nor needlessly large, and the sample-size justification should be recorded in the protocol and registered.

Key terms

  • Power (1 − β) — the probability of detecting a true effect of a given size.
  • Type I error (α) — rejecting a true null hypothesis, a false positive.
  • Type II error (β) — failing to reject a false null hypothesis, a false negative.
  • Effect size — the magnitude of the difference or relationship of interest.
  • Cohen’s d — a standardized mean difference.
  • Design effect — the inflation factor in sample size caused by clustering.
  • Minimum detectable effect — the smallest effect the study can detect at the chosen power.

Video coming soon

About five minutes on Power analysis: how it works in detail, how the data is acquired, and how it is analyzed.

Shopping cart

0
image/svg+xml

No products in the cart.

Continue Shopping