Meaning and conditions
For binary explicitly labeled classes and a specified score direction, empirical unweighted AUC averages all positive-negative pair credits, with half credit for ties. Both classes must be present. The bounded calculator uses exactly three observations in each class and estimates neither a model nor its uncertainty.[1][2]
Sensitivity and specificity describe individual thresholds. Predictive values add the target class frequency; logistic regression can supply scores whose ranking separation is then checked on separate data.[1][2]
Derivation and relations
A ROC area can be understood as average pair credit, making direction, ties and empirical nodes checkable without assuming a smooth model.[1][2]
- Specify the positive class and score direction before evaluation. Sort scores in descending order; initially nobody is classified positive, so FPR=TPR=0.
- Lower the threshold through observed scores. A positive observation increases TPR by 1/n+; a negative one increases FPR by 1/n−. Process tied scores as a group.
- Sum trapezoidal areas between ROC nodes. Equivalently compare every positive-negative pair: a higher positive score earns 1, a tie½ and a lower score 0.
- Divide the pair-credit sum by n+n−. Check direction: AUC measures ranking separation across thresholds, not accuracy or the probability of an individual positive result.
See the model
A genuine empirical ROC staircase
Free with a Quanta account. Your download stays ready after registration.
Two complete worked examples
Walk through six scores
- Given
- Fictional positive scores 0.9,0.7,0.4 and negative scores 0.8,0.3,0.1; higher favors positive.
- Find
- Check empirical AUC using pairs and area.
Score 0.9 beats all three negatives;0.7 and 0.4 each beat 0.3 and 0.1.
Divide by nine pairs.
The three horizontal segments lie at TPR1/3,1 and 1, each with width 1/3.
Result: AUC≈0.7778. Seven of nine positive-negative pairs are correctly ranked.
Check: Pair counting matches the actual staircase area. This is an original teaching calculation, not clinical performance evidence.
Tied scores without arbitrary ordering
- Given
- Positive scores[1,1,2], negative scores[1,0,2], three observations each.
- Find
- Count ties fairly and determine AUC.
Each positive score 1 beats 0, ties 1 and loses to 2:1.5 credits each.
Score 2 beats 0 and 1 and ties 2:2.5 credits.
All credits total 5.5 out of 9.
Result: AUC=11/18≈0.6111; arbitrary tie ordering must not alter the answer.
Check: Lowering a shared threshold through tied positive and negative scores can create a diagonal node transition. Its trapezoidal area equals half-credit tie handling.
Recall the method later with the formula’s flashcards.
10 flashcards · English materials
Already have an account? Sign in for flashcardsAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Units, interpretation and limits
FPR, TPR and AUC are dimensionless. Scores need not be probabilities; every shared strictly increasing transformation preserves pair comparisons. Class ordering must not change unnoticed.[1][2]
The empirical area describes the available scores. Generalization needs appropriate independent validation; evaluating training data or repeated observations from one person can change its interpretation.[1][2]
Five exercises with distinct learning goals
Calculate · Foundation
Positive[3,4,5], negative[0,1,2], higher=positive. Calculate empirical AUC.
Show hint
All three positive scores exceed every negative score.
Learning goal: Count pairwise rankings
Show solution and calculation
There are nine wins and no ties: AUC=9/9=1.
This is perfect ranking in these six observations, not a guarantee for new data.
Rearrange · Application
For 3 positive and 3 negative scores, T=2 ties and AUC=7/9 are known. Find W.
Show hint
Rearrange AUC=(W+T/2)/9.
Learning goal: Reconstruct wins from AUC
Show solution and calculation
W=9·AUC−T/2=7−1=6.
Of nine pairs, six are wins, two ties and one a loss.
These integer counts sum to nine.
Interpret · Application
Double every score and add 100. Does AUC change, and what does this imply about probabilities?
Show hint
A strictly increasing transform preserves every pair order.
Learning goal: Separate AUC and calibration
Show solution and calculation
AUC is unchanged because wins and ties are unchanged.
The transformed scores are not probabilities.
AUC evaluates discrimination and cannot by itself establish calibration or meaningful absolute risk values.
Error analysis · Application
All six scores equal 1. Someone sorts positive cases first and reports AUC=1. Correct this.
Show hint
Every one of nine pairs is tied.
Learning goal: Avoid tie-order bias
Show solution and calculation
W=0, T=9, so AUC=(0+9/2)/9=0.5.
Ordering observations within tied scores contains no information and must not create artificial discrimination.
Here empirical ROC connects(0,0) to(1,1).
Transfer · Challenge
Positive[0,1,2], negative[3,4,5], higher=positive: find AUC and explain reversing direction.
Show hint
Count losses; reversing score signs turns losses into wins.
Learning goal: Check score direction
Show solution and calculation
All nine pairs lose, so AUC=0.
If lower scores were scientifically prespecified to indicate positivity, the properly oriented AUC would be 1.
Do not change direction afterward to improve reporting; class labeling and the hypothesis are part of the definition.
Check your understanding with the formula’s reference test.
8 test questions · English materials
Already have an account? Sign in for the testAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Sources for this explanation
Quanta · Updated November 9, 2026
Editorial responsibility: Quanta Study editorial team
Review scope
This explanation, 2 worked examples and 5 exercises are available in German and English. Structure, source references and mathematical notation undergo automated checks. Calculations, model assumptions and both language versions receive a separate AI review.
An independent, named human subject review has not yet been documented. Our exercise numbers are worked examples, rather than measurements published by the cited sources.
Editorial responsibility, sources and methodsChange history
- Added a full article with explicit validity conditions, two authored examples, five checked exercises and an original native data graphic.
Cite this reference page
Quanta. ROC area under the curve. Updated November 9, 2026. https://quanta-study.de/en/formula-sheet/roc-area-under-curve
When citing a specific scientific statement, also cite the specialist source linked to that statement.