The two rates the curve is made of
- : the true positive rate, which is recall: the fraction of real positives caught.
- : the false positive rate: the fraction of real negatives wrongly flagged.
Sweep the threshold from high to low, plot against at every value, and that path is the ROC curve.
The area underneath it is the AUC, a single number between 0 and 1.
What the number actually means
The area has an exact probabilistic reading, and it is far more useful than "area under a curve".
- : the model's score on a randomly chosen positive example.
- : its score on a randomly chosen negative one.
AUC is the probability that the model ranks a random positive above a random negative.
So 0.5 is a coin toss, 1.0 is a perfect ranking, and 0.5 is the floor rather than 0: a model scoring 0.2 is a good model with its sign flipped.
Threshold-free, which is the point and the limitation
Because it integrates over every threshold, AUC measures the quality of the ranking rather than of any particular decision.
That makes it the right metric when you have not chosen an operating point yet, and the wrong one when you have.
It also says nothing about calibration: a model can rank perfectly and still output probabilities that are all wrong.
Where it misleads
has in its denominator, and under heavy imbalance is enormous.
With 1000 negatives, going from 10 false positives to 50 moves from 0.01 to 0.05, which is barely visible on the plot.
But precision may have collapsed from 0.5 to 0.17 over the same move, because precision divides by the false positives directly.
That is why PR-AUC is the honest curve when positives are rare, and ROC-AUC flatters models on imbalanced data.