A Priori Power Analysis#
Computing the sample size required before a study for a target power and effect size.
Important
✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.
What it is#
A-priori power analysis computes the sample size \(n\) needed before collecting data, from four inputs: the significance level \(\alpha\) (Type I risk), the desired power \(1 - \beta\) (chance of detecting a true effect), the expected effect size \(\delta\), and the data variance. The aim: a study large enough to detect a meaningful effect but no larger.
Why it matters#
It guards against underpowered studies (false negatives — missing real effects) and overpowered ones (wasted resources chasing trivial effects), and forces you to commit to a minimum meaningful effect size in advance rather than rationalising after the fact.
The sample-size formula#
For a two-sample mean test,
where \(Z_{1-\alpha/2}\) is the critical value for \(\alpha\) (1.96 at
\(\alpha = 0.05\), two-tailed), \(Z_{1-\beta}\) the value for the target power
(0.84 for 80%), and \(\delta = (\mu_1 - \mu_2)/\sigma\) the standardised effect size
(Cohen’s d). In practice tools like G*Power, R or statsmodels do the arithmetic.
Example#
To detect a conversion lift from 10% to 11% at \(\alpha = 0.05\) and 80% power with an effect of 0.01, the analysis returns about 7,850 users per group — testing only 1,000 per arm would be badly underpowered.
The power-analysis family#
A-priori (before) sets the sample size; post-hoc (after) estimates achieved power and is controversial; sensitivity asks, for a given \(n\), \(\alpha\) and power, the smallest detectable effect. The everyday convention is \(\alpha = 0.05\), power = 0.80.
Theme: Statistical Inference & Power · All terminology
Hint
Mind map — connected ideas
Post Hoc Power Analysis · Compromise Power Analysis · Statistical Power · Effect Size (δ) · Type I Error · Fixed-Horizon Testing
Hint
More in Statistical Inference & Power
Chi-square (χ²) Test · Clopper–Pearson Interval · Compromise Power Analysis · Confidence Intervals (CIs) · Effect Size (δ) · Hypothesis Testing · Kolmogorov–Smirnov (KS) Test · Minimum Detectable Lift (MDL) · P-Value (probability value) · Post Hoc Power Analysis · Power (1 – β) · Power Analysis · Sample size · Significance Level (α)
See also
Source article Adapted (context, re-expressed) in our own words from: A Priori Power Analysis (insightful-data-lab.com).