What is an ROC curve and AUC?
A receiver operating characteristic, or ROC, curve is drawn by sweeping the decision threshold and plotting the true positive rate against the false positive rate at each point. A model that separates the classes well bends the curve toward the top left. The area under the curve, AUC, reduces this to a single number between 0.5 for random guessing and 1.0 for perfect separation.
AUC has an intuitive reading: it is the probability that the model ranks a random positive example above a random negative one.
Key takeaways
- ROC plots true positive rate against false positive rate across thresholds.
- AUC is the area under that curve, from 0.5 (random) to 1.0 (perfect).
- AUC equals the chance a random positive outranks a random negative.
How it works
Predictions are sorted by score, and at each threshold the true positive and false positive rates are recorded to trace the curve. Integrating the curve yields AUC. Because both axes are rates rather than counts, ROC and AUC are insensitive to the overall class balance, which is both a strength and a weakness.
Why it matters
AUC is a convenient, threshold-free summary for comparing binary classifiers and is widely used across fields. Its blind spot is heavy class imbalance: because a large pool of true negatives keeps the false positive rate low, ROC can look strong even when precision is poor, which is why a precision-recall curve is often preferred for rare positives.
Frequently asked questions
What is a good AUC value?
0.5 is random and 1.0 is perfect. Values are task dependent, but higher means better ranking of positives above negatives.
When should you use a PR curve instead of ROC?
When the positive class is rare. ROC can overstate performance on imbalanced data, while a precision-recall curve stays sensitive to false positives.
Related terms