Year 9 · Unit 5 Scatter graphs and correlation · Lesson 3 of 6

Drawing a line of best fit

A line of best fit follows the trend and passes through the mean point, with the gaps above and below balancing out.

Statistics and ProbabilityNo calculator

Warm-up

Three quick ones from earlier work. Try each in your head or on paper before you open the answer.

  1. Find the mean of 3, 7 and 8.
    Answer(3 + 7 + 8) ÷ 3 = 6.
  2. A line has gradient 2 and passes through (0, 5). What is y when x = 4?
    Answer13, because 2 × 4 + 5 = 13.
  3. The dots on a scatter graph rise in a narrow band. Name the direction and strength.
    AnswerPositive and strong.
Words used in this lesson
mean point
the point whose coordinates are the mean x and the mean y. For example: (4, 55).
line of best fit
a line through the mean point that follows the trend of the dots. For example: slope 5 through (4, 55).
trend
the general direction in which the dots go. For example: rising.
gap
the vertical distance from a dot to the line. For example: 3 above the line.
squared gap
the gap multiplied by itself, used to judge how well a line fits. For example: 3 × 3 = 9.

Which line?

Eight pupils record hours of revision a week and their test score. Two pupils each draw a line on the same scatter graph, and the lines have different slopes. Before you read on: if both lines must pass through the same special point, what point would you pick, and what would make one line better than the other?

The mean point is (mean x, mean y), made from the mean of all the x values and the mean of all the y values. A line of best fit passes through the mean point and follows the trend of the dots.

Any line through the mean point has gaps above that add to the same total as the gaps below, so the slope is chosen to follow the trend: the squared gaps are then as small as possible.

Turn the line about the mean point. Watch the three totals and find the slope that suits the dots.

3
17total of the gaps above the line
17total of the gaps below the line
188sum of the squared gaps

Slope 3 through the mean point (4, 55): the gaps above total 17, the gaps below total 17, and the squared gaps total 188.

Show me the steps
  1. Slope 3 through (4, 55): the gaps above total 17 and the gaps below total 17. The squared gaps total 188.
  2. Slope 5: the gaps above total 10 and below total 10. The squared gaps total 76, the smallest on offer, so this line follows the trend best.
  3. Slope 8: the gaps above total 26 and below total 26. Still equal, but the line is too steep and the squared gaps total 418.
  4. Slope 2: the gaps are 23 and 23, and the squared gaps total 346. The totals above and below are always equal, so balance alone does not choose the line.

Two slips to watch for. The line need not pass through any dot, and it does not join the first and last dots. And “balanced” means the gap totals match, not that there are equal numbers of dots on each side.

Worked examples

Find the mean point of (2, 5), (4, 9), (6, 10) and (8, 16).

  1. The mean of the x values is (2 + 4 + 6 + 8) ÷ 4 = 20 ÷ 4 = 5.
  2. The mean of the y values is (5 + 9 + 10 + 16) ÷ 4 = 40 ÷ 4 = 10.
  3. The mean point is (5, 10).

Draw a line of best fit for those four dots.

  1. Plot the mean point (5, 10) and ring it.
  2. Lay a ruler through it so that it follows the rise of the dots from bottom left to top right.
  3. Adjust until the dots sit about evenly above and below. A line through (5, 10) with slope 1.5 gives y = 14.5 at x = 8, close to the last dot, (8, 16).

Your go. The first step is given. Find the mean point of (1, 3), (2, 6), (5, 9) and (6, 12).

  1. The x values add to 1 + 2 + 5 + 6 = 14, so the mean x is 14 ÷ 4 = 3.5.
  2. Add the y values and divide by 4.
Check the answer

3 + 6 + 9 + 12 = 30 and 30 ÷ 4 = 7.5, so the mean point is (3.5, 7.5).

Check before you go on

1. Which description of a line of best fit is correct?

Your turn

Start at Level 1 and go as far as you can. Type negative numbers with a minus sign, for example -7. A wrong answer gets a reason, not just a cross: read it, then try again.

Level 1 · Getting started

2. Five pairs (x, y): (2, 14), (4, 18), (6, 19), (8, 25), (10, 29). What is the mean of the x values?

3. For the same five pairs, (2, 14), (4, 18), (6, 19), (8, 25), (10, 29), what is the mean of the y values?

Level 2 · Building

4. A line of best fit has gradient 2 and passes through the mean point (6, 21). What y does the line give at x = 8?

5. A line has gradient 5 and passes through the mean point (4, 55). What y does the line give at x = 1?

6. A line of best fit goes through the mean point of 8 dots. The gaps of the dots above the line add to 14. What do the gaps of the dots below the line add to?

Level 3 · Stretch

7. A line goes through the mean point. Four dots have gaps of 5 above, 3 below, 2 above and 6 below. One more dot completes the data. How far above the line must it be for the gaps to balance?

8. A different data set has three lines through its mean point. Their squared gaps total 140 (slope 1.5), 96 (slope 2) and 118 (slope 2.5). Which slope best follows the trend?

Something to think about

A student draws a line through the first dot and the last dot of a scatter graph. Another draws a line through the mean point that follows the trend. Which is better, and does the first line ever do well?

One way to think about it

The line through the mean point is the safer choice: the gaps above and below balance. The first-and-last line depends on two dots that could both be unusual, so it can sit far from the others. It could do well by luck when both dots happen to lie on the trend.

Exit ticket

9. A line of best fit is drawn through the mean point of a data set. Which statement must be true?