For optimal use, please visit DATAtab on your desktop PC!

State Variable:
Test Variable:

How-to

ROC Curve Calculator

Load example data set

To create a ROC curve online, simply copy your data into the upper table and select a test and an state variable. Then you can specify the value of the state variable for which the ROC curve should be created.

Receiver Operating Characteristic Calculator

Then the ROC curve is displayed online and you can read the coordinates.

ROC Curve Calculator

Receiver Operating Characteristic curve

A Receiver Operating Characteristic (ROC) curve is a graphical representation of the performance of a binary classifier system as the discrimination threshold is varied. The ROC curve plots the true positive rate (sensitivity) against the false positive rate (1-specificity) at various threshold settings.

The ROC curve is a useful tool for evaluating the performance of a classifier because it is independent of the class distribution and provides a visual representation of the trade-off between the true positive rate and false positive rate.

The area under the ROC curve (AUC) is a commonly used performance measure for binary classification problems. The AUC ranges from 0 to 1, with a perfect classifier having an AUC of 1. A random classifier has an AUC of 0.5. The closer the AUC is to 1, the better the classifier is at distinguishing between the two classes.

Definitions

  1. True Positive Rate (TPR), also known as Sensitivity or Recall: It is the proportion of actual positives (true cases) that are correctly identified by the model. Mathematically, it's calculated as:
    TPR = True Positives / (True Positives + False Negatives)
  2. False Positive Rate (FPR): It is the proportion of actual negatives (false cases) that are incorrectly identified as positives by the model. Mathematically, it's defined as:
    FPR = False Positives / (False Positives + True Negatives)

The ROC curve is a plot with FPR on the X-axis and TPR on the Y-axis. An ideal model will have an ROC curve that hugs the top left corner, indicating high sensitivity and specificity. A model with no discrimination ability (i.e., it's as good as random guessing) will have an ROC curve that is a 45-degree diagonal line, commonly referred to as the "line of no-discrimination."

A common metric derived from the ROC curve is the Area Under the Curve (AUC). The AUC gives a metric value that represents the model's overall ability to discriminate between positive and negative classes:

  • AUC = 1: Perfect classifier
  • 0.5 < AUC < 1: Better than random guessing
  • AUC = 0.5: No discrimination ability (equivalent to random guessing)
  • AUC < 0.5: Worse than random guessing (though in practice, one can reverse the model's decisions to get a classifier with AUC > 0.5)

When is an ROC curve used?

In practice, the ROC curve is often used to select the optimal threshold for a binary classifier. For example, a classifier that prioritizes high true positive rates (high sensitivity) will have a threshold set closer to zero, while a classifier that prioritizes low false positive rates (high specificity) will have a threshold set closer to one.

In conclusion, the ROC curve is a powerful tool for evaluating the performance of binary classifiers. It provides a visual representation of the trade-off between true positive rate and false positive rate, and the AUC is a useful performance measure. Additionally, it is useful to select the optimal threshold for a binary classifier.

Cite DATAtab: DATAtab Team (2024). DATAtab: Online Statistics Calculator. DATAtab e.U. Graz, Austria. URL https://datatab.net

Contact & Support FAQ & About Us Privacy Policy Statistics Software