Monash University · FACULTY OF STATISTICS

ETC1000 Chap.9 Using Models for Classification and Prediction

- one subject, every graph, every model, every mark
6 Chapters4-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 9 of 11 · ETC1000

Using Models for Classification and Prediction

The outcome becomes a category

Every model so far predicted a quantity and measured its errors as residuals in the units of that quantity.

Predicting whether a customer will churn or an invoice will be paid late leaves nothing for a residual to mean, so fit has to be judged by counting correct and incorrect calls instead.

A model gives a probability; a decision needs a threshold

A classifier returns an estimated probability that a case belongs to the positive class, and someone has to choose the cut off above which that becomes a yes.

One half is the obvious choice and it is only correct when the two kinds of mistake cost the same, which in business they rarely do. Moving the threshold does not improve the model; it trades one error for the other.

Four counts, and four different denominators

Crossing actual class against predicted class puts every case in one of four cells. Accuracy divides the two correct cells by everything.

Sensitivity restricts to the cases that really were positive and asks what share was caught. Specificity restricts to the actual negatives. Precision restricts instead to the cases the model called positive.

Sensitivity and precision differ only in whether the denominator is the actual column or the predicted row.

Accuracy is dominated by the base rate

When the positive class is rare, the arithmetic rewards ignoring it. A model that never predicts default on a portfolio with a 3 per cent default rate scores 0.97 accuracy and catches nothing.

Ask what share of the data is in the positive class before reading any accuracy figure.

In this chapter

What this chapter covers

  • 01

    Why residuals stop being defined once the outcome is a category

  • 02

    The threshold as a business decision rather than a model output

  • 03

    The four counts and the four rates built from them

  • 04

    Sensitivity against precision, and the denominator that separates them

  • 05

    The base rate, and why accuracy alone flatters a useless model

  • 06

    Scoring on data the model has not seen

Worked example · free

Score a classifier against the benchmark it has to beat

Q [4 marks]. AskSia assigns four practice points to this independent exercise; they are not a University marking scheme. A churn model scored on 400 held back customers returns 30 true positives, 20 false positives, 50 false negatives and 300 true negatives, and 20 per cent of customers churn.
  • 2Compute accuracy, sensitivity and precision.
  • 1Compare accuracy with the do nothing benchmark.
  • 1Say whether the model is useful for a retention campaign.
Accuracy is 330 divided by 400, or 0.825. Sensitivity is 30 divided by 80, or 0.375. Precision is 30 divided by 50, or 0.60. Because 20 per cent of customers churn, a model that flagged nobody would score 0.80 accuracy, so 0.825 barely beats the do nothing benchmark. For a retention campaign the relevant rate is sensitivity, and catching under two fifths of the customers who actually churn is weak: the campaign never reaches the majority of the people it exists for. Lowering the threshold would raise sensitivity at the cost of precision, and given that a retention contact is cheap relative to a lost customer, that is the trade worth making.
Sia tip — Name the expensive error before you choose which rate to lead with. Missing a positive case leads with sensitivity; acting on a false one leads with precision.
Glossary

Key terms

Classification
Predicting which of two labels a case belongs to rather than a value on a scale.
Threshold
The estimated probability above which a case is called positive.
Confusion matrix
The two by two table of actual against predicted class holding the four counts.
Accuracy
The share of all cases the model called correctly.
Sensitivity
The share of actual positive cases the model caught.
Specificity
The share of actual negative cases the model cleared.
Precision
The share of the cases called positive that really were positive.
Base rate
The share of the data belonging to the positive class, which any model must beat.
FAQ

Using Models for Classification and Prediction FAQ

Why is accuracy a poor headline number?

Because it is dominated by whichever class is larger. On a portfolio with a 3 per cent default rate, a model that predicts no defaults at all scores 0.97, catches nothing and has no value for the decision it was built for. Accuracy belongs in the report, but never on its own and never before the base rate it has to beat.

What is the difference between sensitivity and precision?

Only the denominator, in exactly the way that marginal and conditional probabilities differ in week 1. Sensitivity divides the true positives by all the cases that actually were positive. Precision divides the same number by all the cases the model called positive. One measures how much of the target was found and the other how trustworthy a flag is.

How do I choose the threshold?

From the relative cost of the two errors, not from convention. If missing a positive case costs many times what a false alarm costs, lower the threshold well below one half: you will catch more genuine cases and make more wasted interventions, which is the correct trade. If acting on a false positive is expensive, raise it.

Why must a model be scored on data it has not seen?

Because the fitting procedure is built to do well on the rows it was given, so scoring on those rows flatters the model by construction. Holding part of the data back, fitting on the rest and scoring the held back part is what distinguishes a model that learned a pattern from one that memorised a sample.

Study strategy

Exam move

Practise reconstructing all four rates from a table of four counts until the denominators are automatic, because that is the same skill week 1 tested on contingency tables. Then rehearse the two sentence report: the rate that matters for the decision, and the base rate it has to beat.

Working through Using Models for Classification and Prediction in ETC1000? Sia is AskSia’s AI Statistics tutor — ask any ETC1000 Using Models for Classification and Prediction question and get a clear, step-by-step explanation grounded in how ETC1000 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 92 of your Monash University subjects - and 1,000+ Bibles across every Australian university.
Sia - your ETC1000 tutor, unlimited, worked the way the exam marks it
The full 4-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works
ETC1000 · Business and Economic Statistics - independent study guide on the AskSia Library. More Monash University subjects · Microeconomics across all universities
Unlock the full ETC1000 Bible + 92 Monash University subjects
$0.99 Trial