Sign In
Understanding the line of best fit is crucial for predicting and modeling data sets. This lesson delves into how to determine the linear function that best represents a scatter plot or data set. By analyzing various examples, learners can grasp the importance of linear correlation and how it impacts the accuracy of predictions. The stronger the correlation, the more precise the predictions are likely to be. Tools like graphing calculators play a pivotal role in this process, aiding in the creation and interpretation of best fit lines. Through this lesson, students can gain a comprehensive view of how to use these lines effectively for predictions, especially when data exhibits a strong linear correlation.
Show less Show more expand_more| Student Learning Objectives: |
|---|
|
| | 8 Theory slides |
| | 10 Exercises - Grade E - A |
| | Each lesson is meant to take 1-2 classroom sessions |
Given a scatter plot, a line of fit can be used to make good predictions of values that are not known. Since there are many possible lines of fit, finding the one that most accurately represents the given data points is an important goal. The goal is finding the line of fit in which the different sums of the residuals is as close to 0 as possible.
A line of best fit, also known as a regression line, is a line of fit that estimates the relationship between the values of a data set. The equation of the line of best fit has been determined using a strict mathematical method.
One commonly used method to determine a line of best fit is the method of least squares. The methods used to find the line of best fit are usually hard to do by hand. Therefore, a line of best fit can be found by performing a linear regression on a graphing calculator. As an example, consider the data set graphed above.
| x | y |
|---|---|
| 0.6 | 1.5 |
| 1.2 | 3.6 |
| 2.6 | 5.2 |
| 3.6 | 6.3 |
| 4.5 | 8.7 |
| 6 | 10.3 |
| 6.6 | 11.8 |
| 7.1 | 11.7 |
For a school project, Ramsha wants to investigate if there is a correlation between the width of a tree and its height. To do so, she measured the diameter at chest height and the height of some trees in a local park. Her findings are shown in the following table.
| Diameter at chest (cm) | Height (m) |
|---|---|
| 8 | 7 |
| 10 | 10 |
| 15 | 14 |
| 18 | 15 |
| 20 | 18 |
| 22 | 21 |
| 25 | 15 |
| 30 | 20 |
What is the equation of the line of best fit using linear regression? Round the values in the equation to two decimal places.
What is the correlation coefficient? Round the value to two decimal places. Are the data correlated?
Graph the data points and the line of best fit.
Write an interpretation of the y-intercept and the slope.
y = 0.55x + 4.74
Correlation Coefficient: r≈ 0.86
Are the Data Correlated? Yes, see solution.
Graph:
See solution.
Use the linear regression feature on a graphing calculator.
The correlation coefficient is r in the linear regression output on a graphing calculator.
Use the graphing features on a graphing calculator.
What do these measures indicate in a line?
The line of best fit can be found using a graphing calculator. First, the data values need to be introduced into the calculator. This is done by pressing the STAT button and then selecting the option Edit.
Then the data values are written in the columns.
By pressing the STAT button and then selecting the CALC menu, the option LinReg(ax+b)
can be found. This option gives the line of best fit, expressed as a linear function in slope-intercept form.
Rounding the values of a and b to two decimal places, the equation of the line of best fit can be written as follows. y = 0.55x + 4.74
The correlation coefficient can be found on the linear regression results screen from Part A.
The correlation coefficient is the value of r on the screen. r ≈ 0.86 The value of r varies from -1 to 1. A value close to -1 indicates a negative correlation, while a value close to 1 indicates a positive correlation. Since the correlation coefficient is close to 1, the data has a strong positive correlation.
To graph the line of best fit, first press Y= and write the equation of the line of best fit.
Then, to graph the scatter plot push the buttons 2nd and Y=. Choose one of the plots in the list. Select the option ON,
choose the type to be a scatter plot, and assign L_1 and L_2 as XList
and Ylist,
respectively.
The plot can be made by pressing the button GRAPH. It is possible that after drawing the plot the window-size is not adequate for seeing all the information.
To fix this press ZOOM and select the option ZoomStat.
After doing so the window will resize to show the important information.
In Part A the equation for the line of best fit was found.
y = 0.55x + 4.74 In this equation, the slope is 0.55 and the y-intercept is 4.74.
Use the linear regression feature of a graphing calculator to find the equation of the line of best fit for the given data set. Compare the obtained equation with the equations shown in the applet, and choose the closest one.
The following table displays some values of atmospheric pressures at different altitudes.
| Altitude (thousand feet) | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| Pressure (PSI) | 14.71 | 14.18 | 13.75 | 13.21 | 12.69 | 12.20 |
Use linear regression to determine the equation of the line of best fit. Round the values in the equation to two decimal places.
What is the correlation coefficient? Round the answer to two decimal places. Is the data correlated?
Draw a graph of the data points and the line of best fit in the same viewing window.
Interpret the slope and the y-intercept of the equation of the line of best fit.
Make a prediction for the pressure at 6000 feet. Is this a good prediction?
y = -0.50x + 14.71
Correlation Coefficient: r ≈ - 1
Is the Data Correlated? Yes, because the correlation coefficient is really close to -1.
Graph
See solution.
Prediction: About 11.7 PSI
Is This a Good Prediction? Yes, see solution.
Use the linear regression feature on a graphing calculator.
The correlation coefficient is r in the linear regression output on a graphing calculator.
Use the graphing features on a graphing calculator.
What do these measures indicate in a line?
Are the data values close to the line of best fit? Does this indicate something?
The line of best fit can be found using a graphing calculator. First, the data values need to be introduced into the calculator. This is done by pressing the STAT button and selecting the option Edit.
Then the data values can be written in the columns.
Finally, by pressing the STAT button and then selecting the menu item CALC, the option LinReg(ax+b)
can be found. This option gives a line of best fit, expressed as a linear function in slope-intercept form.
Rounding to two decimal places, the equation for the line of best fit using linear regression can be written as follows. y = -0.50x + 14.71
The correlation coefficient can be found on the linear regression results screen from Part A.
The correlation coefficient is the value of r on the screen. r = - 0.999673... The value of r varies from -1 to 1. A value close to -1 indicates a negative correlation, while a value close to 1 indicates a positive correlation. Since the value is almost -1, the data have a very strong negative correlation.
To graph the line of best fit, first press Y= and write the equation of the line of best fit.
To graph the scatter plot, first push the buttons 2nd and Y=. Then, choose one of the plots in the list. Select the option ON,
choose the type to be a scatter plot, and assign L_1 and L_2 as XList
and Ylist,
respectively.
The plot can be made by pressing the button GRAPH. It is possible that after drawing the plot the window-size is not large enough to see all of the information.
To fix this, press ZOOM and select the option ZoomStat.
After doing that, the window will resize to show the important information.
In Part A the equation for the line of best fit was found.
y = - 0.50x + 14.71 In this equation, the slope is - 0.50 and the y-intercept is 14.71.
A graphing calculator can also be used to make predictions. To do so, first the window size should be changed to fit the prediction. Since the x-value is given in thousands of feet, the value that should be included for 6000 feet is x=6. To change the window size, press WINDOW.
To find the value of y when x=6, press CALC (2ND and TRACE). Then press ENTER to insert the value of 6 for x. Finally, press ENTER again.
The value of the pressure at 6000 feet is about 11.7 PSI. Since all the data values are close to the line of best fit and the data is strongly correlated, it can be said that this is a good approximation of the actual value.
This prediction can also be found by substituting 6 for x into the equation for the line of best fit.
Davontay has a math assignment that consists of eight different exercises. He registered the time (in minutes) in which he completed the first seven exercises.
| Exercise | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|
| Time (minutes) | 4 | 15 | 7 | 16 | 8 | 15 | 5 |
What is the equation for the line of best fit using linear regression? Round the values to two decimal places.
What is the correlation coefficient? Round the answer to two decimal places. Are the data correlated?
Draw a graph of the data points and the line of best fit in the same viewing window.
Interpret the slope and the y-intercept of the equation of the line of best fit.
Find a prediction for the for the time it will take Davontay to complete the eighth exercise. Is it a good prediction?
y = 0.14x + 9.43
Correlation Coefficient: r ≈ 0.06
Are the Data Correlated? No, see solution.
Graph:
See solution.
Prediction: About 10.57 minutes
Is It a Good Prediction? No, see solution.
Use the linear regression feature on a graphing calculator or computer.
The correlation coefficient is r in the linear regression output on a graphing calculator.
Use the graphing features on a graphing calculator.
What do these measures indicate in a line?
Are the data values close to the line of best fit? Does this indicate something?
The line of best fit can be found using a graphing calculator. First, the data values need to be introduced into the calculator. This is done by pressing the STAT button and then selecting the option Edit.
The data values can be written in the columns.
Finally, by pressing the STAT button and then selecting the menu item CALC, the option LinReg(ax+b)
can be found. This option gives a line of best fit, expressed as a linear function in slope-intercept form.
Rounding to two decimal places, the equation for the line of best fit using linear regression can be written as follows. y = 0.14x + 9.43 It should be noted that in this equation x is the number of the exercise and y is the time in minutes in which Davontay completed that exercise.
The correlation coefficient can be found on the linear regression results screen from Part A.
The correlation coefficient is the value of r on the screen. r = 0.059761... The value of r varies from -1 to 1. A value close to -1 indicates a negative correlation, while a value close to 1 indicates a positive correlation. But the value of r is close to 0, this means that the data have no correlation.
To graph the line of best fit, first press Y= and write the equation of the line of best fit.
To graph the scatter plot, first push the buttons 2nd and Y=. Then, choose one of the plots in the list. Select the option ON,
choose the type to be a scatter plot, and assign L_1 and L_2 as XList
and Ylist,
respectively.
The plot can be made by pressing the button GRAPH. It is possible that after drawing the plot the window-size is not large enough to see all of the information.
To fix this, press ZOOM and select the option ZoomStat.
After doing that, the window will resize to show the important information.
Looking at the graph, it can be seen that the line of best fit is not close to any of the provided data points.
In Part A the equation for the line of best fit was found.
y = 0.14x + 9.43 In this equation, the slope is 0.14 and the y-intercept is 9.43.
From Part C it can be noted that the line is not representative of the given data points. This means that these measures do not reflect the reality of the exercises.
A graphing calculator can also be used to make predictions. To do so, first the window size should be changed to fit the prediction value of x=8. To change the window size, press WINDOW.
Then, to find the value of y when x=8, press CALC (2ND and TRACE). Then press ENTER to insert the value of 8 for x. Finally, press ENTER again.
The value of y when x=8 is about 10.57. This means that Davontay will finish the eighth exercise in less than 11 minutes. Since none of the given data values are really close to the line of best fit and the data is not correlated, it can be said that this is a not good approximation for the actual value.
This prediction can also be found by substituting 8 for x into the equation for the line of best fit.
In this lesson it was shown how to find the line of best fit for data sets and how to make predictions using these lines. Considering the examples discussed throughout the lesson, it is possible to make two conclusions.
The table shows some data for two variables.
| x | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| y | 1 | 3 | 3 | 2 | 4 | 3 | 2.5 | 5 |
Find the line of best fit for the data and round the values to two decimal places.
We have been given a table with data for x and y.
| x | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| y | 1 | 3 | 3 | 2 | 4 | 3 | 2.5 | 5 |
In finding the line of line of fit using our calculator, we will begin by entering the values. Let's press the STAT button.
Then we will choose the first option in the menu, Edit,
and fill in the values from the lists L1 and L2.
We can perform a regression analysis on the data by pressing the STAT button again, followed by using the right-arrow key to select the CALC menu.
This menu lists the various regressions that are available. If we choose the fourth option in the menu LinReg(ax+b)
and press ENTER, the calculator performs a linear regression using the data that was entered.
Just before completing the process, we can round the values of a and b, then substitute them into the equation y= ax+ b. This gives us the equation for the line of best fit. y= 0.33x+ 1.46 We can see how the line fits with the data by plotting the data points and graphing the line on the same coordinate plane.
| x | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| y | 1 | -4 | -2 | -5 | -4 | -9 | -8 | -11 |
We have been given a table with data for x and y.
| x | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| y | 1 | -4 | -2 | -5 | -4 | -9 | -8 | -11 |
In order to find a line of fit using our calculator, we need to first enter the values. Let's press the STAT button.
We will then choose the first option in the menu, Edit,
and fill in the values in the lists L1 and L2.
We can perform a regression analysis about the data by pressing the STAT button again, followed by using the right-arrow key to select the CALC menu.
This menu lists the various regressions that are available. If we choose the fourth option in the menu LinReg(ax+b)
and press ENTER, the calculator performs a linear regression using the data that was entered.
The correlation coefficient is the value of r displayed on the output screen. Finally, by rounding the value we get that the correlation coefficient r is about -0.92.
We found the correlation coefficient in the previous part. r ≈ - 0.92 Since the value of the correlation coefficient is negative, the data values have a negative correlation. Also importantly, the correlation coefficient is really close to -1. Thanks to that fact, the data have a strong negative correlation.
When doing homework, Maya obtained the following display on her graphing calculator.
Maya thinks that the data have a correlation coefficient of 0.997945..., and therefore, have a strong positive correlation coefficient. Which of the following was Maya's mistake?
Let's begin by looking at the given display screen.
The correlation coefficient is the value of r on the display screen. Looking at the display, we can see that the correlation coefficient is r=- 0.998972... Therefore, the data have a strong negative correlation. The mistake was that Maya interchanged r with r^2. r = - 0.998972 ... ⇓ Strong Negative Correlation On the other hand, if the correlation coefficient were 0.997945, it would mean that the data have a strong positive correlation. Therefore, Maya's interpretation was correct but that value was not the correlation coefficient.
Consider the following display of a graphing calculator.
Tearrik says that the equation for the line of best fit is y = 25.32x + 7.19. Select Tearrik's mistake.
We are asked to find and correct the error that Tearrik made. We will first create the line of best fit ourselves. Then we will describe the error.
Let's consider the graphing calculator display.
We will substitute the values of a and b into the equation y= ax+ b to find the equation of the line of best fit. y= 7.19x+ 25.32
The written equation has interchanged the values of a and b. According to the display, we have a= 7.19 and b= 25.32. The coefficient of x should be 7.19 and the constant 25.32.
Ali wants to gain a better understanding of how the company did in the past and how that is relevant to the future. The table indicates the sales of Daytas from 2010 to 2015.
| Year | 2010 | 2011 | 2012 | 2013 | 2014 | 2015 |
|---|---|---|---|---|---|---|
| Sales (Thousands of Sunglasses) | 4.42 | 5.4 | 8.7 | 13.2 | 15.4 | 19.3 |
We have been given a table that shows the sales of sunglasses.
| Year | 2010 | 2011 | 2012 | 2013 | 2014 | 2015 |
|---|---|---|---|---|---|---|
| Sales (Thousands of Sunglasses) | 4.42 | 5.4 | 8.7 | 13.2 | 15.4 | 19.3 |
In order to find a line of fit using our graphing calculator, we will first enter the values. Let's going and press the STAT button.
Then we choose the first option in the menu, Edit,
and fill in the values in lists L1 and L2.
We can perform a regression analysis about the data by pressing the STAT button again, followed by using the right-arrow key to select the CALC menu.
This menu lists the various regressions that are available. If we choose the fourth option in the menu LinReg(ax+b)
and press ENTER, the calculator performs a linear regression using the data that was entered.
We will substitute the rounded values of a and b into the equation y= ax+ b to find the equation of the line of best fit. y= 3.11x -6250.68
To find the sales of the year 2025, we will substitute 2025 for x in the equation of the line of best fit found previously.
Therefore, Ali can expect to sale about 47.07 thousand sunglasses in 2025.
| Mileage, x | 23 | 15 | 19 | 31 | 9 | 25 |
|---|---|---|---|---|---|---|
| Price, y | 11 | 12 | 13 | 10 | 13 | 12 |
We have been given a table with the car's price for different mileages.
| Mileage, x | 23 | 15 | 19 | 31 | 9 | 25 |
|---|---|---|---|---|---|---|
| Price, y | 11 | 12 | 13 | 10 | 13 | 12 |
In order to find a line of fit using our calculator, we need to first enter the values. Let's press the STAT button.
Then we choose the first option in the menu, Edit,
and fill in the values in lists L1 and L2.
We can perform a regression analysis on the data by pressing the STAT button again, followed by using the right-arrow key to select the CALC menu.
This menu lists the various regressions that are available. If we choose the fourth option in the menu LinReg(ax+b)
and press ENTER, the calculator performs a linear regression using the data that was entered.
We will substitute the rounded values of a and b into the equation y= ax+ b to find the equation of the line of best fit. y= - 0.12x+ 14.31
The correlation coefficient is the value of r in the linear regression output.
Looking at the screen, we can find and round this value. r ≈ - 0.81
The correlation coefficient r is always between -1≤ r≤ 1, where positive values represent a positive correlation and negative values represent a negative correlation. Additionally, a value close to 0 represents a weak correlation. Therefore, with our value of -0.81 we can say that the data have a strong negative correlation.