Line of Best Fit
A line of best fit follows the trend of a scatter plot. It shows the pattern, even when no line hits every dot.
What you'll be able to do
- Judge if a line fits a scatter plot well.
- Draw a fit line and write its equation.
- Compare two lines by their gaps.
- Know when a line is not a good model.
The big idea
What a fit line does. It runs through the middle of the dots and follows their trend.
Both sides. A good fit has about as many dots above it as below it.
Close. The dots should be close to the line. Balance alone is not enough.
The gap. For one dot, the gap is the data's y minus the line's y. Plus means above. Minus means below.
Compare lines. Add up the sizes of the gaps for each line. The smaller total fits better.
Draw it. Pick two points on a line that follows the trend. They don't have to be data points.
Write it. Find the slope from your two points. Then find b, where the line crosses the y-axis.
Not every plot. If the dots curve, a straight line is the wrong model.
Words you need
- Line of best fit
- A straight line that follows the trend of a scatter plot.
- Gap
- How far a dot is above or below a line: the data's y minus the line's y.
- Slope
- How steep a line is: the rise divided by the run.
- Trend
- The overall way the dots go.
- Outlier
- A dot far from the pattern of the other dots.
- Mean
- The total divided by how many there are.
Is it a good fit?
| Check | Good fit |
|---|---|
| Dots above and below | About the same number |
| Gaps | Small |
| Shape of the dots | Straight, not curved |
| Outliers | Not pulling the line |
Worked examples
Example 1
Data: (1, 5), (2, 6), (3, 9), (4, 10), (5, 13). Is y = 2x + 3 a good fit?
- The line gives 5, 7, 9, 11, 13.
- The gaps are 0, −1, 0, −1, 0.
- Two dots are below and none are above. A slightly lower line, like y = 2x + 2.6, balances better.
Answer: No, it is not a good fit: 0 above, 2 below, 3 on it
Example 2
x is weeks. y is a sunflower's height in cm. Data: (1, 8), (2, 15), (3, 19), (4, 27), (5, 31), (6, 38). Draw a fit line, then write its equation.
- Pick two points on a line that follows the trend: (0, 2) and (5, 32).
- Slope = 30 ÷ 5 = 6. The line crosses the y-axis at 2.
- Plot (0, 2). Go up 6 and right 1 to (1, 8), then (2, 14).
- The line is y = 6x + 2.
Answer: (0, 2), (1, 8), (2, 14)
Example 3
Data: (1, 4), (2, 5), (3, 8), (4, 9). Line A is y = 2x + 1. Line B is y = x + 3. Which fits better?
- Line A's gaps: 1, 0, 1, 0. They add to 2.
- Line B's gaps: 0, 0, 2, 2. They add to 4.
- Line A has the smaller total, so it fits better.
Answer: Line A
Common mistakes
Drawing the line through the first and last dots. Those dots may be off the trend. Follow the middle of the cloud.
Bending the line toward an outlier. Fit the other dots. An outlier should not pull the line.
Changing the slope when only the height is off. If every dot is about 6 below, keep the slope and lower b by 6.
Fitting a line to a curve. If the dots bend, no straight line fits well.
Practice: 22 questions
14 of 22 are word problems. For a word problem, sketch it first and mark what you know.
Tier 1 Foundations Use the rule directly
- x is minutes of practice a day. y is free throws made out of 20. The plot shows Line A, y = 0.4x + 2. Is it a good fit? Word problem
- x is a puppy's age in weeks. y is its mass in kg. Line A is y = 0.5x. Line B is y = 0.3x + 3. Which fits better? Word problem
- The plot shows trees. x is age in years. y is trunk width in cm. The fit line passes through (10, 14) and (30, 38). Write its equation. Word problem
- A fit line is y = 2x + 5. One data point is (6, 21). How far is it above or below the line?
- x is hours of daylight. y is park visitors in hundreds. The plot shows 8 days. Sam draws his line through the first and last points. Find his mistake. Word problem
- x is km run. y is minutes. The fit line is y = 3x + 4. Which points do you plot for 0, 1 and 2 km? Word problem
Tier 2 Intermediate One more step to think through
- x is laps swum. y is minutes. Data: (1, 8), (2, 9), (3, 14), (4, 15), (5, 20), (6, 21). Is y = 3x + 4 a good fit? Count the points above and below. Word problem
- Data: (2, 7), (4, 8), (6, 12), (8, 13), (10, 17). Line A is y = x + 4. Line B is y = 1.25x + 4.5. Add up the gaps for each line. Which fits better?
- x is weeks of guitar lessons. y is songs played. The plot shows 7 weeks. Ana draws her fit line through (1, 2) and (7, 19). Find her mistake. Word problem
- x is weeks of a fundraiser. y is dollars raised. The fit line is y = 50x + 150. Each square up is $50. Which points do you plot for 0, 1 and 2 weeks? Word problem
- x is minutes a tub drains. y is liters left. The fit line is y = −2x + 30. Plot where it crosses each axis: the start, and when the tub is empty. Word problem
- x is cups of flour. y is cookies made. Data: (2, 9), (4, 12), (6, 17), (8, 21), (10, 25). Which pair makes the better fit line: (2, 9) and (10, 25), or (2, 6) and (10, 30)? Write its equation. Word problem
Tier 3 Advanced Several steps - find the hidden structure
- x is a hike's length in km. y is hours. The plot shows 8 hikes. Write a fit line. Check it. Word problem
- x is boxes packed. y is minutes. Data: (1, 19), (2, 24), (3, 28), (4, 34), (5, 39), (6, 44). Every point is below y = 5x + 20. Leo fixes it by writing y = 4x + 20. Find his mistake. Word problem
- A good fit line passes near the mean point. Its x is the mean of x. Its y is the mean of y. Data: (2, 11), (4, 14), (6, 20), (8, 23), (10, 27). A fit line has slope 2. Write its equation.
- Data: (1, 5), (2, 8), (3, 9), (4, 12), (5, 13). Write a line that fits better than y = x + 5. Show that its total gap is smaller.
- Each square across is 5 minutes. Each square up is 20 points. A fit line crosses grid points 2 squares across and 3 up, then 6 across and 7 up. Write the line in data units.
Tier 4 Challenge Stretch problems, some above grade level
- The plot shows 8 points and the flat line y = 10. Mia says it fits well: 4 points are above and 4 below. Find her mistake.
- x is a fish's length in cm. y is its mass in g. The plot shows 6 fish. Tim draws a line with 3 points above and 3 below. Is a line a good model? Word problem
- x is hours a lemonade stand is open. y is cups sold, in tens. Data: (5, 4), (6, 5), (7, 7), (8, 8), (9, 9), (10, 3). Remove (10, 3). Does the fit line get steeper or flatter? Word problem
- Data sets A and B both have the fit line y = 2x + 1. In A, every point is within 1 of the line. In B, the gaps reach 6. Which line is the better model of its data?
- A residual is the data's y minus the line's y. The line is y = 2x + 1. Find the residuals for (1, 4), (2, 4), (3, 6), (4, 9), (5, 13). Do they show a pattern? Above grade level
Answers
Tier 1 Foundations
- No, it is not a good fit: 6 above, 0 below, 2 on it. Most points are on one side of y = 0.4x + 2. A good fit has points on both sides.
- Line A. Line A's gaps add to 0.9 (the biggest is 0.3). Line B's gaps add to 4.7 (the biggest is 1.3). Line A is closer.
- (10, 14) and (30, 38): y = 1.2x + 2. y = 1.2x + 2 misses by 2 in all.
- 4 above. The line gives 2 × 6 + 5 = 17 at x = 6. 21 − 17 = 4.
- No, it is not a good fit: 6 above, 0 below, 2 on it. The last day, (16, 24), is off the trend. A line through it sits below almost every other dot. Most points are on one side of Sam's line. A good fit has points on both sides.
- (0, 4), (1, 7), (2, 10). y = 3x + 4: start at the y-intercept (0, 4). The slope is 3, so go up 3 and right 1 each time: (1, 7), then (2, 10).
Tier 2 Intermediate
- Yes, it is a good fit: 3 above, 3 below. Points fall on both sides, and each is close to y = 3x + 4.
- Line B. Line A's gaps add to 7 (the biggest is 3). Line B's gaps add to 3 (the biggest is 1.5). Line B is closer.
- No, it is not a good fit: 0 above, 5 below, 2 on it. (7, 19) is an outlier. Her line follows it and leaves the other dots below. A fit line follows the other dots: about y = 1.5x + 0.4. Most points are on one side of Ana's line. A good fit has points on both sides.
- (0, 150), (1, 200), (2, 250). y = 50x + 150: start at the y-intercept (0, 150). The slope is 50, so go up 50 and right 1 each time: (1, 200), then (2, 250).
- (15, 0) and (0, 30). y = −2x + 30: put y = 0 to get x = 15. Put x = 0 to get y = 30. Plot both points and join them.
- (2, 9) and (10, 25): y = 2x + 5. y = 2x + 5 misses by 1 in all. y = 3x misses by 12 in all.
Tier 3 Advanced
- y = 0.36x + 0.08 works. Any close line that follows the trend is fine. Its gaps: 0, −0.02, 0.12, 0, 0.14, 0.12, 0, 0.24. Every point is within 0.24 of it.
- y = 5x + 14. The dots still rise about 5 a box, so the slope 5 was right. Only the height was off. The gaps are −6, −6, −7, −6, −6, −6: about −6. Keep the slope 5 and move the start: 20 − 6 = 14.
- y = 2x + 7. Mean of x = 6. Mean of y = 19. 19 = 2 × 6 + b, so b = 7.
- y = 2x + 3.4 works. Many answers work. y = x + 5: gaps 1, 1, 1, 3, 3, total 9. y = 2x + 3.4: gaps 0.4, 0.6, 0.4, 0.6, 0.4, total 2.4.
- y = 4x + 20. The grid points are (10, 60) and (30, 140) in data units. Slope = 80 ÷ 20 = 4. b = 20.
Tier 4 Challenge
- No, it is not a good fit: 4 above, 4 below. Balance is not enough. The dots rise, but her line is flat. The end dots are 7 from the line. A rising line, about y = 2x + 1.4, follows the trend.
- No. The dots curve up, so no straight line fits well. Any line is too high in the middle and too low at the ends. The pattern is a curve.
- Steeper. (10, 3) is a low dot at the right end. It pulls the right side of the line down.
- Data set A. The line is the same, but A's dots sit much closer to it.
- Residuals: 1, −1, −1, 0, 2. They dip, then rise: a curve fits better. The line gives 3, 5, 7, 9, 11. Each residual is the data's y minus that.
Stuck on this topic?
Trouble here often traces back to an earlier skill. Our free check-in finds the exact gap. A tutor then works on it with your child.
Find gaps free More practice