Learn Index · Data Management and Statistics Grade 11–12

Lines of best fit

A straight line drawn close to most of the points on a scatter plot.

Read

Summarizing a trend

A line of best fit is a straight line drawn through a scatter plot to represent the overall trend. It lets you describe the relationship and make predictions.

Drawing by eye

  1. Plot the data.
  2. Draw a straight line that follows the trend.
  3. Aim for about the same number of points above and below the line.
  4. The line doesn’t need to pass through any particular data points.

Writing its equation

Pick two points on your line (not necessarily data points), then:

  1. Find the slope: m = (y₂ − y₁)/(x₂ − x₁)
  2. Find the y-intercept: substitute into y = mx + b.

Example: A line of best fit passes through (2, 15) and (8, 39).

  • m = 24/6 = 4
  • 15 = 4(2) + b → b = 7
  • y = 4x + 7

The median-median line

The median-median line resists outliers:

  1. Order data by x and split into three equal groups.
  2. Find the median x and median y of each group.
  3. Draw a line through the outer two median points, then shift it one-third of the way toward the middle median point.

Least squares line

The most precise line of best fit is the least squares regression line, found with technology. It minimizes the sum of squared residuals.

Interpreting the line

Example: Car age (years) vs value ($): y = −2,500x + 28,000

  • Slope −2,500: the car loses about $2,500 of value per year.
  • y-intercept 28,000: the predicted value when new.

Making predictions

Using y = 4x + 7:

  • At x = 5: y = 27 (interpolation; within the data)
  • At x = 50: y = 207 (extrapolation; risky)

When a line isn’t appropriate

If the scatter plot curves, a straight line of best fit will consistently miss in a pattern. Use a curve of best fit instead.

Worked examples

Example 1: Line through (0, 3) and (4, 11). Equation? m = 2 → y = 2x + 3.

Example 2: Hours worked vs pay: y = 16.5x. Meaning of the slope? $16.50 per hour.

Example 3: A line of best fit for plant growth is h = 1.2t + 5 (cm, weeks). Predict at 10 weeks. 17 cm.

Common mistakes

  • Joining the first and last points instead of following the overall trend.
  • Forcing the line through the origin.
  • Using a line for curved data.

Try it yourself

  1. A line passes through (1, 10) and (5, 2). Find its equation.
  2. Interpret the slope of y = −0.4x + 30 where x is minutes and y is °C.
  3. Predict y at x = 12 for y = 3x − 4.
  4. Why might predictions far beyond the data be unreliable?

Answers: 1) y = −2x + 12 2) The temperature drops 0.4 °C per minute. 3) 32 4) The trend may not continue.

Quick recap

  • A line of best fit summarizes the trend in a scatter plot.
  • Find its slope and y-intercept from two points on the line.
  • Use it for careful predictions, mostly within the data range.