
Technology: Regression and Correlation
Let's use the TI-84 to perform the computations related to regression and correlation for the size and 2007 assessed value data from the property tax data set:
house | size | assess | lot | taxes | stories |
20911 | 1561 | 304 | 0.2 | 2604 | 1 |
20912 | 1038 | 297.6 | 0.2 | 280 | 1 |
20918 | 1224 | 289.5 | 0.17 | 2353 | 1 |
20921 | 1232 | 292.8 | 0.17 | 756 | 1 |
20924 | 1995 | 314.6 | 0.17 | 2620 | 2 |
20927 | 1714 | 322.7 | 0.18 | 2632 | 1 |
20930 | 1832 | 336.1 | 0.18 | 2779 | 2 |
21003 | 1095 | 279 | 0.18 | 2321 | 1 |
21006 | 2011 | 319.5 | 0.18 | 2663 | 2 |
21015 | 1366 | 289.3 | 0.18 | 2415 | 1 |
21018 | 1292 | 301.4 | 0.18 | 2477 | 1 |
21023 | 1458 | 314.3 | 0.18 | 1386 | 1 |
21028 | 2031 | 320.9 | 0.18 | 2676 | 2 |
21105 | 1366 | 304 | 0.18 | 2473 | 1 |
First, enter the data into two lists; here I'll use L1 for size and L2 for assessed value:
just like we did when creating a scatterplot:
In the scatterplot, we see a reasonably linear association between size and assessed value, with no noticeable outliers so it is appropriate to find a regression line and compute correlation. You should always check a scatterplot first before doing any computations.
After graphing the scatterplot, QUIT the graphing mode (press 2ND and MODE) and then press STAT, move the cursor to CALC and move the cursor down to 8:LinReg(a+bx):
press ENTER, then type L1 followed by , (a comma) and then L2:
Now press ENTER. You should get a screen that looks like this:
You should notice the regression equation (the calculator calls the intercept a and the slope b), which we can write as: `hat(text(assess)) = 248.96 + 0.03777 times text(size)`
The number r is the correlation and r2 tells us that about 67% of the variation in assessed value can be explained by the variation in size.
If you don't see r and r2 on you calculator, do the following: press 2ND and then 0 to get to the CATALOG menu:
Now scroll down (or press the x-1 key, which has a green D above it, to skip to the D entries, then scroll down) until you see DiagnosticOn:
and press ENTER twice. You should see this:
Now run LinReg(a+bx) again. The calculator should always tell you the value of r and r2 from now on, at least until you take the batteries out of your calculator.
You may notice that there is a LinReg(ax+b) listed in the CALC menu along with LinReg(a+bx). Both of these will give us the same information, but let's stick with LinReg(a+bx) since it matches the order in which we will write the regression equation in this course.