Line of Best Fit Examples in Statistics
Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Line of Best Fit.
This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in Statistics.
Concept Recap
The straight line that best represents the trend in a scatter plot, minimizing the overall distance between the line and all data points.
If you stretched a rubber band through a scatter plot to be as close to all points as possible, that's the line of best fit. It captures the overall trend.
Read the full concept explanation โHow to Use These Examples
- Read the first worked example with the solution open so the structure is clear.
- Try the practice problems before revealing each solution.
- Use the related concepts and background knowledge badges if you feel stuck.
What to Focus On
Core idea: The line of best fit (least-squares line) minimizes the sum of squared vertical distances from each data point to the line, giving the most accurate linear predictions.
Common stuck point: Students draw the line of best fit by eye, often forcing it through too many points rather than balancing points above and below the line.
Worked Examples
Example 1
easySolution
- 1 Step 1: (a) The slope is 5, meaning for each additional hour studied, the predicted test score increases by 5 points.
- 2 Step 2: (b) Substitute x = 8: y = 5(8) + 40 = 40 + 40 = 80.
- 3 Step 3: The predicted score is 80. This is an interpolation if 8 hours is within the range of the data, or an extrapolation if it is outside the data range.
Answer
Example 2
mediumPractice Problems
Try these problems on your own first, then open the solution to compare your method.
Example 1
mediumExample 2
hardRelated Concepts
Background Knowledge
These ideas may be useful before you work through the harder examples.