Type I and Type II Errors

Two overlapping distributions and one threshold between them. Every choice you make trades one error for the other.

Overview

Two curves, one line

The grey curve is the test statistic when the null is true. The orange curve is the same statistic when the effect is real. They overlap, and the overlap is the entire problem.

The dashed line is the threshold: above it you reject the null, below it you do not.

Type I error — the grey area to the right of the line. The null was true and you rejected it. A false positive.

Type II error — the orange area to the left. The effect was real and you missed it. A false negative.

Power is what is left of the orange curve: 1 - beta, the probability of catching a real effect.

Type I and Type II Errors

This module needs JavaScript: the numbers are computed in the page rather than recorded.

Worth knowing

Type I is a false positive: rejecting a null that was true. Its rate is α, and you choose it.
Type II is a false negative: failing to reject a null that was false. Its rate is β, and you mostly do not.
Power is 1 − β: the chance of detecting an effect that is really there.
Moving the threshold trades one for the other. Only more data, or a larger true effect, improves both.

Type I and Type II Errors

The two ways a test can be wrong, why you cannot minimise both, and what power actually buys.

The trade

Change alpha from 0.05 to 0.01. The threshold moves right, the grey tail shrinks — and the orange tail grows. Beta rises, power falls.

Move it the other way and the reverse happens.

You cannot reduce both by moving the line. That is not a limitation of the method; it is what "the distributions overlap" means. Any threshold is a statement about which error you would rather make.

What actually helps

Two things, and only two.

More data. Drag n upward. Both curves narrow, because their spread is the [standard error](sampling_distributions.html) and that falls like sqrt(n). The overlap shrinks, and both error rates can fall at once. This is the only lever that improves both without assuming anything.

A larger true effect. Drag the effect control. The curves separate. You do not usually control this, but it is why detecting a large effect needs so much less data than detecting a small one.

Choosing alpha honestly

The convention is 0.05, and treating it as fixed is the mistake. The right value depends on which error costs more.

A screening test for a treatable disease. A false negative means missing a case; a false positive means an unnecessary follow-up. Loosen alpha, gain power.

A criminal conviction. The system explicitly prefers false negatives, which is what "beyond reasonable doubt" encodes.

Particle physics. The five-sigma standard is alpha near 3 in 10 million, because the field has been burned by fluctuations and there is enough data to afford it.

A/B testing a button colour. A wrong call is cheap. Standard thresholds are generous, and the real risk is running many tests and picking winners.

Power, before the experiment

Power analysis is the calculation nobody enjoys and everybody should do: given a target power — usually 80% — an alpha, and the smallest effect worth detecting, how large a sample is required?

Set the effect to 0.2 and watch what n has to be before power reaches 80%. The required sample grows roughly with the inverse square of the effect size, which is why detecting small effects is so expensive and why so much published work is underpowered.

An underpowered study is worse than no study. It usually fails to find a real effect — and when it does find one, the estimate is inflated, because only an unusually large sample fluctuation could have crossed the threshold at that sample size. That is the winner's curse, and it is a substantial part of why published effects shrink on replication.

Where it goes wrong

Interpreting a non-significant result as no effect. Report the power, or the interval.

Running the power analysis afterwards. Post-hoc power computed from the observed effect is a restatement of the p-value and carries no new information.

Fixing alpha at 0.05 regardless of costs. It is a convention.

Peeking at results and stopping when significant. This inflates the true Type I rate far above the nominal one. Sequential testing methods exist and correct for it.

Check yourself

0 of 3

Answer without scrolling back up.

  1. You tighten alpha from 0.05 to 0.01. What happens to power?

  2. What improves both error rates at once?

  3. Why are effects from underpowered studies often inflated?

Cheat sheet

Type I and Type II Errors

The grey curve is the test statistic when the null is true. The orange curve is the same statistic when the effect is real. They overlap, and the overlap is the entire problem.

MATHS · vizlearn.in/maths/type_i_and_type_ii_errors.html

About the author

Ashish Jangra builds and maintains VizLearn. Every module here is written and the visualisation behind it hand-built, so the numbers in a readout come from the same code that draws the picture. Corrections are genuinely welcome and get priority over everything else — if a page states something wrong, or an animation misrepresents what the algorithm does, get in touch.