Post-Hoc Power Calculators

These calculators answer "Did my study have enough power?" -- given a sample size already collected and an observed (or assumed) effect, they compute achieved statistical power.

Post-hoc power is computed after data collection to help interpret a completed study, particularly a non-significant result. It is not a substitute for a-priori sample-size planning.

Common conventions: z_alpha is the standard-normal quantile at 1 - alpha/2; alpha defaults to two-sided 0.05. Power reported on 0-1 scale and as percentage.


Power for Two Proportions

Achieved power to detect a difference between two independent proportions.

Inputs: proportion 1, proportion 2, sample sizes, alpha.

Method:

h = 2 * |arcsin(sqrt(p1)) - arcsin(sqrt(p2))|    (Cohen's h)
NCP = |p1 - p2| / sqrt(pooled variance term)
power = 1 - Phi(z_alpha - NCP)

Power for Two Means

Achieved power to detect a difference between two independent means.

Inputs: mean 1, mean 2, SD 1, SD 2, sample sizes n1 and n2, alpha.

Method:

pooled SD = sqrt((SD1^2 + SD2^2) / 2)
Cohen's d = |mean1 - mean2| / pooled SD
NCP = d * sqrt(n1*n2 / (n1 + n2))
power = 1 - Phi(z_alpha - NCP)

The sqrt(n1*n2/(n1+n2)) term is the effective sample-size factor, maximised under equal allocation.

Effect-size interpretation (Cohen's d): Very small < 0.2; Small 0.2-0.5; Medium 0.5-0.8; Large >= 0.8.


Power for Paired Means

Achieved power for a paired/repeated-measures comparison.

Inputs: mean 1, mean 2, SD 1, SD 2, correlation between paired measurements, sample size, alpha.

Method:

SD_diff = sqrt(SD1^2 + SD2^2 - 2*correlation*SD1*SD2)

Effect and noncentrality formed from mean difference relative to SD_diff. Higher correlation reduces SD_diff and raises power.


Power for Correlation Coefficient

Achieved power to detect a single Pearson correlation against zero.

Inputs: correlation r, sample size n, alpha.

Method (Fisher z-transformation):

Fisher's z = 0.5 * ln((1+r)/(1-r))
SE = 1 / sqrt(n - 3)
z_beta = |Fisher's z| / SE - z_alpha
power = Phi(z_beta)

Power for Chi-Square Test

Achieved power for a chi-square test (goodness-of-fit or contingency).

Inputs: effect size (w) or data to derive it, degrees of freedom, sample size, alpha.

Method (noncentral chi-square):

critical value = chi2_quantile(1 - alpha, df)
NCP = derived from effect size w and sample size
power = 1 - noncentral_chi2_CDF(critical value, df, NCP)

Exact noncentral-chi-square approach -- more accurate than normal approximation.


Power for ANOVA (One-Way)

Achieved power for a one-way ANOVA.

Inputs: F-value (or group means/SDs to derive it), df between and within, alpha.

Method (noncentral F):

eta2 = (df_between * F) / (df_between * F + df_within)
Cohen's f = sqrt(eta2 / (1 - eta2))
critical F = F_quantile(1 - alpha, df_between, df_within)
power = 1 - noncentral_F_CDF(critical F, df_between, df_within, NCP)

Reports eta-squared and Cohen's f as effect sizes.


Power for Odds Ratio

Achieved power to detect an odds ratio.

Inputs: odds ratio and its 95% CI (lower and upper bounds), alpha.

Method (CI-derived standard error, log scale):

SE = (log(upper CI) - log(lower CI)) / (2 * z_alpha)
z_beta = |log(OR)| / SE - z_alpha
power = Phi(z_beta)

Derives standard error from the confidence interval rather than raw cell counts -- convenient when you have a published OR with CI but not the underlying 2x2 table.


Power for Relative Risk

Achieved power to detect a relative risk -- structurally identical to OR calculator, on log-RR scale.

Inputs: relative risk and its 95% CI, alpha.

Method:

SE = (log(upper CI) - log(lower CI)) / (2 * z_alpha)
z_beta = |log(RR)| / SE - z_alpha
power = Phi(z_beta)

Power interpretation scale

Achieved power Interpretation
< 0.5 Very low -- insufficient; results should be interpreted with caution
0.5 - 0.8 Low/moderate -- suboptimal; considerable Type II error risk
>= 0.8 Good/adequate -- reasonable confidence in detecting the effect

Interpreting a non-significant result: Low post-hoc power means the study may have missed a real effect (Type II error). High post-hoc power on a non-significant result is stronger evidence that any true effect is small.


Common output

Every post-hoc calculator produces: achieved power (0-1 and percentage), effect size with interpretation, adequacy interpretation, practical recommendations (e.g. increase sample size if power < 80%), interactive power curve, and Methods Section paragraph.