TC3 → Stan Brown → TI-83/84/89 → Inferences about Regression
revised Apr 4, 2008

Inferences about Linear Regression on the TI-83/84

Copyright © 2008 by Stan Brown, Oak Road Systems

Summary:  This page presents a TI-83 or TI-84 program to compute confidence intervals for the slope β1 and y intercept β0 of a regression line, as well as confidence intervals and prediction intervals for y in response to particular x values. This fills a gap because the TI-84 natively can do only the first of those four operations, and the TI-83 can’t do any of them.

See also:  Inferences about Linear Regression gives the statistical concepts with examples of calculation “by hand” and in an Excel workbook.

Contents: 

The Example

The following sample of commuting distances and times for fifteen randomly selected co-workers is adapted from Johnson & Kuby Elementary Statistics (Thomson, 2004), page 623.

Commuting Distances and Times
Person 123456789101112131415
Miles, x 35781011121213151516181920
Minutes, y 72020152517203526253532443745

It’s easy to compute a regression line that best describes this sample, but we’d like to know more. Specifically, we’d like to compute:

TI-83/84 Program REGINFER

Here is a program to compute those confidence intervals and prediction interval.

Getting the Program

There are three methods to get the program into your calculator:

Using the Program

To use the program, enter all your x’s on a statistics list and all your y’s in another list. Then press [PRGM], select REGINFER, and press [ENTER] [ENTER]. When prompted, enter the linear correlation coefficient of the sample, the number of points in the sample, and the desired confidence level, pressing [ENTER] after each one.

The program uses list variables LX and LY to hold your (x,y) pairs, and deletes them at the end of execution. It also uses real variables C, X to hold your screen inputs and A, B, E, F, M, N, T, Y, Z to hold results. If you have values stored in those variables they will be lost when you run the program. Those variables remain in memory at the end of the program; if you want to recover those few bytes press [2nd + makes MEM] [2] [2].

Inferences about the Line as a Whole

When you run the program, it will prompt you for the list where you stored the x’s, the list where you stored the y’s, and a confidence level to use for all four calculations. The output comes on four screens; press [ENTER] on each screen to proceed to the next. The first two output screens are about the slope and y intercept of the regression line.

Here are the input screen and the 95% confidence intervals for slope and y intercept, using the data given above.

TI-83 screen showing inputs X List:L1, Y List:L2, C-Level:.95        TI-83 screen showing outputs Slope 1.89320208, Conf Int 1.277308003, 2.509096157        TI-83 screen showing outputs Y intercept 3.643387816, Conf Int minus 4.490145836, 11.77692147

The slope of the regression line for this sample of points is b1 = 1.89, and we’re 95% confident that the slope of the regression line for the whole population is 1.28 < β1 < 2.51.

Specifically for this example, we’re 95% confident that adding one mile to the commute adds 1.28 to 2.51 minutes to the commute time. This is a good illustration that the slope of a regression line often represents marginal cost in one form or another.

The y intercept of the regression line for this sample is b0 = 3.64, and we’re 95% confident that the y intercept of the regression line for the whole population is −4.49 < β0 < 11.78.

Specifically for this example, we’re 95% confident that a commute of zero miles would take −4.49 to +11.78 minutes. This is a good illustration that it is often a mistake to use a regression line too far outside the x values of your actual data. Here, the x’s run from 3 to 15. The y intercept corresponds to x = 0, and a commute of zero miles is not a commute at all. (Yes, there are people who work from home, but they don’t get in their cars and drive to work.)

While the y intercept can be discussed as a mathematical concept, it really has no relevance to this particular problem. There are other problems where it would be relevant, representing a fixed cost.

Inferences about a Particular x Value

The first two output screens were about the line as a whole; now the program turns to predictions for a specific x value. First it asks for the x value you’re interested in.

While you can enter any number, you should only use x values that are within the domain of x values in your data, or close to it. No matter how good the straight-line relationship of your data, you don’t really know whether that relationship continues for lower or higher x values.

TI-83 screen showing input X:10        TI-83 screen showing outputs: Y-hat 22.57540862, Conf Int 19.25490741, 25.89590983        TI-83 screen showing outputs: Y-hat 22.57540862, Prediction Int 10.44370225, 34.70711499

ŷ (y-hat) is simply the y value on the regression line for the given x value, found by ŷ = (slope)10+(intercept) = 22.58. That is a prediction for μy|x=10, the average time for many 10-mile commutes. The screen shows a 95% confidence interval for that mean: we’re 95% confident that the average commute time for all 10-mile commutes (not just in our sample) is between 19.25 and 25.90 minutes.

But that is an estimate of the mean. Can we say anything about individual commutes? Yes, that is the prediction interval on the next screen. It says that 95% of all 10-mile commutes take between 10.44 and 34.71 minutes.


This page is used in instruction at Tompkins Cortland Community College in Dryden, New York; it’s not an official statement of the College. Please visit www.tc3.edu/instruct/sbrown/ to report errors or ask to copy it.

For updates and new info, go to http://www.tc3.edu/instruct/sbrown/ti83/