Standard 4 stops to get here

Type I and Type II Errors

The two ways a yes-or-no decision can be wrong: a Type I error is a false alarm (false positive), a Type II error is a miss (false negative).

Your route here

4 stops · basics first
  1. Machine Learning ✓ understood

    Building systems that learn patterns from data instead of following hand-written rules, getting better at a task as they see more examples.

  2. Supervised Learning ✓ understood

    Learning from examples paired with the correct answer, so a model can predict answers for new inputs it hasn't seen.

  3. Classification ✓ understood

    A supervised learning task where the model assigns each input to one of a fixed set of categories, such as spam or not spam.

  4. Confusion Matrix ✓ understood

    A table showing true positives, true negatives, false positives, and false negatives for classification evaluation.

  5. Type I and Type II Errors · you are here ✓ understood

Picture it

Type I error

  • Rejecting a null hypothesis that is true
  • A false alarm: a false positive
  • Its rate is α, the significance level

Type II error

  • Missing a real effect
  • A miss: a false negative
  • Its rate is β; power is 1 − β
Notice you choose α up front, but β depends on how large the real effect is: small effects are easy to miss.

Type I and Type II errors are the statistician’s names for the two ways a yes-or-no decision goes wrong. The terms come from hypothesis testing, where you start from a null hypothesis, the default claim that nothing interesting is happening, and ask whether the data give enough reason to reject it.

  • A Type I error rejects the null when it is actually true: you declare an effect that isn’t there. In classification terms, a false positive.
  • A Type II error fails to reject the null when it is actually false: you miss an effect that is there. A false negative.

The two knobs

The risk of a Type I error, written α, is chosen in advance as the significance level of the test; 5% is a common choice. The risk of a Type II error, written β, is not chosen directly. As the NIST handbook puts it, it depends on the size of the real discrepancy: large effects are easy to detect, small ones are easy to miss. It also rises as α is made stricter, so the two risks pull against each other. Power, 1 − β, is the chance of catching an effect that really exists, and it rises with sample size. In an A/B test, too few users means low power: a real improvement can come back “not significant”.

In machine learning

A classifier makes the same trade every time you set its decision threshold. Lowering the bar for “positive” catches more real cases, cutting Type II errors and raising recall, at the price of more false alarms, which lowers precision. A confusion matrix counts both kinds of mistake side by side.

Which error is worse depends on the stakes. Missing a tumour usually costs more than a second look at a healthy scan, while a spam filter that bins a real invoice may be worse than one that lets some spam through. That judgment belongs to the people deploying the model, not to the metric.

Where it sits

Before this

Confusion Matrix
Type I and Type II Errors

Leads to

Nothing yet: a destination in its own right.

Explore nearby

Sources

  1. NIST/SEMATECH e-Handbook of Statistical Methods, "What are statistical tests?" . Section 7.1.3: significance levels and errors of the second kind