Specialty Digest

Global English editionLearners’ Study Dashboard — in development
The Knowledge Library for All

Flashcards: open the module flashcards (end-of-module review with workplace questions).

Online Courses / University Track / Learning from Data

Module 2 · Lesson 1 · Core

Error: how wrong is one prediction?

Define error as predicted minus actual and tell the sign from the size.

  • 55 minutes
  • Serves O2
  • Assumes Module 1

Phase 1: Prepare

Step 1 Warm-up recall

From Module 1: what is the label in a table of examples?

Private: nothing you type here is sent or stored.

Step 2 Learning goal

By the end of this lesson you can:

  • compute the error of a prediction (Foundation);
  • tell over-prediction from under-prediction (Core);
  • explain why the sign and the size matter separately (Core).

Phase 2: Teach

Step 3 A familiar example

A delivery firm quotes 30 minutes and the parcel takes 40. The quote was ten minutes too short. Whether the quote was too short or too long, and by how much, are two separate facts.

Step 4 Clear explanation

The error of one prediction is the gap between what the model predicted and what actually happened: error = predicted − actual. A positive error means the model over-predicted; a negative error means it under-predicted.

Predictionwhat the model saidActualwhat happenedErrorthe gap
Error is the gap between what the model predicted and what happened. The sign shows the direction; the absolute error shows the size.
HomeActual price (£k)Predicted (£k)Error = predicted − actualAbsolute error
A200210+1010
B240230−1010
C280300+2020

The absolute error drops the sign and keeps the size: 10, 10 and 20. The sign still matters. A model that always over-predicts is biased in a known direction, which may be fixable, and a house-price model that is too high costs a buyer, while one that is too low costs a seller. If we simply added the signed errors (+10, −10, +20) the first two would cancel out, which hides the fact that two of three predictions were wrong. So summaries use absolute or squared errors, as the next lesson shows.

Step 5 Worked example (4 marks)

A model predicts a delivery time of 32 minutes and the actual time is 40. Give the error and the absolute error, and say which way the model missed.

  1. Error = predicted − actual = 32 − 40 = −8. (1 mark)
  2. Absolute error = 8. (1 mark)
  3. The sign is negative, so the model under-predicted. (1 mark)
  4. Answer: −8, 8 and under-predicted. (1 mark)

Go deeper: the professor's notes

Error is predicted minus actual. The sign gives the direction and the absolute value gives the size.
Over

Positive.

Under

Negative.

Size

Absolute.

Predictthe modelActualwhat happenedGaperrorReportsize and sign
Error

Signs

ErrorMeaning
+10over-predicted
−10under-predicted

At work: Delivery times

A parcel is quoted at 32 minutes and takes 40.

  1. Compute predicted minus actual.
  2. Note the sign.

What a careful practitioner decides. Report both the size and the direction of the miss.

Phase 3: Practise

Step 6 Learner practice (instant-marked)

1. Error is defined here as:

2. A negative error means the model:

3. The absolute error of −15 is:

4. Adding signed errors can hide mistakes because:

Phase 4: Close

Step 7 Recap

  • Error = predicted − actual.
  • The sign gives direction; the absolute error gives size.
  • Signed errors can cancel, so summaries use absolute or squared errors.

Step 8 Exit ticket (ungraded)

A model predicts 55 and the actual value is 50. Give the error and say which way it missed.

Private: nothing you type here is sent or stored.

Step 9 Go further (Extension)

Find a forecast you rely on and note one occasion it was too high and one too low.

In industry: Netflix Prize: a trivial predictor sets the bar

A trivial predictor that gives each film its average rating scored an RMSE of 1.0540 on the quiz set. The company's own system scored 0.9514, roughly a 10 percent improvement. To win the million-dollar prize a team had to improve on the company's system by a further 10 percent, reaching 0.8572 on the test set.

Link to this lesson. Prizes, like products, are set as an improvement on a stated baseline, and RMSE was the measure.

Source: Netflix Prize, Wikipedia, citing Bennett and Lanning (2007); Feuerverger, He and Khatri (2012)

Common mistakes

MistakeWhy it fails
Mixing up the orderUse predicted minus actual every time.
Averaging signed errorsThey cancel; use absolute or squared errors.
Ignoring the signDirection can be as costly as size.

Limits. This lesson treats numeric predictions; errors for categories are covered in Lesson 3.

Flashcards for this lesson (3)

Tap a card to reveal the answer. Read the question, answer it aloud or in writing first, then check yourself against the explanation.

Card 1 of 3 · What is the error of a prediction?
Predicted55Actual50Error+5
Error

Predicted minus actual. A forecast of 55 when the true value is 50 has an error of +5. In a delivery service, a quote of 30 minutes for a 40-minute trip has an error of −10.

Card 2 of 3 · What does the sign of the error tell you?
+too high−too lowSame signbias
Sign

Positive means over-prediction and negative means under-prediction. A consistent sign is a bias, such as a price model that is always too high.

Card 3 of 3 · What is absolute error?
−15becomes 15SizeonlyUsein averages
Absolute error

The size of the error without its sign. It is used so that errors of opposite sign do not cancel when you average many predictions.

Review with flashcards

Test yourself on this module with workplace flashcards and detailed answers.

Open the module flashcards