Study design · ~8 min read
Sample Size and Power: How to Justify Your n Before You Collect Data
Statistics for clinical researchers and surgical trainees
Published
In short
A power analysis answers one question before you enrol a single patient: how many participants do you need to have a good chance of detecting an effect worth detecting? It needs four inputs: the smallest effect that would matter clinically, the significance level (usually a two-sided .05), the power you want (usually 80% or 90%), and the test you will run. Do it before the study, report it in your methods, and never try to compute power from your results afterwards.
"Was this study large enough?" is one of the first questions a reviewer asks, and one of the most common reasons a manuscript is sent back. A study that is too small can miss a real, clinically important effect and report a falsely reassuring negative. It can also, less obviously, make a significant result less trustworthy: when power is low, the significant findings that do emerge tend to overestimate the true effect.3 A power analysis is how you avoid both traps, and it belongs in the planning stage, before any data exist.
What a power analysis actually answers
Statistical power is the probability that your study will detect an effect of a given size, if that effect is really there. A study with 80% power has an 80% chance of returning a statistically significant result when the effect it was designed to find is genuinely present, which also means a 20% chance of missing it (a type II error).5 An a-priori power analysis inverts that relationship: you fix the power you want and solve for the sample size that delivers it.
The ethical case is as strong as the statistical one. Enrol too few patients and you risk a study that cannot answer its own question, exposing participants to research burden for a result nobody can trust. Enrol far more than you need and you expose extra patients to risk for no added knowledge. The right sample size is the smallest one that can properly evaluate the study aim.5
The four numbers you need
Every a-priori calculation comes down to four decisions. Settle them in order and the sample size follows.
1. The effect size you care about. This is the one that trips people up. It should be the smallest effect that would be clinically meaningful, not the large effect you are hoping for or the effect a pilot happened to show. Powering for an optimistic effect produces a small, underpowered study that will miss a smaller but still important difference.5 Effect size can be entered as a standardized value (Cohen's d, Pearson r) or built from clinical terms: a mean difference and its standard deviation, or two proportions. Cohen's conventions are a rough guide when you have nothing else: d of 0.2 is small, 0.5 medium, 0.8 large.1
2. The significance level (alpha). The probability of a false positive. Convention is a two-sided .05. Lower it only if you have a specific reason, such as multiple comparisons.
3. The power you want. Conventionally at least 80%, and 90% is better when feasible.5 Higher power costs more patients, so it is a trade-off between rigour and recruitment.
4. The test and design. A two-sample t-test, a paired comparison, a one-way ANOVA, a correlation, and a comparison of two proportions each need a different formula. The sample size for a paired design is usually much smaller than for the equivalent independent-groups design, so the design choice matters before the arithmetic.
Consider a two-arm surgical trial comparing a continuous outcome between groups. You decide the smallest difference worth detecting corresponds to a medium standardized effect, Cohen's d of 0.5, and you want 80% power at a two-sided .05. StatsPlease solves it deterministically:
| Input | Value |
|---|---|
| Test | Two-sample t-test |
| Effect size (Cohen's d) | 0.50 |
| Power | 0.80 |
| Alpha (two-sided) | .05 |
Required sample size = 64 per group (128 total)
A sample size of 64 patients per group (128 in total) provides 80% power to detect a between-group difference of Cohen's d = 0.5 at a two-sided significance level of .05. Smaller effects would require a larger sample.
Computed by the StatsPlease power engine. Flip to "Smallest detectable effect" instead and the same tool reports that a fixed 30 patients per group could reliably detect only a large effect (about d = 0.74) at 80% power, which is often the honest reason a planned study is underpowered.
Sample-size and power figures computed with scipy/statsmodels (the same solvers behind G*Power and R's pwr package); no dataset is required for a planning calculation.
The reviewer trap: post-hoc power
Here is the single most common power mistake in the clinical literature, and it is not underpowering. It is computing power after the study, from the effect the study happened to observe, to explain a non-significant result: "the study had only 40% power to detect the observed difference." This post-hoc or observed power is uninformative, and often circular.2 Observed power is a direct mathematical function of the p-value: a non-significant result always corresponds to low observed power, so the statement adds nothing you did not already know from the p-value itself.4
The correct tool for interpreting a completed study is the confidence interval. If a trial finds no significant difference, the confidence interval on the effect tells you what the data can and cannot rule out: a tight interval around zero is genuine evidence of no important effect, while a wide interval means the study was simply inconclusive.2 Power belongs before the experiment; confidence intervals belong after it. Do not cross the two.4
Common mistake
A reviewer asks, "what was the power of your study to detect the difference you observed?" and the author dutifully computes it and reports 44%. Both are making the same error. The honest response is to report the effect estimate with its 95% confidence interval and let that interval speak to precision. Post-hoc power calculated from the observed effect cannot rescue, or condemn, a finished study.
How to report it in AMA format
State all four inputs and the resulting sample size in one or two sentences in your methods. A complete example: "A sample size of 64 patients per group (128 total) was required to detect a between-group difference of Cohen's d = 0.5 with 80% power at a two-sided significance level of .05. The effect size was chosen as the smallest difference judged clinically meaningful." If you inflated the target to allow for dropout, say so: "Allowing for 15% attrition, we planned to enrol 75 per group."
Keep the leading zero off the significance level (.05, not 0.05) and on effect sizes and power (0.5, 0.80). Italicise the statistic symbols (d, r, n). Naming the effect size as the minimal clinically important difference, rather than an expected or pilot-derived value, is exactly what a statistical reviewer looks for.5
Try it yourself
Run this calculation: in G*Power or StatsPlease
A power analysis needs no data, only the four inputs above, so you can run it in any tool and get the same answer. Both routes below return 64 per group for this design.
In G*Power
- Open G*Power (free). Set Test family to t tests and Statistical test to Means: Difference between two independent means (two groups).
- Set Type of power analysis to A priori: Compute required sample size.
- Enter Tail(s) = Two, Effect size d = 0.5, alpha = 0.05, Power = 0.80, Allocation ratio = 1.
- Click Calculate. Read the total sample size (128) and per-group n (64) from the output.
In StatsPlease
- Open the Analysis tab and switch to Advanced. No dataset is needed for a planning calculation.
- Press the Power Analysis preset button to open the calculator.
- Choose the test Two-sample t-test and the mode Required sample size.
- Enter the effect size (Cohen's d = 0.5, or build it from a mean difference and SD), power 0.80, and alpha 0.05.
- Read the required sample size, 64 per group, with a plain-language planning sentence you can paste into your protocol.
Compare: both return 64 per group (128 total), because both use the same non-central t distribution. Switch StatsPlease to Smallest detectable effect to answer the reverse question for a fixed budget, or Power to check the power of a design you have already committed to. Every figure is computed, not generated.
You might also read
References
- Cohen J. Statistical Power Analysis for the Behavioral Sciences. 2nd ed. Hillsdale, NJ: Lawrence Erlbaum Associates; 1988.
- Heckman MG, Davis JM 3rd, Crowson CS. Post Hoc Power Calculations: An Inappropriate Method for Interpreting the Findings of a Research Study. The Journal of Rheumatology. 2022;49(8):867–870. https://doi.org/10.3899/jrheum.211115
- Button KS, Ioannidis JPA, Mokrysz C, et al. Power failure: why small sample size undermines the reliability of neuroscience. Nature Reviews Neuroscience. 2013;14(5):365–376. https://doi.org/10.1038/nrn3475
- Hoenig JM, Heisey DM. The Abuse of Power: The Pervasive Fallacy of Power Calculations for Data Analysis. The American Statistician. 2001;55(1):19–24. https://doi.org/10.1198/000313001300339897
- Schober P, Vetter TR. Sample Size and Power in Clinical Research. Anesthesia & Analgesia. 2019;129(2):323. https://doi.org/10.1213/ANE.0000000000004375
Plan the study before you run it.
Work out the sample size your protocol needs in the Power Analysis calculator: open the Analysis tab, switch to Advanced, and press Power Analysis. Pick your test, enter the smallest effect worth detecting, your alpha, and your target power, and it returns the required sample size with a ready-to-paste planning sentence, computed from your inputs, not generated.
Try StatsPlease free