Course contentsShow
← Machine Learning and Deep Learning
Lesson 90 of 3,5381. Mathematical Foundations for Machine LearningFree lesson

Type I and Type II Errors

Understanding false positives, false negatives, and the power of statistical tests.

Type I and Type II Errors

You'll learn how to distinguish between two fundamental types of mistakes in statistical hypothesis testing and why they matter for model evaluation.

What Are These Errors?

When performing hypothesis testing (which you just learned about), you can make two kinds of mistakes:

Type I Error (False Positive): Rejecting the null hypothesis when it's actually true. You "see" an effect that doesn't exist.

Type II Error (False Negative): Failing to reject the null hypothesis when it's actually false. You "miss" a real effect.

An Intuitive Analogy

Think of a fire alarm:

  • Type I Error: The alarm goes off when there's no fire (false alarm)
  • Type II Error: The alarm doesn't go off when there IS a fire (missed detection)

The Trade-off

The probability of a Type I error is denoted α (alpha), often set at 0.05 or 5%. This is your significance level.

The probability of a Type II error is denoted β (beta). The power of a test equals (1 - β) — it's the probability of correctly rejecting a false null hypothesis.

You typically can't minimize both errors simultaneously. Reducing α (being more conservative) often increases β (missing real effects). It's a balance based on which mistake is costlier in your context.

Why This Matters in ML

In machine learning, these concepts map directly to model evaluation:

  • False Positive: Predicting "positive" class incorrectly
  • False Negative: Predicting "negative" class incorrectly

Understanding this trade-off helps you choose appropriate decision thresholds and evaluation metrics.

Key Takeaway: Type I errors are false alarms (rejecting truth), Type II errors are missed detections (accepting falsehood), and balancing them depends on the costs of each mistake in your specific problem.