Linear regression with exact slope — a TI-89 Titanium program
REGR89 is a TI-89 BASIC program for the TI-89 Titanium. Least-squares line through lists of X and Y: slope and intercept kept exact when the data are exact (7/5, not 1.4), correlation r and r², and a prediction at any X.
What it asks for and what it shows
It asks for 3 values at its prompts. In the example below it shows SLOPE, INTERCEPT, R, R², YHAT.
Example run
One of its oracle test cases: “exact slope 19/10”. The inputs are typed in order, and the results are the values the case expects on the screen.
| Step | Value |
|---|---|
| You enter | |
| Input 1 | {1,2,3,4} |
| Input 2 | {3,5,6,9} |
| Input 3 | 5 |
| The screen shows | |
SLOPE= | 19/10 |
INTERCEPT= | 1 |
R= | 0.981155781 |
R²= | 0.9626666667 |
YHAT= | 21/2 |
How it's checked
4 test cases, each checked against an independent method. Replayed key by key on a virtual TI-89 Titanium, they make 28 checks.
How E-Code checks every program
Run it or put it on your calculator
- Open the library in the TI-89 Titanium calculator and pick “Linear regression with exact slope” (REGR89).
- Put it on your own calculator with a computer and a USB cable, or type it in by hand.
Related programs
- Least-squares polynomial fit (exact)
- t test and interval from data lists
- Chi-square goodness of fit
- Least squares with matrices (Vandermonde)
- One-variable statistics of a list
All TI-89 Titanium statistics programs · All TI-89 Titanium programs