LinReg on the TI 83/84 calculators
|<< prev chpt||next chpt >>|
1 Linear regression
Often we have a set of points that is approximately linear, and we would like to describe the relationship between the two variables using a line. Linear regression, or least squares fit, is the most common way to find this line. This line is often called the line of best fit. Fortunately, this is built into our calculators, and this page will show you how to do it!
The next section illustrates the steps using calculator images. Click on the calculator image to enlarge the picture.
You might also glance at the graph below which uses Geogebra to illustrate what the best fit line is--you can move any point and see the line adjust with the point you moved.
2 The steps on a TI83 or TI84
The first step is to find the STAT key (second row, third from the left). Click on the image to see a larger view of the calculator keys if you have trouble finding the key. Press the STAT key.
When you press STAT, you will get a menu across the top:
EDIT will be highlighted, so just press ENTER. Now you need to enter your data. Usually we put the x-values in L1 (list one) and the y-values in L2 (list two). Click on the image to see an example showing how these points would be entered:
(If your edit screen is missing L1 or L2, then see common calculator problems.)
Now press the STAT key again but this time use the right arrow key to move to the middle menu CALC and press ENTER. That will give us the menu in the calculator image on the right. We want the fourth item: LinReg(ax+b), so either use the down arrow to get to it and press ENTER or just press 4. If your data is in L1 and L2, just press ENTER and skip step 4.
If your data is not in L1 and L2, you must tell the calculator where the data is. Do this by finding the correct entries above the number keys. If your x-values are in L3 you would press the 2nd key followed by 3. Follow the location of the x-values with a comma and then tell the calculator where your y-values are stored. These keys are shown in the image on the right for the location of our data in L1 and L2.
Once we press enter, the calculator gives us the equation of the regression line. In this case it is approximately
Write that down (use the number of significant digits your teacher specifies). The value of r and r2 gives us a way of judging how well the points fit the line. If your calculator does not display r and r2, see common calculator problems.
If you press the "Y=" button, then you may graph the equation. You can also use StatPlot to graph the points which are shown in the image on the right. To find out how to do this see scatter plots on the TI calculators. Otherwise, graph the points and the line by hand (This is likely the way you will have to do this on a test or homework).
3 A GeoGebra illustration
Move any point (say the green one) around and see how the regression line moves. This shows the equation of the line and the values of the correlation coefficient r (in red). The number r is a measure of how well the line fits the points. Both 1 and -1 are the best possible, 0 is the worst.
Please install Java to use this page.
Let's step through an example together.
(a) Find the equation of the line of best fit for the points (12, 17), (17, 28), (22, 35), (28, 52), and (45, 72). (b) Graph these points and the line of best fit on your calculator.
Step 1: Enter the points in your calculator.
Step 2: Do the linear regression.
Go to Stat, Calc, LinReg(ax+b), hit Enter and tell the calculator where your x and y values are stored.
Step 3: Enter the line of best fit as Y1.
Step 4: Set up the StatPlot.
Step 5: Graph the points and the line.
5 Additional Examples
Try the following examples yourself. Mouse over the blackened rectangles to check your answer. Round all answers to the nearest thousandth.
|Data Points||r||Line of Best Fit|
| ||0.998||y = 1.443x + 8.836|
|(50,230), (100,180), (150,162), (200,107), (250,94), (300,35)||0.989||y = -0.736x + 263.467|