back

Linear Regression

Navigating the Process.

  1. Clearing Your Lists.
  2. Clearing your Y=.
  3. Entering Your Data.
  4. Setting up STAT PLOT.
  5. To Select Which STAT PLOT to Graph.
  6. Plotting L1 vs. L2.
  7. ***Linear Regression.
  8. Residuals.
  9. Error Bounds.

Our goal is to fit a line to the data set below:

To do this, press STAT.  Then press the right arrow to select CALC.  Your screen should look like:

Select option 4, LinReg (ax+b).  LinReg is short for linear regression.  Also note that option 8 is virtually identical to option 4.  This will return you to the home screen:

Type "L1,L2,Y1"  To get L1 type 2nd and then 1, to get L2 type 2nd and then 2.  To get Y1, type VARS.  This gives the screen:

Right arrow over to Y-VARS.  This gives:

Select option 1, Function.  This gives:

Select option 1, Y1.  This returns you to a home screen like:

(ignore the black box).

Now press enter.  After a second it will return the screen:

The a=1.01755752 and the b=-1.309866458 are the "a" and "b" in the formula y=ax+b.

Now, go to the Y=.  You should get a screen like:

When you typed the command LinReg(ax+b) L1,L2,Y1, the "Y1" told LinReg to paste the resulting function into Y1.  If you leave off the Y1 in the formula, it will still work, however you won't have the nice record of your actions in Y1.

Now press GRAPH to see the results:

Here you can see the data set plotted along with the linear regression line.  The calculation to find the linear regression line is VERY complicated and is almost impossible to do without a calculator or computer.  However, understanding it isn't that hard, so I will try to explain it when I get some time.

You might think that we are done, but we aren't.  We haven't yet looked at the residuals - that is, the error.

Navigating the Process.

  1. Clearing Your Lists.
  2. Clearing your Y=.
  3. Entering Your Data.
  4. Setting up STAT PLOT.
  5. To Select Which STAT PLOT to Graph.
  6. Plotting L1 vs. L2.
  7. ***Linear Regression.
  8. Residuals.
  9. Error Bounds.

 

Dusty Wilson
Mathematics Instructor
Highline Community College
the home page of ... Dusty Wilson

  last modified September 05, 2007