TI-84 Linear Regression: LinReg(ax+b) Step by Step
About this guide. Grafolyn is an independent online graphing calculator, not affiliated with or endorsed by Texas Instruments Incorporated. This page is a reference for people using the physical calculator. TI-84 and TI are trademarks of Texas Instruments Incorporated.
Running a regression on the TI-84 takes about thirty seconds once you know the sequence. The part that catches everyone is that the r and R squared values, the ones the question always asks for, are hidden by default.
Step 1: enter the data
- Press STAT, then 1:Edit.
- If L1 or L2 already contains data, clear it: move the cursor up onto the list name, press CLEAR, then press the down arrow. Do not press DEL, which removes the list from the editor entirely.
- Type the x-values into L1, pressing ENTER after each.
- Arrow across to L2 and type the y-values in the same order.
Both lists must have the same number of entries. A mismatch produces
ERR: DIM MISMATCH when you run the regression.
Step 2: switch on r and R squared
By default the TI-84 reports only the slope and intercept. The correlation values are off until you enable them, and this catches almost everyone the first time.
On OS 5.x and later
- Press MODE.
- Scroll down to STAT DIAGNOSTICS.
- Highlight ON and press ENTER.
- Press 2nd then MODE to quit.
On older operating systems
- Press 2nd then 0 to open the CATALOG.
- Press x⁻¹ to jump to entries beginning with D, then scroll to DiagnosticOn.
-
Press ENTER to paste it to the home screen, then
ENTER again to run it. It should reply
Done.
The setting persists until the memory is reset.
Step 3: run the regression
- Press STAT.
- Arrow right to CALC.
- Choose 4:LinReg(ax+b).
- On newer operating systems a setup screen appears. Leave Xlist as L1 and Ylist as L2, then move to Calculate and press ENTER. On older ones, just press ENTER.
Store the equation while you are here. On the setup screen, move to Store RegEQ, press VARS, arrow to Y-VARS, choose 1:Function, then 1:Y1. The fitted line goes straight into Y1, ready to graph, which saves retyping the coefficients and the rounding errors that come with it.
Step 4: read the output
The screen shows something like:
LinReg
y=ax+b
a=2.017857143
b=1.053571429
r²=.9823008849
r=.9911109857 | Value | Meaning |
|---|---|
a | The slope: how much y changes per one-unit increase in x |
b | The y-intercept: predicted y when x is zero |
r | Correlation coefficient, from −1 to 1. The sign gives the direction. |
r² | Proportion of the variation in y explained by the model |
So this fit is y = 2.0179x + 1.0536, with an r² of 0.982,
meaning about 98% of the variation in y is accounted for by the linear
relationship.
Round only at the end, and only as far as the question asks. Rounding the slope to two decimals before using it to predict a value introduces error you did not need.
Step 5: plot the line over the points
- Press 2nd then Y= to open STAT PLOT.
- Choose 1:Plot1 and set it to On.
- Set Type to the first icon, the scatter plot. Xlist should be L1, Ylist L2.
- Press ZOOM then 9 for ZoomStat, which fits the window to your data.
If you stored the equation to Y1 in step 3, the line is drawn over the points automatically. If not, press Y= and type it in.
Remember to switch the plot off afterwards. Leaving it on
is the most common cause of ERR: INVALID DIM the next time you
try to graph an ordinary function. Press 2nd Y= then
4:PlotsOff.
Other regression models
The same STAT › CALC menu holds the rest. The procedure is identical; only the menu item changes.
| Menu item | Model | Requirement |
|---|---|---|
| 4:LinReg(ax+b) | y = ax + b | None |
| 5:QuadReg | y = ax² + bx + c | At least 3 points |
| 6:CubicReg | Cubic | At least 4 points |
| 7:QuartReg | Quartic | At least 5 points |
| 9:LnReg | y = a + b ln x | All x values positive |
| 0:ExpReg | y = abˣ | All y values positive |
| A:PwrReg | y = axᵇ | All x and y positive |
| C:SinReg | y = a sin(bx + c) + d | At least 4 points covering a full cycle |
Note that LnReg, ExpReg and PwrReg work by taking logarithms, which is why they refuse non-positive data. That is a real mathematical constraint, not a quirk of the calculator, and the same restriction applies in any tool.
Common problems
| Symptom | Cause and fix |
|---|---|
| No r or r² shown | Diagnostics are off. See step 2. |
| ERR: DIM MISMATCH | L1 and L2 have different lengths. Check for a stray extra entry. |
| ERR: INVALID DIM | A stat plot is on with empty lists. 2nd Y=, 4:PlotsOff. |
| ERR: DOMAIN on ExpReg | A y-value is zero or negative, which an exponential fit cannot handle. |
| A list has disappeared | STAT › 5:SetUpEditor, then ENTER, restores L1 to L6. |
Menu positions vary a little between operating system versions. If an item is not where this page says, check the guidebook Texas Instruments publishes for your model.
Questions
Why does my TI-84 not show r and r squared?
They are switched off by default. On older operating systems, press 2nd then 0 for CATALOG, scroll to DiagnosticOn and press ENTER twice. On OS 5.x and later, press MODE, scroll down to STAT DIAGNOSTICS and select ON.
What is the difference between LinReg(ax+b) and LinReg(a+bx)?
Only which letter is the slope. In LinReg(ax+b), a is the slope. In LinReg(a+bx), b is the slope. The line is identical; statistics courses tend to prefer the second form, algebra courses the first.
How do I clear a list on the TI-84?
In the STAT editor, move the cursor onto the list name at the top of the column, press CLEAR, then press the down arrow. Pressing DEL instead removes the whole list from the editor, which is not what you want.
How do I plot the regression line over my data?
Run the regression storing it to Y1, then turn on a scatter plot from STAT PLOT and press ZOOM 9 for ZoomStat. Both the points and the line appear, fitted to the data.
Why is my r value negative?
Because the relationship is negative: as x increases, y decreases. An r of −0.94 is just as strong a relationship as +0.94, in the opposite direction.