Entering
the Data
-
Press the
key and choose [EDIT] then [1:Edit] … (Fig. 1).
-
This brings up the edit window
(Fig. 2).
-
On the TI-83, data are entered
into "list" variables.
-
There are six list variables
available, called L1, L2, L3, L4, L5, and L6.
-
Their names appear as the
2nd functions of the numeric keys 1, 2, 3, 4, 5,
and 6.
-
To use these list variables,
you must choose them from the keyboard; they cannot be typed
using ordinary alphanumeric characters.
-
You may also choose your
own names for the lists by inserting a column and then typing
the name at the Name=
prompt.
-
Be careful with lists.
Do not accidentally delete a list column! If you do, you
can go to the MEM reset option and reset the calculator to
get all of the columns back, but the data is lost!
-
Enter the data values one column
at a time pressing
after each data value.
-
Place the t-values in
L1 and N-values in L2.
-
Fig. 3 shows the first seven observations.
-
Make sure you have as many t's
as N's. If you don't you will get a "Dimension
Error."
|
![[Fig 1: Choose Edit to Enter Data]](Linear Regression Using the TI-83 Calculator_files/Image293.gif)
![[Fig 2: The Edit Window]](Linear Regression Using the TI-83 Calculator_files/Image294.gif)
![[Fig. 3: Entering Data]](Linear Regression Using the TI-83 Calculator_files/Image295.gif)
|
Plotting
the Data (Scatter Plots)
To decide with which model to fit,
create a scatter plot of the data.
-
Begin by turning Stat Plots on.
Press
using to bring up the display shown in Fig. 4.
-
With the first plot selected,
press
to bring up the settings for this plot (Fig. 5).
-
Change the first option to On.
-
The default settings for the
remaining options will produce a scatter plot using L1 as the x-variable and L2 as the y-variable. Mark defines the symbol type used
in the plot, a box, or plus or dot are the options. Typically
we just leave it as the box since it is easy to see.
-
Define the data range for
the plot.
-
Press
and enter
the settings shown in Fig. 6.
-
The nice thing about
working with stats, you know the domain and range that best fits
the data by looking for the extremes in input and
output in the data set.
-
Next press
. If there are any functions displayed already,
be sure they are deselected. They do not need to be deleted!
-
A function is selected
if the "=" sign is displayed in reverse video
. (In Fig. 7, Y1 is selected while Y2 is not.)
-
To deselect a function,
use the arrow keys to move the blinking cursor directly on top
of the = sign of the selected function. Press
to deselect the function. (Pressing again will reselect it.)
-
Finally, press
to produce the scatter plot (Fig. 8).
|
![[Fig. 4: Stat Plots Menu]](Linear Regression Using the TI-83 Calculator_files/Image296.gif)
![[Fig. 5: Stat Plot Settings]](Linear Regression Using the TI-83 Calculator_files/Image297.gif)
![[Fig. 6: Window Settings]](Linear Regression Using the TI-83 Calculator_files/Image298.gif)
![[Fig. 7: Deselecting Functions]](Linear Regression Using the TI-83 Calculator_files/Image299.gif)
|
Fitting
a Linear Function
The scatter plot in Fig. 8 suggests
that a straight line relationship is not too unreasonable. Our next
step is to get the formula that would help us in approximating values
of N given t. The process is tedious, but
beats hand plotting and calculation!
-
Press the
key and choose [CALC] then [4:LinReg(ax+b)] as shown in
Fig. 9.
-
(Note: choosing option [8:
LinReg(a+bx)] will produce the same results
as choosing option 4 except that the labels for the intercept
and slope will be reversed. It doesn’t matter which of these two
options you choose.)
-
This puts LinReg(ax+b) on the home screen.
-
By default it is assumed that the
x-variable is in L1 and the y-variable
is in L2, so pressing
at this point will produce the correct results.
A better choice is to list L1 and L2 as a part of
the command.
-
The order of arguments is x-variable,
y-variable, storage location (Fig. 10).
-
So the command LinReg(ax+b)
L1,L2,Y1 will use L1 as
the x-list, L2 as
the y-list, and overwrite the contents of Y1 with the regression formula and automatically selects Y1 for plotting! Wow!
-
Notice that the arguments are separated by commas.
-
Also remember,
L1, L2, and Y1 are special characters and cannot be entered
by typing ordinary letters and numbers.
-
L1 is the 2nd function of numeric key
,
-
L2 is the 2nd function of numeric
key
-
Y1 is obtained by pressing
, choosing [Y-VARS]
then [1:Function], and then [FUNCTION] then [1:Y1]. (See Fig. 11 and 12.)
-
Once the command and its arguments are pasted to
the screen, press
to produce the regression results shown in Fig.
13.
-
The values of a
and b
are displayed on the screen along with the from of the model that
was chosen.
-
Based on the output the fitted model is N(t) = -130.17
+ 23.374t.
-
Since the regression function is now stored in
Y1 and is selected, pressing
will produce a scatter plot with the regression
line superimposed (Fig. 14).
|
![[Fig. 8: Scatter Plot of Data]](Linear Regression Using the TI-83 Calculator_files/Image300.gif)
![[Fig. 9: Linear Regression Option]](Linear Regression Using the TI-83 Calculator_files/Image301.gif)
![[Fig. 10: Linear Regression Arguments]](Linear Regression Using the TI-83 Calculator_files/Image302.gif)
![[Fig. 11: Locating the Yn Variables]](Linear Regression Using the TI-83 Calculator_files/Image303.gif)
![[Fig. 12: Function variables]](Linear Regression Using the TI-83 Calculator_files/Image304.gif)
|
Interpreting
the Results - How Good is the "Fit?"
Qualitatively it would appear from the
graph in Fig. 14 that a linear function is a "reasonable"
model. The standard quantitative measure of the usefulness
of the regression model is , the coefficient of determination (also, correlation
coefficient) . can take on values between 0 and 1. The higher
the value the better the fit. So a 1 would be perfect. The TI-83 calculates
this quantity automatically.
-
Confusingly, for simple straight
line models such as this one, the TI-83 stores the coefficient of
determination in a variable it calls r 2. For more complicated
models, it stores the coefficient of determination in the variable
R2.
-
To access either one press
and then select from the [VARS] submenu option [5:Statistics] (Fig. 15).
-
In the Statistics
window that appears move the cursor to the third column to display
the [EQ] menu. The eighth option,
[8:r 2],
is where the coefficient of determination is stored for this model
(Fig. 16).
-
Press
to paste the value to the screen and then again to see its contents (Fig. 17).
We can conclude that the fit from this linear regression
has an r 2 value
of about 92%. Without reference to a different model, we really don't
know if this is the best fit we can achieve short of a a 9th
degree polynomial.
As you will see a
little later, it isn't all that great! |
![[Fig. 15: Locating Statistics Variables]](Linear Regression Using the TI-83 Calculator_files/Image307.gif) ![[Fig. 16: r^2 and R^2]](Linear Regression Using the TI-83 Calculator_files/Image308.gif)
![[Fig. 17: r^2 for the Linear Model]](Linear Regression Using the TI-83 Calculator_files/Image309.gif)
|
Fitting
a Quadratic Function
The scatter plot in Fig. 8 or 14 reveals
a slight curve in the data trend. A higher degree polynomial model might
be appropriate. The nice thing about calculators, they allow exploration
without doing a lot of extra work.
-
Press the
key and choose CALC 5:QuadReg (Fig. 18). This puts QuadReg
on the home screen. (QuadReg
fits a second degree polynomial. Third and fourth degree polynomials
can be fit by choosing CubicReg
and QuartReg respectively.)
-
Let's modify the command in the same
way as before to create the command QuadReg
L1,L2,Y2 will use L1 as the x-list, L2 as the y-list, and overwrite the contents of Y2 with the regression function and automatically
select Y2 for plotting.
-
As was described for the linear model, L1, L2, and Y2 must be pasted in by making the appropriate
keyboard and menu choices. Press
to produce the regression results shown in Fig.
20.
-
The values of a, b, and c
are displayed on the screen along with model that was fit. Based on
the output, the fitted model is
using some rounding.
-
Since the quadratic regression function
is now stored in Y2 and is selected, and the straight-line
regression function is still stored in Y1, pressing
will produce a scatter plot with the quadratic
regression function and linear regression function superimposed on
a scatter plot of the data (Fig. 21).
-
Now go to the [VARS]
menu again and find the values for R2.
The coefficient of
determination has jumped to about 99%! Also, the graph of
the Y2 formula
is significantly better is a fit to the data.
![[Fig. 23: R^2 for the Quadratic Model]](Linear Regression Using the TI-83 Calculator_files/Image316.gif)
|
![[Fig. 18: Fitting a Parabolic Curve]](Linear Regression Using the TI-83 Calculator_files/Image311.gif)
![[Fig. 19: Quadratic Regression Arguments]](Linear Regression Using the TI-83 Calculator_files/Image312.gif)
![[Fig. 20: Quadratic Regression Results]](Linear Regression Using the TI-83 Calculator_files/Image313.gif)
|
Try
other choices in the Regression menu. While the quadratic is a pretty
good, one of the other choices may do even better. The data has the
appearance of an exponential and some characteristics of a logistic
model. |