Statistics · easy

What is the difference between Type I and Type II error?

Asked in Data Scientist interviews, in the Statistics round.

Short answer

Type I is a false positive (rejecting a true null), Type II is a false negative (failing to reject a false null).

Type I errorType II error
The truthNo real effectThere is a real effect
Your conclusionThere is an effectNo effect
Also calledFalse positiveFalse negative
RateAlpha, the significance level you pickBeta. Power is 1 minus beta
What it costsYou ship a change that does nothingYou bin a change that worked
To reduce itLower alpha, correct for multiple testsMore sample, bigger effect, less noise
Which mistake you made depends on what was true and what you concluded.

How to answer it

Definition

Two ways to be wrong, and which one you made depends on what was true and what you concluded. The table above sets them side by side.

The tradeoff

They trade against each other at a fixed sample size. Lowering alpha to make false positives rarer moves the threshold further out, so real effects clear it less often and beta rises. The only way to reduce both at once is more information: a bigger sample, a larger effect, or less noise.

Example

alpha = 0.05      1 in 20 tests on a useless change will look like a winner
power = 0.80      so beta = 0.20: 1 in 5 real wins is missed

Run 100 A/B tests on changes that genuinely do nothing and about 5 come back significant. That is not a bug in the method; it is what alpha means.

Which error is worse

It depends entirely on the cost, and saying so is the answer:

Key points

FAQ

The 30-second answer

A Type I error is a false positive: I conclude there is an effect when there is not, and its rate is alpha, the significance level I choose. A Type II error is a false negative: there is a real effect and I miss it, at rate beta, and power is one minus beta.
The thing worth adding is that they trade against each other at a fixed sample size, so tightening alpha to avoid false positives means missing more real effects. The only way to improve both is more data, a bigger effect, or less noise.
Which one I would rather make depends on the cost. For a medical screen a false negative is far worse, so I would protect power. For an expensive irreversible launch I would protect alpha.

In the interview

Practice this for real