statistical-power
Statistical Power & Sample Size
Overview
Power analysis plans the probability of rejecting a specified null under an assumed alternative. It answers how many independent experimental units are needed to detect a scientifically important effect, or what effects a feasible sample could detect. Choose the inferential goal first: precision, equivalence, noninferiority, or sequential monitoring need their own calculations; the bundled superiority-test helpers do not cover them.
Four quantities are locked together for any given test: sample size (n), effect size, significance level (α), and power (1 − β). For a fixed design, analysis, and nuisance parameters, fixing three permits solving for the fourth when a solution exists. Every calculation in this skill is some rearrangement of that relationship.
This skill covers the two ways to do power analysis:
- Analytical power calculations (exact under some standard-test assumptions; asymptotic approximations for others) — see
references/closed_form_recipes.md. - Simulation / Monte Carlo (requires a credible data-generating process and a calibrated planned analysis) — see
references/simulation_based_power.md.
For choosing and converting effect sizes — usually the hardest part — see references/effect_sizes.md.