When would you prefer PR-AUC over ROC-AUC?
ML systems and evaluation, Metrics
Level L2 Elementary. Length Medium. Nature Th Theoretical.
What's being asked
Whether you understand how class imbalance affects each metric, and can choose a metric for the real problem.
Key idea
ROC-AUC is the area under the ROC curve, and PR-AUC is the area under the precision–recall curve. ROC uses the false positive rate , where , and count true positives, false positives and true negatives. This rate barely moves when negatives are plentiful. Precision, , reacts directly to false positives. So when positives are rare and you care about the positive class, PR-AUC is more informative.
Steps
- Define TPR (true positive rate, also called recall), FPR (false positive rate) and precision.
- Explain that ROC-AUC is the probability that a random positive is ranked above a random negative.
- Show it with numbers: with 1% positives, an FPR of 1% can mean as many false positives as true positives, yet the ROC curve still looks excellent.
- Note that the baseline PR-AUC, from random guessing, is the positive rate, not 0.5.
- Conclude: use PR-AUC for rare-event detection (fraud, retrieval). Use ROC-AUC when both classes matter, or when you want a measure that ignores the class ratio.
Common mistakes
- Saying ROC-AUC is “wrong” under imbalance. It is invariant to the class ratio, which is sometimes exactly what you want.
- Comparing PR-AUC values across datasets with different positive rates.
- Forgetting that both are threshold-free. You still have to choose an operating point (the threshold used in practice).
How long your answer should be
2–3 minutes, ideally with one worked number.
Last checked on 4 December 2026.
Read this
Previous in ML systems and evaluation: What is the difference between interpretability and explainability in machine learning, and what risks arise when relying on post-hoc explanations?
Next in ML systems and evaluation: What is the difference between covariate (data) drift and concept drift, what is an example of each, and how would you detect each in production?