Level 2 · Module 7 · 10 minutes
Regression: predicting a number
- Explain regression as predicting a quantity.
- Describe how prediction errors are judged.
- Recognise when a numerical prediction should not be treated as a promise.
Regression predicts a number rather than a category. How many loaves should a bakery bake tomorrow? How long will this delivery take? How much stock will be needed next month? The label is a quantity, and the model produces an estimate, usually with some error.
Examples in ordinary work
- A bakery estimating demand for each kind of bread by day of week.
- A delivery team estimating arrival time from distance, traffic and item count.
- A workshop estimating how many hours a repair will take.
- A shop estimating how much of a fast-selling item to order.
In each case, being close is valuable, and being exactly right is not required. That tolerance is what makes regression useful.
How errors are judged
Errors run in both directions: too high and too low. Two models can have similar average error and very different behaviour. One is usually a little off, while the other is usually close but occasionally badly wrong. Whether that matters depends on the use. A slightly wrong estimate annoys; a wildly wrong stock order costs money.
It helps to look at the spread of errors, not only the average, and at the worst cases. Ask what a bad miss costs, and how often the model misses badly.
Numbers invite false confidence
Arriving in eighteen minutes sounds precise. It is an estimate, and the model knows nothing about the blocked road or the broken lift in the building. A confident-looking number can tempt people to plan as if it were certain. Present a range where possible, or say about, and keep a way to flag unusual cases.
Relationships and causes
Regression learns associations in data. If two things rise together, the model may use one to predict the other, but that does not mean one causes the other. A change in policy or prices can break the association, and the model will not notice until new data arrives.
The hand-drawn line
Courses often show points on a chart and ask you to draw the line that fits best. This teaches what a regression is trying to do: find the pattern that best matches the examples. It is a simulation done by eye. Real training fits the numbers found in data using software, and it is checked on examples it did not see. The drawn line is a helpful picture, not a trained model.
Common misconception
A precise-looking number from a regression model is a reliable promise about the future. A regression output is an estimate with error, based on patterns in past data. It can be wrong, especially when conditions change, and it should be shown with appropriate caution rather than treated as certainty.
Guided practice
Pick a number you would like to estimate, such as how long a journey takes or how many items will sell next week. List the features you would use, then describe how you would judge whether the estimate is good enough for its purpose. Name one situation where the estimate would probably be wrong.
Knowledge check
Independent practice
Write a short example from your own work or daily life and decide whether it is AI, ordinary software or a mixture. Then explain why. Save it in your notes; no account is required.
Last reviewed: · Report a problem