Classification Metrics interview question

Machine LearningClassification Metricseasy

A churn model produced this confusion matrix on 10,000 customers, and a manager celebrates its 98.8% accuracy. What is the model's balanced accuracy, and what does it reveal?

Predicted
ActualChurnStay
Churn3070
Stay509850
  1. A≈ 0.34: the average of precision (0.375) and recall (0.30), showing that most customers the model flags do not churn and that it also misses most of the real churners.
  2. B≈ 0.99: the average of specificity (≈ 0.995) and negative predictive value (≈ 0.993), confirming that the 98.8% accuracy is a fair summary of this model.
  3. C0.30: balanced accuracy is the recall of the minority class alone, so the majority class is left out and the score shows that only 30% of churners are caught.
  4. D≈ 0.65: the average of recall (0.30) and specificity (≈ 0.995), revealing that the model misses most churners even though its overall accuracy looks excellent.
Show the answer and explanation

Correct answer: D, ≈ 0.65: the average of recall (0.30) and specificity (≈ 0.995), revealing that the model misses most churners even though its overall accuracy looks excellent.

Explanation Classification Metrics

With churn as the positive class: TP = 30, FN = 70, FP = 50, TN = 9,850.

  • Accuracy = (30 + 9,850) / 10,000 = 0.988
  • Recall (sensitivity, TPR) = 30 / 100 = 0.30
  • Specificity (TNR) = 9,850 / 9,900 ≈ 0.995
  • Balanced accuracy = (TPR + TNR) / 2 = (0.30 + 0.995) / 2 ≈ 0.65
  • Precision = 30 / 80 = 0.375

Balanced accuracy is the average of the recall of each class, so every class counts equally regardless of its size. A model that predicts "stay" for everyone gets 99% accuracy but a balanced accuracy of exactly 0.5, so balanced accuracy immediately exposes the accuracy paradox. In multi-class problems balanced accuracy equals macro-averaged recall.

Why the distractors are wrong: averaging precision and recall is not a standard metric (F1 is their harmonic mean, ≈ 0.33 here). Specificity and negative predictive value both describe how well the majority class is handled, so their average just repeats the inflated accuracy. Balanced accuracy is not the minority-class recall alone; it also includes the recall of the majority class.

Interview tip: for imbalanced problems report the confusion matrix plus per-class recall (or balanced accuracy), precision and PR-AUC, and always compare against the trivial majority-class baseline.

Practice it as a quiz

Answer this and the other free questions with instant grading, streaks and weak-topic tracking, or unlock all 4,000 questions.

More Machine Learning questions

  1. For the query "waterproof hiking boots", assessors graded four products as relevant: Boot-X (3), Boot-Y (3), Boot-Z (2) and Sock-K (1); every other product is…
  2. A gradient-boosted tree model was trained on months 1–36 of demand, using month_index as a feature. Its forecast for months 37–48 is the flat line in the…
  3. A telecom churn model (3% churners) is evaluated with the code below and reports a mean CV recall of 0.99. On customers that were set aside before any…
  4. An insurer has 3,000 claims confirmed as fraud and 120,000 claims nobody has investigated. A calibrated classifier trained to separate confirmed (s = 1) from…
  5. A helpdesk routes tickets with a KNN classifier using Euclidean distance on TF-IDF vectors built with norm=None (no length normalisation). Tickets range from…