Notes

Type II Error

When a model makes a mistake, it’s not just “wrong” in a generic way—the kind of wrong can have very different consequences. A Type II error is the mistake where you miss something that really is there.

What it means in supervised classification

A Type II error happens when the true label is positive, but the model predicts negative. In the language of a confusion matrix, it’s a false negative. Statisticians also call it “failing to reject a false null hypothesis,” but in machine learning practice it’s easier to think: the model said “no” when the correct answer was “yes.” The probability of a Type II error is traditionally written as β, and power is 1 − β (how good you are at catching real positives).

Concrete examples

  • Disease screening: a patient has the disease (positive) but the model predicts healthy (negative).
  • Fraud detection: a fraudulent transaction is labeled legitimate.
  • Spam filtering: a spam email lands in the inbox (spam is “positive,” but predicted “not spam”).
  • Churn prediction: a customer who will churn is predicted to stay, so no retention action is taken.

Why it matters and what controls it

Type II errors are tightly linked to the decision threshold and the trade-off with Type I error (false positives). If you raise the threshold for predicting “positive,” you usually reduce false positives but increase false negatives—more Type II errors. That’s why teams choose metrics and thresholds based on cost: in medical or fraud settings, missing positives can be far more expensive than extra false alarms. In scikit-learn, you commonly tune this using predicted probabilities from a classifier (e.g., LogisticRegression) and inspect the confusion matrix at different thresholds.

A Type II Error is failing to reject a false null hypothesis; in supervised classification it corresponds to predicting the negative class when the true label is positive (a false negative). It matters because it quantifies missed detections and directly affects metrics such as recall/sensitivity and the operating point chosen via thresholds, shaping risk in applications like fraud, defect, or disease screening.

Imagine a smoke alarm that stays silent even though there’s a real fire. That’s the kind of mistake a Type II Error describes: saying “nothing is wrong” when something actually is wrong.

In supervised learning, this shows up when a model misses a real positive case. For example, a medical test model predicts “healthy” for someone who truly has the disease, or a fraud detector labels a fraudulent transaction as “legit.” People also call this a “miss” or a “false negative.” It matters because these errors can feel reassuring in the moment, but they can be costly or dangerous later.