JentooSAT®

SAT® · Math: Problem-Solving and Data Analysis

Fitting Linear Models to Data

A fitted line is the straight-line model that best summarizes noisy data, chosen so the overall gaps between the line and the points are as small as possible, not so it touches any point.

Real data rarely falls in a perfect line. Plant heights, test scores, prices — any two related quantities measured in the real world come with noise, small ups and downs from measurement error or natural variation. If you connected every dot, you would get a jagged zigzag that fits the noise instead of the pattern. A straight-line model ignores that noise and captures the overall trend, which is what lets you make a sensible prediction for a week, or a value, you never measured.

The line carries two numbers that mean something in context. The slope is the rate of change: how much the output goes up or down for every one unit increase in the input. The intercept is the starting value: what the model predicts when the input is zero. For a plant growing over time, the slope is the growth rate in centimeters per week, and the intercept is the height at week zero. Because the line is fit to minimize the total leftover gaps across all the points at once, not to pass through any single one, it almost always misses every plotted point while still being the best overall summary.

This same idea is really solving for the two unknowns, slope and intercept, that pin down a linear equation, which is why fitting a line connects directly to systems of two linear equations: two conditions on a line's behavior are enough to determine both its slope and intercept, just as two equations pin down a solution point.

Key terms

Line of best fit
The straight line chosen to make the overall gaps between it and the data points as small as possible.
Slope
The rate of change in the model, the predicted change in output per one unit increase in input.
Intercept
The model's predicted output value when the input is zero.
Residual
The leftover gap between an actual data point and the value the fitted line predicts for it.

Watch it explained

  1. How it worksHow do the slope and the intercept of a fitted line each carry a real meaning in context?
  2. Common mistakeWhy isn't the line of best fit required to touch any of the plotted points?
  3. Worked exampleFind what a slope of 2.4 means when a fitted line gives plant height in cm from weeks of growth.
  4. Ties togetherHow does fitting a line to data connect to solving a system of two linear equations?

Check yourself

Your turnmedium1 of 3
A fitted line models a plant's height in centimeters after x weeks. The plant measured 11 centimeters at week 0 and gains 3.45 centimeters per week. Write an expression in x for the predicted height.

End of topic.