topic badge

5.09 Fitted functions

Lesson

Concept summary

A line of best fit or regression line both refer to a linear regression model that best represents the data on a scatter plot. Depending on the strength of the association, measured with the coefficient of determination (r^2), a regression function may pass exactly through all of the points, some of the points, or none of the points. However, it always represents the general trend of the data.

Lines of best fit are really handy as we can use them to help us make predictions or conclusions about the data.

Coefficient of determination

A measurement used to explain how much the variability of one quantity can be explained by its relationship to another quantity.

The correlation coefficent, r, can be calculated with technology to describe the strength of the line of best fit. To approximate a line of best fit by eye, balance the number of points above the line with the number of points below the line. You should generally ignore outliers as they can skew the line of best fit.

Below are examples of what a good line of best fit might look like.

0.1
0.2
0.3
0.4
0.5
x
10000
20000
30000
40000
50000
y
Linear regression r^2=0.801
5
10
15
20
25
x
20
40
60
80
100
120
y
Linear regression r^2=0.868

Worked examples

Example 1

During an alcohol education program, 10 adults were offered up to 6 drinks and were then given a simulated driving test where they were scored out of a possible 100 points.

Number of drinks3264416342
Driving score64594257587233635562
a

Describe the association between number of drinks and driving score.

Approach

Construct a scatterplot to get a visual of the data.

1
2
3
4
5
6
\text{Drinks}
10
20
30
40
50
60
70
80
90
\text{Score }

Then consider the form, strength, and direction.

Solution

The data appears to have a strong, negative, linear association.

b

Use technology to calculate the correlation coefficient and line of best fit.

Approach

  1. Enter the x- and y-values in two separate columns:
  2. Highlight the data and select \text{Two Variable Regression Analysis}:

  3. Select \text{Show Statistics} to see the correlation coefficient, r:

  4. Choose \text{Linear} under the \text{Regression Model} drop down menu to find the line of best fit:

Solution

The correlation coefficient is r=-0.9115 and the equation of the line of best fit is y=-6.22x+78

c

Interpret the meaning of the slope and y-intercept of the line of best fit in context of the data.

Approach

From part (b) we know that the equation of the line of best fit is y=-6.22x+78 which tells us the slope is -6.22 and the y-intercept is 78.

Solution

The slope of -6.22 represents the driving score dropping by 6.22 points for every extra drink consumed.

The y-intercept tells us that an adult with 0 drinks has a predicted score of 78 according to the linear model.

Reflection

Matching the slope and the y-intercept to their respective units is a good strategy for interpreting their meaning in context. \text{slope}=\dfrac{\text{rise}}{\text{run}}=\dfrac{-6.22}{1}

The quantity on the y-axis represents the "rise" and the quantity on the x-axis represents the "run". So the slope represents negative 6.22 score for every 1 drink.

The y-intercept can be written as an ordered pair \left(x,y\right)=\left(0,78\right) where x is the number of drinks and y is the score on the driving test.

Outcomes

M1.N.Q.A.1

Use units as a way to understand real-world problems.*

M1.N.Q.A.1.A

Choose and interpret the scale and the origin in graphs and data displays.*

M1.N.Q.A.1.C

Define and justify appropriate quantities within a context for the purpose of modeling.*

M1.S.ID.A.1

Represent data from two quantitative variables on a scatter plot, and describe how the variables are related. Fit a function to the data; use functions fitted to data to solve problems in the context of the data.*

M1.S.ID.B.2

Interpret the rate of change and the constant term of a linear model in the context of data.*

M1.S.ID.B.3

Use technology to compute the correlation coefficient of a linear model; interpret the correlation coefficient in the context of the data.*

M1.MP2

Reason abstractly and quantitatively.

M1.MP3

Construct viable arguments and critique the reasoning of others.

M1.MP4

Model with mathematics.

M1.MP5

Use appropriate tools strategically.

M1.MP6

Attend to precision.

M1.MP7

Look for and make use of structure.

M1.MP8

Look for and express regularity in repeated reasoning.

What is Mathspace

About Mathspace