Power Analysis for the t-test

Statistics
Introduced by
Jacob Cohen
Year
1969
Type
Sample size determination

What does it do?

Power analysis for the t-test is a sample size planning procedure that estimates how many participants are needed to detect a mean difference of a given size with acceptable probability.

It links four quantities (Cohen's d, significance level α, power 1 − β, and sample size), so that fixing any three determines the fourth. The framework is associated with Jacob Cohen's work, cited here through the 1988 second edition of Statistical Power Analysis for the Behavioral Sciences.

The intuition behind the method

Before you run a study, you want to know whether your planned sample is large enough to see the effect you expect. Power analysis answers that question. Think of it as a budget calculation: the bigger the effect you are looking for, the fewer participants you need; the smaller the effect, the more participants are required. Running a study without this calculation risks either wasting resources on an oversized study or, more commonly, ending up with a sample too small to detect a real difference — a false negative.

History

The concept of statistical power was introduced by Jerzy Neyman and Egon Pearson in the 1930s as part of their hypothesis-testing framework. Jacob Cohen developed practical power analysis for social scientists; the expanded second edition of 1988 is the one cited here. Cohen's d = 0.2, 0.5, and 0.8 benchmarks for small, medium, and large effects remain in everyday use.

When to use it

Use this procedure when you are planning a study that will be analysed with an independent-samples t-test and need to justify the number of participants before data collection. It requires an effect size you can defend from prior literature or a pilot study, and a significance level fixed in advance (0.05 is the typical choice). Do not use it to justify a study that has already been run: power calculated after a non-significant result is not an adequate explanation of that result. If the comparison involves more than two means, a different power procedure is needed; the related pages on ANOVA and regression cover those cases. The formula assumes independent observations, approximately normal outcomes (or a sample large enough for the t-test to be reasonably robust to departures from normality), and equal population variances, because d is defined with the pooled standard deviation. If variances are expected to differ, d and n should be based on a Welch-type calculation. Paired designs need a different calculation, described in the FAQ.

Limitations and considerations

  • The required n is only as credible as the assumed d. Since n scales with 1/d², an optimistic d produces a sample that is too small for the effect that actually exists.
  • The formula describes a simple two-group comparison. It does not account for attrition, missing outcome data, or more complex designs, so the calculated n is a minimum for that simple case.
  • Post-hoc power computed from the observed effect size is circular and should not be used to interpret a non-significant result.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Makes the trade-off between effect size, α, power, and sample size explicit, so the assumed d and α are stated and can be questioned by reviewers.
  • Because the formula gives n directly from d, α, and β, the sample size can be recomputed across a range of plausible d values to show how sensitive the design is to effect-size uncertainty.
  • Provides a prospective, pre-data basis for n, which is what distinguishes it from post-hoc power.
  • Applies directly to the independent-samples case, where the formula and the definition of d are given explicitly on this page.

Applications

  • Determining participant recruitment targets before a randomised controlled trial or experimental psychology study.
  • Satisfying ethics board requirements for a pre-registered sample size justification.
  • Grant proposal writing: demonstrating that the proposed study is adequately powered to detect the claimed effect.
  • Sensitivity analysis: computing the smallest effect detectable with a fixed budget to check whether the study is worthwhile.

How it works

How it works

1

The procedure frames the problem as a decision between a null hypothesis of no mean difference (δ = 0) and an alternative that there is some non-zero difference. The formula assumes a two-sided test, with α split between the two tails through z_{α/2}. For a directional hypothesis, the one-sided critical value z_α replaces z_{α/2}. This gives a smaller n for the same α and power, but only if the direction is fixed before data collection. The researcher commits to a minimum meaningful effect size and a tolerable false-positive rate before computing the sample size.

Formula
H_0:\ \delta = 0 \quad H_1:\ \delta \neq 0 \quad (\delta = \mu_1 - \mu_2)
2

The formula gives the sample size from the critical values for α (the false-positive risk, through z_{α/2}) and for β (the false-negative risk, through z_β), divided by Cohen's d. Here d is the expected mean difference divided by the pooled standard deviation. Because n is proportional to 1/d² in this formula, a larger expected difference makes the effect easier to detect and reduces the required n. The formula as written uses z-values for α and β. It is a large-sample normal approximation. The exact calculation uses the non-central t distribution, which gives a somewhat larger n when the planned sample is small. For the final number, use a t-based power tool; the value from this formula can serve as a first estimate.

Formula
n = \left(\frac{z_{\alpha/2} + z_{\beta}}{d}\right)^2 \times 2 \qquad d = \frac{|\mu_1 - \mu_2|}{\sigma_p}
3

Power is 1 − β, the probability of rejecting the null hypothesis when the assumed difference is the true one. The conventional planning target is 0.80, meaning an 80% chance of detecting the assumed effect if it exists. Power reported after data collection does not replace this prospective calculation, which is what justifies the chosen sample size.

Formula
\text{Power} = 1 - \beta = P(\text{reject } H_0 \mid H_1 \text{ true}) \geq 0.80

Common pitfalls

  • Inflating the assumed d from small pilot studies or selectively chosen literature, which produces an underpowered main study. Because n varies with 1/d², a modest overestimate of d can lead to a substantially smaller n than the study needs.
  • Using post-hoc power after a non-significant result to argue that the test was adequately powered. The observed effect is a noisy estimate, and this reasoning is logically flawed.
  • Forgetting to inflate the calculated n for anticipated dropout or protocol deviations, so that the analysed sample falls below the planned size.
  • Treating 0.80 as a fixed rule. Higher-stakes decisions, such as clinical trials, are often planned at 0.90 or 0.95 power.

Frequently asked questions

What value of Cohen's d should I use?

Use the smallest effect you consider practically meaningful, derived from prior literature or a well-conducted pilot study. Cohen's conventional benchmarks (d = 0.2 small, 0.5 medium, 0.8 large) are starting points only; the most defensible approach is to justify the chosen d from domain knowledge.

Why is 0.80 the conventional power target?

0.80 is a widely used convention, often traced to Cohen's work, that balances sample cost against the risk of a false negative. It is not a law. High-stakes applications are often planned at 0.90 or 0.95.

Can I run power analysis after collecting data?

Post-hoc power computed from the observed effect size is closely tied to the observed p-value and therefore adds no independent information about the study. For interpreting a non-significant result, report a confidence interval for the effect and consider equivalence testing instead.

Does this apply to paired t-tests?

The formula on this page is written for two independent groups. For a paired design, n counts pairs and the standardised effect is based on the standard deviation of the within-pair differences, which requires a different calculation. Do not apply the independent-groups formula to paired data, and check that your planning tool uses the paired calculation when you select a paired design.

Related methods

Sources

  1. Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences (2nd ed.). Lawrence Erlbaum Associates.

    ISBN: 978-0805802832