ROC Curve
Variant: Standard
Made-up data, for demonstration only
Variants
4 types · click one to see it in the frame above- Difference from standard
- The recommended type; use it as a starting point
- Use when
- Evaluate a classification model at different thresholds
ROC Curve is a chart that plots the true positive rate (TPR) against the false positive rate (FPR) as the decision threshold changes. This example shows made-up curves for 2 fraud-detection models, shaped to have an AUC of about 0.91 and 0.78. They were not computed from real prediction scores.
How to read a ROC Curve
- The vertical axis is the true positive rate and the horizontal axis is the false positive rate. TPR is also called sensitivity, and FPR equals 1 minus specificity.
- The diagonal line is random guessing. Random guessing lands on the diagonal from bottom left to top right.
- The closer the curve bows to the top-left corner, the better. The point (0, 1) is perfect classification.
- Compare the two models. The new model's curve (AUC 0.91) sits above the old model's (AUC 0.78) at every level of false positive rate.
- AUC is the area under the curve. It equals the probability that the model scores a randomly chosen positive item higher than a randomly chosen negative item.
- A point on the curve is a pair of TPR and FPR values. Try the "Decision point" variant to see an example pair of 2 rates. This made-up picture has no underlying scores, so it cannot give the real threshold.
When to use it
- You compare two-class classifiers without tying them to a single threshold. You see the results at every threshold at once.
- You choose a decision point between catching true cases and false alarms, such as in fraud detection.
- You check a model before real use.
When not to use it
- The data is very imbalanced (very few positives). Research has criticised the use of ROC and AUC in some cases. Use a precision–recall curve alongside.
- You need the real numbers for a single decision. Use a Confusion Matrix.
- Readers are not used to statistics. Explain TPR and FPR first.
- The problem has more than two classes. You need to summarise by class.
Common mistakes
1. Reading a high AUC as always a good model
The parts of the area where sensitivity and specificity are low may not matter in real use. AUC may not reflect what you need from the data.
2. Choosing a decision point without thinking about the cost of errors
False alarms and misses cost different amounts. Choose the point by the real costs.
3. Comparing AUC across different datasets
Compare on the same test set.
4. Leaving out the diagonal
The reference line helps readers see how much better than random guessing the model is.
5. Plotting from the data the model was trained on
The result will look better than it is. Use data the model has never seen.
Compared with similar charts
| Chart | How it differs | Choose it when |
|---|---|---|
| ROC Curve | TPR against FPR at every threshold | You compare models across thresholds |
| Confusion Matrix | A table of results at one threshold | You need the numbers of a single decision |
| Lift Chart | The result of targeting groups ranked by score | Marketing campaigns |
| Scatter Plot | A general relationship | It is not a model evaluation |
History and development
The name Receiver Operating Characteristic comes from work analysing signal detection systems, before it was used to evaluate classifiers and diagnostic tests.
Frequently asked questions
What does ROC stand for?
Receiver Operating Characteristic. It comes from work analysing signal detection systems.
What do AUC 0.5 and 1.0 mean?
0.5 is the same as random guessing, and 1.0 is perfect classification (the point (0,1)).
How is ROC different from precision–recall?
ROC uses the false positive rate against all negatives, which can look too good when negatives greatly outnumber positives.
References
- Receiver operating characteristic · Wikipedia · en.wikipedia.orgUsed to confirm: the definition and basic facts of the receiver operating characteristic
- Confusion matrix · Wikipedia · en.wikipedia.orgUsed to confirm: the definition and basic facts of the confusion matrix
- roc_curve documentation · scikit-learn · scikit-learn.orgUsed to confirm: predicted scores, true labels, decision thresholds and TPR/FPR values
- Precision-Recall example · scikit-learn · scikit-learn.orgUsed to confirm: the limits when classes are very imbalanced
- An Introduction to ROC Analysis · Tom Fawcett · doi.orgUsed to confirm: the meaning of ROC and AUC, and the history of its use in signal detection work
Last updated 28 Nov 2026
In the same group
- KPI Card / Big Number
- Gauge / Speedometer
- Progress Bar
- Pareto Chart
- Control Chart
- Run Chart
- Candlestick / OHLC
- Depth / Order Book Chart
- Confusion Matrix
- Cumulative Gains Chart
- Forest Plot
- Volcano Plot
- Ternary Plot
- Contour / Surface Plot
- 3D Scatter Plot
- Table + Conditional Formatting
- Burndown Chart
- Kaplan–Meier
- Bland–Altman Plot
- Pivot Table / Matrix
- KPI Tree / Driver Tree
- Radial Bar / Progress Ring
- Table with Sparklines
- RAG Scorecard
- Data Table