Explain ROC-AUC vs PR-AUC tradeoffs
Company: Databricks
Role: Data Scientist
Category: Machine Learning
Difficulty: hard
Interview Round: Technical Screen
##### Question
You trained a binary classifier that outputs predicted probabilities. Compare **ROC-AUC** and **PR-AUC** (the latter usually reported as Average Precision, the area under the Precision–Recall curve).
1. **What each curve plots.** State what the ROC and PR curves put on each axis, the key formulas (TPR/FPR for ROC, Precision/Recall for PR), and the intuition behind each AUC.
2. **Class imbalance and baselines.** Explain how class imbalance (a low positive base rate) affects each metric, and what the “no-skill” baseline is for each.
3. **When the two disagree.** When can ROC-AUC look “good” while PR-AUC looks “poor” (or vice versa)? Illustrate with a concrete example.
4. **Practical tradeoffs.** When would you prefer ROC-AUC vs PR-AUC for model evaluation/selection?
5. **Limited-review scenario.** If your business goal is to catch as many positives as possible while reviewing only a limited number of cases (e.g., fraud investigation), which metric/curve would you emphasize and why?
6. **Pitfalls and edge cases.** Name at least two practical pitfalls (e.g., calibration vs ranking, operating-threshold selection, prevalence shift between train and production, and how AUC relates to ranking).
Quick Answer: Compares ROC-AUC and PR-AUC for binary classification: what each curve plots and its formulas, how class imbalance shifts the baseline (0.5 for ROC vs the positive rate for PR), when ROC can look strong while precision collapses, and which metric to emphasize for capacity-constrained reviews like fraud investigation. Includes a worked imbalanced example and the key pitfalls around calibration, thresholds, and prevalence shift.