Accuracy is the fraction of correct decisions. It treats the two kinds of error as equally costly, and it depends on the prevalence. When 90 percent of cases are negative, a rule that always says “negative” has accuracy 0.90, and under our costs it is the worst policy in Listing 0.2.
Accuracy is the fraction of correct decisions. It treats the two kinds of error as equally costly, and it depends on the prevalence. When 90 percent of cases are negative, a rule that always says “negative” has accuracy 0.90, and under our costs it is the worst policy in the companion book example.
The AUC is the probability that a random positive case receives a higher score than a random negative one. It is a property of the ranking, which is the same for every threshold, so it cannot know which threshold the costs call for. The ROC curve contains the information, but the AUC averages over the whole curve, with equal weight on regions that the decision never visits. Formally, the expected cost of a threshold rule is where . Minimizing this over the threshold means finding the point on the ROC curve where its slope is . Different costs select different points on the curve, and the region around that point decides which model is cheaper. Two curves with different AUC can cross, and the better one in the region of interest can be the worse one overall.
Helpers: the rank-sum AUC, the false-negative and false-positive rates, the two-scorer simulator, and the cost-minimizing threshold search.
Scorer A has the higher AUC (0.8306 against 0.8213) and the higher accuracy (0.9107 against 0.5605), and it costs 0.6945 per case, against 0.6437 for scorer B. Every conventional metric prefers A and the stated costs prefer B. The reason is in the error rates. B accepts a false-positive rate of 0.476 to cut the false-negative rate to 0.108, which is the trade that a cost ratio of twenty to one demands. A has a false-negative rate of 0.319, because the urgent cases it is blind to look like negatives, and each of those costs 20. The always-negative rule has an accuracy of 0.9001, higher than that of B, and costs 1.9973, about three times as much as either scorer.
The lower table shows that the preference depends on the cost ratio. A is cheaper for up to 10, where it costs 0.3635 against 0.4895 for B, and B is cheaper from onwards. No single number summarizing the ranking can predict this. The consequence for evaluation is simple. State the costs, choose the threshold or policy the costs imply, and report the expected cost. Where costs are uncertain, report a curve, as the next section does.
Continue with the book
Explore the full treatment, worked examples, and exercises in Applied AI Under Uncertainty.
Companion article for Applied AI Under Uncertainty, published by Choral Software. Article text and original examples © 2026 Choral Software. All rights reserved.
