
Linear Regression is a process by which the formula of a line of "best fit" is found for a set of data. Consider the data set shown below:
| x | 0 | 1 | 2 | 3 | 5 |
| y | 3 | 4 | 8 | 9 | 10 |
Before finding the linear regression, first set an appropriate viewing rectangle. For this example use the Viewing Rectangle [-1, 6,1] by [0, 15, 1] so that all the data points will be clearly visible on the screen. Then make a scatterplot of the data values. The Viewing Rectangle and scatterplot are shown below:
![]() | ![]() |
To find the Linear Regression, press STAT, then RIGHT ARROW to CALC. Select 4:LinReg(ax+b). After LinReg(ax+b) appears alone on the screen, press ENTER. Then the result will appear on the screen.
![]() | ![]() |
![]() | ![]() |
|
|
To visually inspect the results, enter the equation in
while leaving PLOT1 on. Then press GRAPH to see how well the line fits the data points.
NOTE:
The regression results may be copied directly into
for graphing using the following procedure:
After the data values have been entered, press STAT, then RIGHT ARROW to CALC. Select 4:LinReg(ax+b).
![]() | ![]() | ![]() |
To copy the regression equation directly
into
, after LinReg(ax+b) appears alone
on the screen, press VARS, then ARROW RIGHT
to Y-VARS, noting 1:Function is selected.
Press ENTER and note that 1:
is already selected. Press ENTER again. Press ENTER to calculate. The result
appears on the screen.
![]() | ![]() | ![]() |
![]() | ![]() |
|
Now
press
to see that the equation has been entered for
. Press GRAPH and the line appears on the screen as shown below.
![]() | ![]() |
This is the preferred method for entering the
regression equation into
since rounding the values can introduce significant rounding errors.
© 2001-2007, Macon State College. All rights reserved.