A café keeps a note of the temperature each day and how many cold drinks it sells. Twelve days in, a pattern shows up. Tomorrow will be 30°: how many should they stock?
One way to answer: draw a straight line through the points and read off where it sits at 30°. That line is a *model*: a rule that turns a question into a guess. Move the two sliders and the rule changes.
Any line we draw misses most of the points. Each gap is a day the rule got wrong: the real count minus the guess. A good model is one where the gaps are small.
Turn every gap into a square. Big misses become big squares, and above or below no longer matters. The total area is the model's error. Now watch the line move until that total is as small as it can be.
With the best line in place, the question has an answer. Go up from 30° to the line, then across. The model has never seen a 30° day, yet it makes a sensible guess from the days it has seen.
The dashed line is the best one the data allows. Move the sliders and try to get a lower error. You can match it; you cannot beat it. That is what "fitting a model" means: choosing the numbers that make the total error smallest.
A model has two parts: a *shape* for the rule (here, a straight line) and *numbers* the data decides (here, w and b). This one is called linear regression and has two dials; the biggest AI models have billions. Every one of them is the same idea: a rule with dials, tuned until it fits what it has seen.
A new day arrives with a surprising number. Think about the squares before you answer.
A gap that far from the line makes a huge square. The cheapest way to shrink the total area is to move the line part of the way toward the new point, even though that slightly grows the squares on the other days.