Math Detours · Grade 8 · Sharpen · 12

Scatter plots and the line of best fit

Draw the trend, read the slope as a rate, and see what one outlier does to the line.

Name ____________________Date ____________

Tonight's idea

A scatter plot shows two measurements per individual as one dot: here, each day's temperature and ice-cream sales. Dots rising to the right show a positive association; falling, a negative one; a shapeless cloud, none. The closer the dots hug a line, the stronger it is.

202530°C 60100140 cones outlier
Solid: the best line through the six blue days. Dashed: the line once the orange day joins in.

A line of best fit runs through the middle of the cloud, about as many dots above as below. By eye is fine. The computer's version, least squares, makes the squared vertical gaps as small as possible and always passes through \((\bar x, \bar y)\), the point of means.

Read the slope as a rate: cones per degree, centimetres per year. Read the intercept with suspicion: \(x = 0\) is often far outside the data.

An outlier is a dot far from the pattern. It drags the line toward itself, hardest at either end of the \(x\) range, where it acts as a lever. And a trend is not a cause: ice cream and sunburn rise together because of the sun, not each other.

Watch one: reading the figure

Cover the orange dot. The solid line passes close to \((18, 62)\) and \((30, 140)\), so its slope is about \(\frac{140 - 62}{30 - 18} = \frac{78}{12} = 6.5\) cones per degree.

A forecast of 25° is 7 degrees above 18°: expect about \(62 + 6.5 \times 7 \approx 108\) cones. Now let the orange day back in: 32° but only 70 cones (it rained). The dashed slope is about 4.1: one day at the hot end cut the rate by a third. And do not use either line at 45°: nobody measured there.

Load the example data, add an outlier and watch the line swing: mathdetours.com/demos/regression.html.

Your turn

  1. For each pair, do you expect a positive, negative or no association, and strong or weak? (a) a car's age and its resale price; (b) a student's height and birth month; (c) a book's page count and its weight.
  2. Five students practised a puzzle for different hours a week, then were timed on it in minutes:
    hours \(x\)12345
    minutes \(y\)201715119
    Plot the points, draw a line of best fit by eye, and estimate its slope and intercept. What does the slope mean in words?
  3. For children aged 5 to 12, a best-fit line for height \(h\) in cm against age \(a\) in years is \(h = 80 + 6a\). (a) What does the 6 mean? (b) Predict the height of a 9-year-old. (c) What does it say about a 30-year-old, and why is that wrong?
  4. A sixth student joins the data in question 2: 5 hours of practice, 25 minutes. (a) Without calculating, does the line get steeper or flatter? (b) Find the new mean point \((\bar x, \bar y)\), which the line must pass through. (c) If instead the sixth student had practised 3 hours and taken 25 minutes, why would the slope not change, only the height of the line?

Stretch: the computer's recipe

The least-squares slope is

\[m = \frac{\sum (x - \bar x)(y - \bar y)}{\sum (x - \bar x)^2},\]

with \(\bar x\), \(\bar y\) the means and \(\sum\) meaning "add up over all the points". Compute \(m\) for question 2's five students, then the intercept from the line passing through \((\bar x, \bar y)\). How close was your eye?

Answers

  1. (a) Negative, fairly strong. (b) None: birth month has nothing to do with height. (c) Positive and strong, though paper thickness and cover add some scatter.
  2. Any sensible line slopes down at roughly \(-2.5\) to \(-3\) minutes per hour, crossing the \(y\)-axis near 22 or 23. The slope means: each extra hour of weekly practice is linked with about 3 minutes less on the puzzle. The least-squares answer is \(m = -2.8\), intercept 22.8.
  3. (a) Children in this group grow about 6 cm per year on average. (b) \(80 + 54 = 134\) cm. (c) \(80 + 180 = 260\) cm. Growth stops in the late teens; the line was fitted to ages 5 to 12 and says nothing beyond them. This is extrapolation, and the world-records sheet shows where it leads.
  4. (a) Flatter: the new dot is far above the line at the right-hand end, so it lifts that end. (b) \(\bar x = 20/6 = 3\tfrac13\), \(\bar y = 97/6 \approx 16.2\). (c) A dot at \(x = 3\) sits exactly above the middle of the \(x\) values, so it lifts the line without pushing either end up more than the other: the slope stays \(-2.8\) and the line moves up. (The new slope in (a) is about \(-0.8\).)

Stretch. \(\bar x = 3\), \(\bar y = 14.4\). The products \((x - 3)(y - 14.4)\) are \(-11.2, -2.6, 0, -3.4, -10.8\), summing to \(-28\). The squares \((x-3)^2\) are \(4, 1, 0, 1, 4\), summing to 10. So \(m = -2.8\). Through \((3, 14.4)\): intercept \(14.4 + 2.8 \times 3 = 22.8\), so \(y = 22.8 - 2.8x\).

← PreviousNext: Up 20%, down 20% →