Statistical power simulator

Explore how sample size, effect size, variability, and significance level determine a study's power — the probability of detecting a real effect.

The blue curve is the distribution of the test statistic when there is no effect (H0). The green curve is its distribution when the treatment effect is δ. Green area = power (correct detection). Red area = type I error (false positive). Yellow area = type II error (missed effect). Move the sliders and watch what happens.
H₀H₁+1.96−1.96-4-20246810Test statistic (z)
32.3%
Underpowered
λ = (δ / σ) · √(n / 2) = (0.30 / 1.00) · √(50 / 2) = 1.50
32.3%
Power
5.0%
Type I error (α)
67.7%
Type II error (β)
0.200
Standard error
Parameters
0 (no effect)3
0.3 (low noise)5 (high noise)
50500
0.01 (strict)0.10 (lenient)
Challenges
Try
Reach 80% power. Start from the "Underpowered" preset. Increase n until the reading turns green.
Try
The cost of precision. Click "Well-powered," then lower α to 0.01. What happens to power?
Try
The null trick. Set δ to zero. What does the power reading show? Why?
Try
Beat the odds. Can you reach 80% power with n = 50? (Adjust the other levers.)
The formula

In a two-sample z-test comparing n observations per group, the test statistic is z = (XTXC) / (σ√(2/n)).

Under H0 (no effect), z is centered at zero. Under the alternative (true effect δ), the distribution shifts by λ = (δ/σ)√(n/2).

This is the normal approximation to the corresponding two-sample t-test. With at least 50 observations per group, it is an acceptable simplification for illustrating statistical power.

Power is the green area: the probability that the shifted distribution lands beyond the critical value. The larger λ, the less the two curves overlap, and the more likely the test detects the effect.

← Return to max.pm