Skip to main content

Measures from cancer confusion matrix

Short answer

Accuracy 96.5%, error rate 3.5%, sensitivity/recall/TPR 30%, specificity/TNR 98.56%, precision/PPV 39.1%, NPV 97.85%, FPR 1.44%, FNR 70%.

Given the following confusion matrix, determine Accuracy, Error rate, Sensitivity, Specificity, Precision, Recall, Positive Predictive Value and Negative Predictive Value, TPR, TNR, FPR, FNR of the classifier model.

Actual \ Predictedcancer = yescancer = no
cancer = yes90210
cancer = no1409560

Positive class = cancer = yes (rows are actual, columns predicted):

TP = 90, FN = 210, FP = 140, TN = 9560. Total = 90 + 210 + 140 + 9560 = 10000. Actual cancer = 300; actual no cancer = 9700.

MeasureFormulaCalculationValue
Accuracy(TP + TN)/total(90 + 9560)/100000.965 (96.5%)
Error rate(FP + FN)/total350/100000.035 (3.5%)
Sensitivity = Recall = TPRTP/(TP + FN)90/3000.300
Specificity = TNRTN/(TN + FP)9560/97000.9856
Precision = PPVTP/(TP + FP)90/2300.391
NPVTN/(TN + FN)9560/97700.9785
FPRFP/(FP + TN)140/97000.0144
FNRFN/(FN + TP)210/3000.700

Answer: accuracy 96.5%, error rate 3.5%, sensitivity = recall = TPR = 30%, specificity = TNR = 98.56%, precision = PPV = 39.1%, NPV = 97.85%, FPR = 1.44%, FNR = 70%.

Comment: the accuracy is high only because 97% of the records are non-cancer (class imbalance). The classifier misses 70% of the real cancer cases, so for this problem sensitivity (recall) is the important measure and this model is poor.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Data Mining chapter 3 questions →