Type I and Type II Errors
๐ Type I and Type II Errors
๐ง Overview
In classification (and hypothesis testing), errors are broadly categorized into:
- Type I Error (False Positive)
- Type II Error (False Negative)
These errors help us understand different kinds of mistakes made by a model.
๐ด 1. Type I Error (False Positive)
๐น Definition
A Type I error occurs when:
The model predicts a positive class, but the actual class is negative.
๐ In Terms of Confusion Matrix
- Type I Error = False Positive (FP)
๐ Formula (False Positive Rate)
๐ฏ Impact
- Affects Precision
- High FP → lower precision
๐ต 2. Type II Error (False Negative)
๐น Definition
A Type II error occurs when:
The model predicts a negative class, but the actual class is positive.
๐ In Terms of Confusion Matrix
- Type II Error = False Negative (FN)
๐ Formula (False Negative Rate)
๐ฏ Impact
- Affects Recall (Sensitivity)
- High FN → lower recall
⚖️ Summary Comparison
| Error Type | Also Called | Condition | Affects |
|---|---|---|---|
| Type I | False Positive | Predict +, Actual – | Precision |
| Type II | False Negative | Predict –, Actual + | Recall |
๐งช Example: Medical Diagnosis
๐ฅ Scenario
A diagnostic test is used to detect a disease.
๐ด Type I Error (False Positive)
- Test predicts disease present
- Patient is actually healthy
๐ Leads to:
- Unnecessary stress
- Additional tests/treatment
๐ต Type II Error (False Negative)
- Test predicts no disease
- Patient actually has the disease
๐ Leads to:
- Missed diagnosis
- Potentially serious consequences
๐ฏ Key Insight
There is often a trade-off between Type I and Type II errors.
- Reducing one may increase the other
- Choice depends on application context
๐ Final Takeaways
- Type I Error → False alarm
- Type II Error → Missed detection
- Both are critical for evaluating model performance
- Must be minimized based on real-world cost of errors
Comments
Post a Comment