From a Regression Line to a List of Residuals
In “Why Residuals Sum to Zero,” you learned that residuals from a least-squares regression line with an intercept, calculated for the data used to fit it, have a signed sum of zero. Now you can use the TI-84 to see every residual at once. After you run LinReg, the calculator stores the residuals in a list named RESID.
The list is useful because it keeps the signed residual for each observation in the same order as the paired data. That makes it easier to check calculations and prepare a residual table. The calculator does not remove the need to know what each value means: each residual is still the observed response minus the predicted response for that same observation.
How to Create and View RESID
First enter the paired data in two lists. In the examples below, the predictor values go in \(L1\) and the response values go in \(L2\). Each predictor and its matching response must be in the same position: the first \(x\)-value and first \(y\)-value form one observation, the second values form another, and so on.
Press STAT, choose Edit, and enter the predictor values in \(L1\) and the response values in \(L2\). Check that the lists have the same number of observations and that every pair is on the intended row.
Press STAT, move to CALC, and choose LinReg(a+bx). Specify \(L1\) for Xlist and \(L2\) for Ylist. You may also store the equation in \(Y1\), as in “Entering Data and Running LinReg on a TI-84.” Select Calculate.
Press STAT and choose Edit. The residual list is created by the regression calculation and is available under the name RESID.
Move to an unused list column heading in the editor. Open the list names menu with 2nd STAT, select RESID, and press ENTER. The column displays the residuals in observation order. Keep \(L1\) and \(L2\) intact so the original pairs remain available beside the residuals.
Menu labels and list-editor appearance can vary slightly across TI-84 models, but the key sequence is the same in purpose: run LinReg with the correct Xlist and Ylist, then select RESID from the list names. If RESID is not available, first check that a regression calculation has been completed.
Worked Example: Displaying Residuals for a Small Data Set
Worked Example: Displaying Residuals for a Small Data Set
A fictional school technology team records the number of hours a device is used, \(x\), and its battery life remaining at the end of the test, \(y\), in hours. The data are \((1,4)\), \((2,5)\), \((3,7)\), and \((4,8)\). Use the TI-84 to display the residual for each observation and verify what the list contains.
State. The predictor is device-use time in hours, and the response is remaining battery life in hours. We need the residuals for the four observations, in their original order.
Plan. Enter the \(x\)-values in \(L1\) and the corresponding \(y\)-values in \(L2\). Run LinReg(a+bx) with \(L1\) as Xlist and \(L2\) as Ylist. Display RESID, then check its values using \(y-\hat{y}\) and the fitted line.
Do. The means are \(\bar{x}=2.5\) hours and \(\bar{y}=6\) hours. The centered \(x\)-values are \(-1.5,-0.5,0.5,1.5\), and the centered \(y\)-values are \(-2,-1,1,2\). The cross-products sum to \(3+0.5+0.5+3=7\), and the squared \(x\)-deviations sum to \(2.25+0.25+0.25+2.25=5\). Thus, \(b=7/5=1.4\) hours of remaining battery life per hour of device use. The intercept is \(a=6-1.4(2.5)=2.5\) hours, giving the line \(\hat{y}=2.5+1.4x\). LinReg should report these coefficients, allowing for the calculator’s display format.
On the calculator, put 1, 2, 3, and 4 in \(L1\), and 4, 5, 7, and 8 in \(L2\). Run LinReg(a+bx) using \(L1\) and \(L2\), then display RESID in an available column in the list editor. To verify the displayed list, calculate each prediction and subtract it from the observed response:
| Observation | \(x\) (hours) | \(y\) (hours) | \(\hat{y}=2.5+1.4x\) (hours) | \(y-\hat{y}\) (hours) |
|---|---|---|---|---|
| 1 | 1 | 4 | 3.9 | +0.1 |
| 2 | 2 | 5 | 5.3 | −0.3 |
| 3 | 3 | 7 | 6.7 | +0.3 |
| 4 | 4 | 8 | 8.1 | −0.1 |
For instance, the first prediction is \(2.5+1.4(1)=3.9\) hours, so the first residual is \(4-3.9=0.1\) hour. The values in RESID should be approximately \(0.1,-0.3,0.3,-0.1\), in that order. Their signed sum is \(0.1-0.3+0.3-0.1=0\) hours, matching the zero-sum property for a least-squares line with an intercept.
Conclude. RESID displays one residual for each input pair, in the same order as the observations. Here, the list entries agree with the hand calculations using observed minus predicted battery life.
Reading the List Without Losing the Pairing
A list of residuals is only useful if you can tell which observation each entry belongs to. The TI-84 preserves the order of the input lists; it does not label a residual with a case name or explain it in context. Use the row position to match each residual to the corresponding \(L1\) and \(L2\) values. If you need a report-ready table, copy the values into a table with the original predictor and response values.
Worked Example: Matching Each Residual to Its Observation
A fictional student records weekly practice time, \(x\), in minutes and a score, \(y\), on a short skills quiz, in points. The data are \((10,62)\), \((20,68)\), \((30,75)\), \((40,79)\), and \((50,86)\). Find the regression line, then explain how to read the calculator’s residual list by row.
State. Practice time is the predictor, and quiz score is the response. The task is to match the five residuals to the five students’ paired observations, not merely to report a list of numbers.
Plan. Enter the practice times in \(L1\) and the scores in \(L2\). Run LinReg(a+bx), view RESID, and compare its entries with the residual calculations from the fitted line. Keep the original row order throughout.
Do. The means are \(\bar{x}=30\) minutes and \(\bar{y}=74\) points. The cross-products of centered values sum to \(240+60+0+50+240=590\), and the squared centered \(x\)-values sum to \(400+100+0+100+400=1000\). Therefore, \(b=590/1000=0.59\) points per minute and \(a=74-0.59(30)=56.3\) points. The fitted line is \(\hat{y}=56.3+0.59x\). Enter the five paired values in matching positions, run LinReg using \(L1\) and \(L2\), and display RESID.
| List position | Practice time, \(x\) (minutes) | Observed score, \(y\) (points) | Predicted score, \(\hat{y}\) (points) | Residual, \(y-\hat{y}\) (points) |
|---|---|---|---|---|
| 1 | 10 | 62 | 62.2 | −0.2 |
| 2 | 20 | 68 | 68.1 | −0.1 |
| 3 | 30 | 75 | 74.0 | +1.0 |
| 4 | 40 | 79 | 79.9 | −0.9 |
| 5 | 50 | 86 | 85.8 | +0.2 |
Thus, the first value in RESID, approximately \(-0.2\), belongs to the first pair, \((10,62)\). The third value, approximately \(1.0\), belongs to \((30,75)\). It says that this observed quiz score was 1 point above the score predicted by the line at 30 minutes of practice. Check the total: \(-0.2-0.1+1.0-0.9+0.2=0.0\) points.
Conclude. The list position is the link between a residual and its observation. Reporting residuals without preserving that link makes it unclear which case each value describes.
When to Run LinReg Again
RESID reflects the regression calculation that created it. If you change a response value, replace an observation, use a different Xlist or Ylist, or run a different regression, run LinReg again before relying on the residual list. Otherwise, the displayed residuals may not correspond to the data or model you intend to use.
Worked Example: Updating Residuals After Correcting a Value
A fictional delivery team records the number of packages handled, \(x\), and the minutes needed to finish a stop, \(y\). The entered observations are \((1,3)\), \((2,6)\), \((3,6)\), and \((4,9)\). The team discovers that the last time should be 10 minutes, not 9. Find the updated line and residual list.
State. The response in the fourth observation has been corrected. We need residuals for the corrected data, so the regression and RESID list must be refreshed.
Plan. Replace the fourth response in \(L2\) with 10, leaving its predictor value of 4 in the same row. Rerun LinReg(a+bx) using \(L1\) and \(L2\). Then verify the new residuals from the new fitted line.
Do. For the corrected responses 3, 6, 6, and 10, \(\bar{x}=2.5\) packages and \(\bar{y}=6.25\) minutes. The centered-response values are \(-3.25,-0.25,-0.25,3.75\); the cross-products with centered \(x\) sum to \(4.875+0.125-0.125+5.625=10.5\). The squared centered \(x\)-values sum to 5. Thus, \(b=10.5/5=2.1\) minutes per package, and \(a=6.25-2.1(2.5)=1\) minute. The updated line is \(\hat{y}=1+2.1x\).
After changing the fourth entry of \(L2\) to 10, run LinReg again before viewing RESID. The new predictions and residuals are:
| Observation | \(x\) (packages) | Corrected \(y\) (minutes) | \(\hat{y}=1+2.1x\) (minutes) | New residual (minutes) |
|---|---|---|---|---|
| 1 | 1 | 3 | 3.1 | −0.1 |
| 2 | 2 | 6 | 5.2 | +0.8 |
| 3 | 3 | 6 | 7.3 | −1.3 |
| 4 | 4 | 10 | 9.4 | +0.6 |
The refreshed RESID list should show approximately \(-0.1,0.8,-1.3,0.6\), with the fourth residual matched to the corrected 10-minute observation. Their signed sum is \(-0.1+0.8-1.3+0.6=0\) minutes. That check is consistent with the zero-sum property, but matching each value still requires checking its row.
Conclude. Once the data change, rerunning LinReg ensures that the displayed residuals come from the corrected observations and their updated fitted line.
Common Mistakes and AP Exam Tips
- Reversing the lists. LinReg needs the predictor list as Xlist and the response list as Ylist. Reversing them fits a different regression. Check the variable roles before calculating.
- Breaking the paired rows. If a response is moved without its matching predictor, the calculator treats the new row as a different observation. Keep each original pair in the same list position.
- Reading the sign backward. The residual is observed response minus predicted response, \(y-\hat{y}\), not predicted minus observed. A positive residual means the observed response is above the prediction; a negative residual means it is below.
- Assuming RESID names the cases. The list contains values, not case labels. Use its position alongside the original lists to identify the observation.
- Using a list from an earlier calculation. After editing data or changing the lists used in LinReg, rerun the regression before interpreting RESID.
- Expecting rounded hand calculations to match every displayed digit. Calculator output and displayed coefficients may be rounded. Keep full calculator precision when possible; small differences in the last displayed digit can result from rounding.
- Reporting a residual without units or context. A residual has the response variable’s units. A complete interpretation identifies the observation and says how far its observed response is above or below the model’s prediction.
For an AP response, use the list to support—not replace—a clear statement. Identify the observation, give its signed residual with the response units, and connect the sign to observed minus predicted. For example: “For the observation with 30 minutes of practice, the residual is about \(+1.0\) point, so the quiz score was 1 point higher than the model predicted.”
Check Your Understanding
Use the RESID list as a set of paired, signed values—not as an unlabeled collection of numbers.
- Which list should be Xlist if \(L1\) contains the predictor and \(L2\) contains the response?
- After LinReg, what observation corresponds to the fourth entry in RESID?
- An observation’s RESID entry is \(-2.5\) points. What does the sign say about the observed score compared with its predicted score?
- You correct a response value in \(L2\). What should you do before using RESID again?
- Why can a small difference between hand-calculated and calculator-displayed residuals occur?