🧮  A Priori Power Analysis

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,

\[n = \left(\frac{Z_{1-\alpha/2} + Z_{1-\beta}}{\delta}\right)^2,\]

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



See also

Source article Adapted (context, re-expressed) in our own words from: A Priori Power Analysis (insightful-data-lab.com).

Tags: purpose: reference topic: terminology level: beginner