Lesson 4.8 · 7 min read · about 45 min to master at a very slow pace
Sensitivity and Specificity Trade-offs
Moving the threshold trades misses for false alarms. Why you can't raise sensitivity and specificity together with the same model, and how to reason about which to favour.
Two overlapping distributions
A classifier gives each case a score (for logistic regression, ). Positives tend to score higher than negatives, but the two distributions overlap. Wherever you put the threshold, some negatives land above it (false positives) and some positives below it (false negatives).
Which way does each move?
| Threshold | Flag | Sensitivity | Specificity | FN | FP |
|---|---|---|---|---|---|
| Lower (e.g. 0.5 → 0.2) | More cases | ↑ | ↓ | ↓ | ↑ |
| Raise (e.g. 0.5 → 0.8) | Fewer cases | ↓ | ↑ | ↑ | ↓ |
At the extremes: threshold 0 flags everyone (sensitivity 1, specificity 0); threshold 1 flags no one (sensitivity 0, specificity 1). Neither is useful.
Only a better model moves both
With a fixed model, the threshold just slides along a trade-off. To improve sensitivity and specificity together you need a model whose score distributions overlap less: better features, more data, a better method. That's what the ROC curve and AUC measure (4.10).
Precision and recall trade off too
Lowering the threshold usually raises recall (sensitivity) and lowers precision, since you flag more marginal cases. Precision–recall is the more informative pair when positives are rare and true negatives are plentiful and uninteresting.
How it's asked
"A team lowers the threshold until sensitivity is 100%, then boasts about it. What's the catch?" Flagging nearly everyone achieves perfect sensitivity at the cost of a huge number of false positives (specificity and precision collapse). Report both sides of the trade-off.
Cheatsheet
Threshold effects
Check your understanding
Score 75% or more to master this lesson and earn XP. Answer first, then check.