ML & Deep Learning Foundations·Question 17 of 55Intermediate

ROC-AUC vs PR-AUC - what does each measure, and why does ROC-AUC look deceptively good on imbalanced data?

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

ROC-AUC plots true-positive rate (recall) against false-positive rate across all thresholds; its area equals the probability that a randomly chosen positive is scored above a randomly chosen negative - a pure ranking metric. Baseline is 0.5 regardless of class balance. PR-AUC plots precision against recall; its baseline is the positive prevalence.

Full worked answer

ROC-AUC plots true-positive rate (recall) against false-positive rate across all thresholds; its area equals the probability that a randomly chosen positive is scored above a randomly chosen negative - a pure ranking metric. Baseline is 0.5 regardless of class balance. PR-AUC plots precision against recall; its baseline is the positive prevalence.

The deception: FPR = FP/(FP+TN) is normalized by the negative count. With 1M negatives and 1k positives, a model producing 10,000 false positives has FPR = 1% - the ROC curve looks superb - but at a threshold that recovers most positives, precision might be ~9% (1k true vs 10k false alarms). ROC-AUC can read 0.98 while the precision an operator experiences is single digits. PR-AUC exposes this because precision has FP in the denominator directly, undiluted by the mass of easy negatives.

Rules of thumb:

  • Balanced classes, or you genuinely care how well you rank negatives too → ROC-AUC is fine and has nicer statistical properties (prevalence-invariant, so comparable across datasets).
  • Rare positive class where the product experience is "how many alerts are real" → PR-AUC, or better, precision@k / recall at a fixed FPR matched to the ops team's review budget.

Going further: follow-up territory

Two caveats that signal depth: PR-AUC depends on prevalence, so you can't compare it across datasets with different base rates; and average precision (the standard PR-AUC estimator) is preferred over trapezoidal interpolation, which is biased optimistic for PR curves. Neither metric says anything about calibration - both are invariant to any monotonic rescaling of scores.

What a good answer covers

  • ROC-AUC plots true-positive rate (recall) against false-positive rate across all thresholds; its area…
  • Baseline is 0.5 regardless of class balance
  • PR-AUC plots precision against recall; its baseline is the positive prevalence
  • The deception: FPR = FP/(FP+TN) is normalized by the negative count
  • With 1M negatives and 1k positives, a model producing 10,000 false positives has FPR = 1% - the ROC…

Key terms: ROC-AUC · PR-AUC · precision@k

Interviewer follow-ups to expect

  1. Why is linear interpolation between PR points invalid?

  2. Your ROC-AUC improved but PR-AUC dropped - what happened?

  3. How do you choose the final operating threshold for production?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep