Not sure which lesson to do first? Find your level and get a plan →

Math · Statistics & Probability · Grade 9-12

Model Fit (Intuition)

Model fit describes how closely a model's predictions match the observed data, judged by the size of the residuals (gaps between prediction and reality).


Quick Answer

Model fit describes how closely a model's predictions match the observed data, judged by the size of the residuals (gaps between prediction and reality). Use it when you have a model, such as a trend line or a formula, and need to know whether to trust it or which of two models is better. Compute each residual as actual minus predicted, then look at both size and pattern: small residuals scattered randomly around zero mean a good fit, while residuals that curve or drift mean the model has the wrong shape.

Why This Matters

Every model is wrong somewhere, and fit tells you how wrong and where. With it you can choose between two trend lines, decide whether a straight line or a curve suits the data, and attach an honest range to predictions. Without it, a line drawn through a scatter plot looks equally convincing whether it misses by 1 or by 20.

Intuitive Explanation

Draw a trend line through a scatter plot of hours studied against test scores. For each student the line gives a predicted score, and the actual score sits above or below it. The vertical gap, actual minus predicted, is the residual. A student predicted at 75 who scored 81 has a residual of +6; one predicted at 80 who scored 77 has −3. Model fit is about these gaps: how big they are, and whether they form a pattern.

Size is the first check. Adding up the absolute residuals, or averaging their squares, gives one number for how far off the model is, and smaller is better when comparing models on the same data. R2 turns this into a share: R2=0.85 means the model accounts for 85% of the variation in the data. Pattern is the second check. Good residuals look like noise, scattered above and below zero with no shape. If they are positive at both ends and negative in the middle, the data curves, and a straight line is the wrong shape however small the gaps are.

Fit on the data used to build a model is not the whole story. A model can be bent to pass through every point and score a perfect fit, yet predict new data badly because it has memorized the noise; that is overfitting. Fit also differs from correlation: correlation measures how tightly two variables follow a straight line before any model is chosen, while fit judges a particular model's predictions.

Think of it like this. Model fit is like checking how jeans fit. You compare them with your body at the waist, hips and length, and small gaps everywhere mean a good fit. Jeans loose at the waist but tight at the hips are the wrong cut: a pattern problem, not a size problem. Where the comparison stops: a model must also fit new data it has never met.

Core idea. Model fit measures how well a model's predictions match the data it is supposed to describe.


When to Use

Judge model fit when you have predicted values next to actual values and need to know how good a model is, or which of two models is better. Signals include residuals, R2, how well a line fits, and comparing a line with a curve. Check both the size and the pattern of the gaps. If you only need the strength of a linear relationship, use correlation; if a model fits its own data far better than new data, look at overfitting.

Tip. Ask: Am I comparing a model's predicted values to the actual observed values to judge the gap?

How to Recognize It

Look at what you have been given: a model's predictions beside the measured values or only raw pairs of data, and whether the model is being judged on the same points that built it.

  1. Does the problem give you a specific model, such as a fitted line y^=2x+5, rather than just a table of x and y values?

    Yes means you can compute residuals and judge fit. With only raw pairs and a question about how strongly they move together in a line, you want correlation; with a model and a request for one output, you want a prediction.

  2. When you plot the residuals against x, do they bend into a curve or drift steadily up or down?

    Yes means the model has the wrong shape even if every gap is small, so try a curve or another input. Residuals scattered evenly above and below zero, with no shape to them, are what a good fit looks like.

  3. Was the model judged only on the same points that were used to build it?

    Yes means a high R2 is not yet proof of a good fit, because a model can hug its training points and still miss new ones. A large gap between old-data and new-data error points to overfitting.

  4. Are you choosing between two models fitted to the same data?

    Yes means compare residual sizes and residual plots for both, and prefer the simpler model when they fit about equally well. If both miss badly in a patterned way even on their own data, the issue is underfitting.

Model Fit (Intuition) compared with Correlation, Overfitting, and Prediction

All four rows involve a model or a relationship between two variables. Ask what the answer reports: one predicted value, how close predictions came to the actual data, whether two variables move together at all, or a fit that collapses on new data.

Model Fit (Intuition)

Meaning
Use this when you have a model and want to measure how well its predictions match the observed values.
Key test
Am I comparing a model's predicted values to the actual observed values to judge the gap?
Example
Actual values are 10,20,30. Model A predicts 11,19,31; Model B predicts 5,25,18. Which fits better?

Correlation

Meaning
Measures the strength of a linear relationship between two variables, before any model is fit.
Key test
Use when asking whether two variables relate, not how well a chosen model matches the data.
Formula
r
Example
Do hours studied and test score move together?

Overfitting

Meaning
A specific failure where good training fit hides poor performance on new data.
Key test
Use when the model fits its own data great but predicts new cases badly.
Example
Memorizing the exact training points

Prediction

Meaning
Producing the estimated value itself, not evaluating how close it landed.
Key test
Use when generating y^, not measuring the gap afterward.
Formula
y^
Example
Forecasting next month's sales

Worked Examples

Example 1 — Compare two models' gaps

Easy

Actual values are 10,20,30. Model A predicts 11,19,31; Model B predicts 5,25,18. Which fits better?
Show the steps and the answer
  1. Find A's residuals, actual minus predicted: 10−11=−1, 20−19=+1, 30−31=−1.

    Each residual is how far the model missed one actual value, and its sign says whether it guessed high or low.

  2. Find B's residuals: 10−5=+5, 20−25=−5, 30−18=+12.

    B misses every value by at least 5.

  3. Total the sizes: A gives 1+1+1=3; B gives 5+5+12=22.

    Adding absolute values stops positive and negative misses from cancelling each other.

  4. Cross-check with squared residuals: A gives 1+1+1=3; B gives 25+25+144=194.

    Squaring punishes big misses most, so B's 12-point miss dominates; A wins on either measure.

Answer: Model A fits better (smaller total residual)

Takeaway: Compare models by the size of their residuals on the same data. A misses by 1 each time; B misses by as much as 12.

Example 2 — Measuring relationship, not fit

Standard

The same data set, with the actual values 10,20,30 measured at x=1,2,3: are x and y positively correlated?
Show the steps and the answer
  1. Read what is asked: whether the two variables rise together, not how well a model's predictions landed.

    Correlation describes the raw data; no model's predictions are involved.

  2. Write the data as pairs, taking the inputs as equally spaced: (1,10), (2,20), (3,30).

    Correlation needs both variables, and the problem gives only the outputs, so this assumption is stated openly.

  3. See the pattern: each step of 1 in x adds exactly 10 to y.

    Points that rise by the same amount at every step lie exactly on an upward line.

  4. Conclude: r=1, a perfect positive correlation.

    r measures how close the points lie to a straight line, and these lie on one that slopes up.

Answer: Yes, they are positively correlated: report r. With the values 10,20,30 at equally spaced inputs, the points lie exactly on a rising line, so r=1.

Takeaway: Correlation describes the data's own relationship; model fit judges one model's predictions. Here r=1, even though Model B was a poor model of the same data.

Example 3 — Find the mistake: residuals that sum to zero

Application

A least-squares line is fit to five points. Its residuals at x=1,2,3,4,5 are +4,−2,−4,−2,+4. Ravi writes: "The residuals add up to 0, so the line fits the data well." Find the mistake and correct it.
Show the steps and the answer
  1. Check Ravi's sum: 4−2−4−2+4=0.

    The sum is 0, but a least-squares line always makes its residuals sum to 0, so this says nothing about fit.

  2. Read the signs in order of x: +,−,−,−,+.

    Positive at both ends and negative in the middle is a U shape, not random scatter.

  3. Interpret the U: the actual points sit above the line at both ends and below it in the middle, so the data bends upward.

    A model with the wrong shape misses in a predictable pattern, which is exactly what these residuals show.

  4. Fix the model: try a curve such as a quadratic, and check that its residuals scatter without a pattern.

    A good fit leaves residuals that look like noise, above and below zero in no particular order.

Answer: The line does not fit well: the residuals form a U (+,−,−,−,+), so the data curves and a quadratic model is needed. A zero sum is automatic for a least-squares line.

Takeaway: Look at the pattern of residuals, not just their total. A curved pattern means the model has the wrong shape.

Where You'll See It

  • Scoring weather forecast models

    Forecasters compare each day's predicted high temperature with the actual high. If one model's next-day forecasts miss by about 1.5 °C on average and another's by 3 °C, the first fits better. If a model's residuals are almost always negative, it keeps running warm, a bias that can be corrected.

  • Fuel use against driving speed

    Engineers modelling a car's fuel use per kilometre find that a straight line against speed leaves residuals in a U pattern. Real cars use the least fuel at moderate speeds and more at both low and high speeds, so a curved model fits far better than any line.

  • Online house-price estimates

    Real-estate websites that estimate home values publish how far their estimates typically land from actual sale prices, often within a few percent for homes on the market. That typical residual tells a buyer how much to trust the estimate for any one house.

Common Mistakes

  1. The slip: Judging fit only on the data used to build the model

    Instead: good fit must hold up on data the model has not seen.

  2. The slip: Treating a perfect fit as the goal

    Instead: a model that matches every point exactly is usually memorizing noise.

  3. The slip: Ignoring the direction and pattern of residuals

    Instead: if residuals curve, the model has the wrong shape even if the gaps are small.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. Actual values are 5,9,14 and a model predicts 6,9,12. Find each residual (actual minus predicted).

    Hint: Subtract each prediction from its matching actual value.

  2. Actual values are 4,8,12,16. Model A predicts 5,7,13,15. Model B predicts 4,10,12,13. Which fits better by sum of squared residuals?

    Hint: Square each residual so big misses count more, then add.

  3. A model has R2=0.81. What percent of the variation in the data does it leave unexplained?

    Hint: R2 is the share of variation the model explains.

  4. A straight line's residuals, in order of x, are +4,+1,−2,−3,−2,+1,+4. Are the errors small enough to keep the line?

    Hint: Look at the pattern of signs, not just the sizes.

  5. A degree-9 curve passes exactly through all 10 data points, so R2=1.00. Is this the best-fitting model, or a sign of overfitting?

    Hint: What would happen if you tested it on new points?

  6. A model predicting test scores has an average error of 2 points on the 50 students used to build it. Kim says: "It will be off by about 2 points for next year's students too." Correct her.

    Hint: Has the model been checked on students it has not seen?

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

Is an R2 of 0.9 always a good fit?

No. R2=0.9R^2=0.9 says the model accounts for 90% of the variation in yy on the data it was fitted to, but a straight line through clearly curved data can score that high while its residuals form a U shape. A model with many terms can also push R2R^2 toward 1 by bending through noise. Read R2R^2 together with a residual plot and, when you can, with how the model does on new data.

Why do we square the residuals instead of just adding them up?

For a least-squares line, the residuals always add up to exactly 0: the positive gaps above the line cancel the negative gaps below it, so the plain sum says nothing about fit. Squaring makes every gap count as positive, and it also punishes big misses more than small ones: one residual of 4 contributes 16, while four residuals of 1 contribute only 4.

Can a model fit its data well and still be useless for prediction?

Yes, if you use it outside the range of the data. A line fitted to children's heights from age 2 to 12 can fit those years closely, yet extending it to age 40 predicts a height of over 3 metres, because real growth stops. Fit is measured only where you have data; beyond the last data point, which is called extrapolation, the model is a guess, however small its residuals were.

What does a residual of −3 actually tell me?

It says the model over-predicted that point by 3 units. Residual means actual minus predicted, so if the line predicted a score of 78 and the student scored 75, the residual is 75−78=−375-78=-3. A positive residual means the point sits above the line, a negative one means it sits below, and the pattern of signs along the whole graph is what reveals a model with the wrong shape.

Learning Path

Model Fit (Intuition)

You are here

You need Correlation and Prediction first: a relationship between variables, and estimates produced from it. Model Fit measures how close those estimates land, using residuals and R2, and reads their pattern for signs of the wrong shape. Next, Overfitting (Intuition) covers models that fit their own data too closely, and Underfitting (Intuition) covers models too simple to fit at all.

See Also