Test
Effect to detect
Sample

Statistical power

Power is the probability that a test rejects the null hypothesis when a real effect of the size you specified exists. Its complement, β = 1 - power, is the probability of a Type II error — missing a real effect. The conventional target is a power of 0.8, meaning the study would miss such an effect one time in five.

Power is decided by four things, and fixing any three determines the fourth: the significance level (α), the effect size, the sample sizes, and the number of tails. This page holds the first three and reports the power; it also solves the other direction and reports the sample size needed to reach your target power.

How to use this calculator

  1. Choose the tails. A ratio above 1 implies a right-tailed test and a ratio below 1 a left-tailed one; the calculator corrects a mismatch for you and says so. Use two-tailed when you only want to know whether the variances differ at all.
  2. Set the variance ratio to detect. Either pick Small / Medium / Large, which fills in Cohen's conventional values for this test (1.02 / 1.15 / 1.35), or type the ratio yourself. A ratio below 1 is read as its reciprocal, because swapping the two groups describes the same design.
  3. Enter the two sample sizes. They do not have to be equal. n1 belongs to the variance in the numerator of the ratio.
  4. Press Calculate. Open More options to change the target power, the rounding, or whether the R code includes a simulation.

Reading the power analysis chart

The dashed curve is the distribution of the test statistic when H0 is true; the solid violet curve is its distribution when the variance ratio you specified is real. Under H1 the statistic divided by the ratio follows the same F distribution, so the alternative curve is the null curve stretched along the axis rather than a different family. The dashed vertical line(s) are the critical values. The four shaded areas are the four possible outcomes:

  • α — H0 is true but the statistic lands in the rejection region: a false positive.
  • 1 - α — H0 is true and correctly not rejected.
  • β — the ratio is real but the statistic lands in the acceptance region: a false negative.
  • Power — the ratio is real and the test detects it.

Stretching the two curves further apart — a larger ratio, or larger samples — moves area out of β and into power. The power curve below the chart plots exactly that, as n1 grows with n2 held in proportion.

Variance tests need a lot of data

Far more than tests about means, because a variance is estimated much less precisely than an average. A ratio of 1.15 — Cohen's "medium" for this test — needs samples in the hundreds before the power reaches 0.8. If that is impractical, the levers are to accept a lower power, raise α, or target a larger ratio.

Assumptions

  • The two samples are independent, and each is drawn from a normal population.
  • This test is not robust to non-normality, and unlike the t-test it does not improve with sample size: with heavy-tailed data its real error rate can be far from α, which no sample size repairs. If normality is doubtful, Levene's test is the safer choice.
  • The ratio you enter is the ratio you want to be able to detect — not one already observed in the data. Computing power from the observed effect ("post hoc power") adds no information beyond the p-value.

Related calculators