topic badge
CanadaON
Grade 12

Line of Best Fit - Calculating

Lesson

In Does this Fit?, we looked at how to identify a line of best fit. A line of best fit  (or "trend" line) is a straight line that best represents the data on a scatter plot. This line may pass through some of the points, none of the points, or all of the points. In this chapter, we are going to look at how to calculate the equation of a given line of best fit.

To calculate the equation of a given line of best fit, we need to be able to calculate:

  • slope: $m=\frac{y_2-y_1}{x_2-x_1}$m=y2y1x2x1
  • y-intercept/ constant term: this is the $b$b term in $y=mx+b$y=mx+b

Once you can identify these features, you can use them to make conclusions and predictions about the data.

Remember!

There are different ways to calculate the equation of a straight line. These include:

  • slope-intercept form: $y=mx+b$y=mx+b, where $m$m is the slope and $b$b is the y-intercept
  • two point form: $\frac{y-y_1}{x-x_1}=\frac{y_2-y_1}{x_2-x_1}$yy1xx1=y2y1x2x1
  • point-slope form: $y-y_1=m\left(x-x_1\right)$yy1=m(xx1)

Read over Find that Line if you need more info on how to use different formulas.

Since lines of best fit are used in real statistical analyses, graphing them is similar to other linear models that we looked at earlier.

Worked Examples

Question 1

The equation for the line of best fit is given by $P=-4t+116$P=4t+116, where $t$t is time.

This relationship shows that over time, $P$P is:

  1. remaining constant

    A

    decreasing

    B

    increasing

    C

QUESTION 2

A car company looked at the relationship between how much it had spent on advertising and the amount of sales each month over several months. The data has been plotted on the scatter graph and a line of best fit drawn. Two points on the line are $\left(3200,300\right)$(3200,300) and $\left(5600,450\right)$(5600,450).

Loading Graph...

  1. Using the two given points, what is the slope of the line of best fit?

  2. The line of best fit can be written in the form $S=\frac{1}{16}A+b$S=116A+b, where $S$S is the value of Sales in thousands of dollars and $A$A is advertising expenditure.

    Determine the value of $b$b, the vertical intercept of the line.

  3. Use the line of best fit to estimate the number of sales next month (in dollars) if $\$4800$$4800 is to be spent on advertising.

QUESTION 3

The table shows the number of people who went to watch a movie $x$x weeks after it was released.

Weeks ($x$x) $1$1 $2$2 $3$3 $4$4 $5$5 $6$6 $7$7
Number of people ($y$y) $17$17 $17$17 $13$13 $13$13 $9$9 $9$9 $5$5
  1. Plot the points from the table.

    Loading Graph...

  2. If a line of best fit were drawn to approximate the relationship, which of the following could be its equation?

    $y=-2x+20$y=2x+20

    A

    $y=2x+20$y=2x+20

    B

    $y=-2x$y=2x

    C

    $y=2x$y=2x

    D
  3. Graph the line of best fit whose equation is given by $y=-2x+20$y=2x+20.

    Loading Graph...

  4. Use the equation of the line of best fit to find the number of people who went to watch the movie $10$10 weeks after it was released.

Outcomes

12C.D.1.5

Determine an algebraic summary of the relationship between two variables that appear to be linearly related, using a variety of tools and strategies, and solve related problems (e.g., use the equation of the line of best fit to interpolate or extrapolate from the given data set)

What is Mathspace

About Mathspace