CAB206 · Unit 5: AI for business intelligence
Classification metrics, costs and lift for business decisions
9 practice questions
Key points
- Accuracy misleads on imbalanced data
- Precision = TP/(TP+FP); recall = TP/(TP+FN)
- Pick threshold from business costs
- Lower threshold: recall up, precision usually down
- Lift = decile precision / base rate; AUC = P(positive scored above negative)
A churn model predicts whether a customer will leave. Compare predictions with outcomes in a confusion matrix.
Example of 1,000 customers: TP = 40 (churners caught), FP = 60 (loyal customers wrongly flagged), FN = 10 (churners missed), TN = 890.
- Accuracy = (TP + TN) / total = 930 / 1,000 = 93%.
- Precision = TP / (TP + FP) = 40 / 100 = 0.40 (of those flagged, how many really churn).
- Recall (sensitivity) = TP / (TP + FN) = 40 / 50 = 0.80 (of real churners, how many we caught).
- F1 = 2PR / (P + R) = 0.533.
Imbalanced data. Only 5% churn, so a model that predicts "nobody churns" is 95% accurate yet catches no one. Accuracy misleads; use precision, recall, F1 or AUC.
Business costs. Errors rarely cost the same. If a missed churner costs 5,000 and a wasted retention offer costs 200, total cost here = 10 x 5,000 + 60 x 200 = 62,000, compared with 50 x 5,000 = 250,000 if no model is used. Choose the decision threshold to minimise cost or maximise profit, not just to maximise accuracy. Lowering the threshold raises recall and usually lowers precision.
ROC-AUC is the probability that a randomly chosen positive is scored higher than a randomly chosen negative. With positive scores 0.9, 0.8, 0.4 and negative scores 0.7, 0.3, 0.2, 0.1, the positives win 11 of 12 pairs, so AUC = 0.917.
Lift and gain. Rank customers by score and look at the top decile. If the top 100 (10%) contain 35 of the 50 churners, precision in the decile is 35%, the base rate is 5%, so lift = 7 and gain (capture rate) = 70%.
Campaign economics. Contact 100 customers at 200 each; 35 are real churners and 40% are retained, each retained customer worth 3,000: profit = 14 x 3,000 - 100 x 200 = 22,000.
Try two questions
A confusion matrix has TP = 40, FP = 60, FN = 10 and TN = 890. What are the precision and recall?
- Precision 0.93 and recall 0.40
- Precision 0.40 and recall 0.80
- Precision 0.40 and recall 0.93
- Precision 0.80 and recall 0.40
Show the answer
B. Precision = 40 / (40 + 60) = 0.40; recall = 40 / (40 + 10) = 0.80.
A missed churner costs 5,000 and a wasted offer costs 200. With 10 missed churners and 60 wasted offers, what is the total cost of errors?
- 50,000
- 62,000
- 12,000
- 250,000
Show the answer
B. 10 x 5,000 + 60 x 200 = 50,000 + 12,000 = 62,000.