TI-83 TechSkills 2: Regression

In this module we exploit the TI-83's statistical features to obtain a function that best describes a given data set from some point of view. The user must first decide on a kind of function to use, then the TI-83 finds an equation of best fit for that function. Once we have a function, then we can apply mathematical techniques for analysis.

The process of obtaining a function of best fit is called regression. The TI-83 supports a variety of functions for regression: linear, quadratic, cubic, quartic, logarithmic, exponential, power, logistic, sinusoidal. We first illustrate with linear regression.

Linear Regression
Linear regression is the process of fitting a straight line to a data set. A linear function has the form y = ax + b. Hence, the task of linear regression is to determine values for a and b that create the straight line that best fits the given data. For example, we consider a data set from Sullivan and Sullivan, Precalculus enhanced with graphing utilities, Second Edition, page 112, Example 3.

 Plot 1 2 3 4 5 6 7 8 9 10 11 12 Fertilizer, X (lbs/100ft2) 0 0 5 5 10 10 15 15 20 20 25 25 Yield, Y (bushels) 4 6 10 7 12 10 15 17 18 21 23 22

First we enter the data set into the calculator. The TI-83 data editor is arranged in columns. A column is formally referred to as a list. Accordingly, we enter the input data (here, fertilizer) into List 1 (L1) and we enter the output data (here, yield) into List 2 (L2).

Step 1: Data Entry
 Turn the TI-83 . Press the key, then press to select 5:SetUpEditor. This takes you to the home screen with the term SetUpEditor and a blinking cursor immediately following. Press . This alerts the editor to be prepared to accept data into lists L1 and L2. Press the key, then press to select 1:Edit. This takes us to the data Editor.

If there are old data in the columns, use the arrow keys to highlight L1, then press . Then highlight L2 and press . Finally, use the arrow keys to position the cursor in the first entry in L1.

 We are now ready for data entry. The first cell in the L1 column is highlighted. Enter the data in the L1 column: 0 0 5 5 , etc. To enter data into the L2 column, use the arrows to position the highlighter to the first cell in the L2 column. Then, enter the L2 data: 4 6 10 7 , etc.

Step 2: Plotting the Data Set
 Press STATPLOT (located just above the Y= key) to obtain the STAT PLOTS menu. Press to select 1:Plot 1... and go to the Plot1 menu. Use the arrow keys to highlight On, then press . Highlight the item in Xlist:. We need to put the list L1 here. Press . Then use the arrow keys to go to Ylist:. Press . Your screen looks like this. Press to select 9:ZoomStat. The TI-83 now displays a plot of the data points. Note If some unwanted graphs appear on the data set, go to the Y= menu and either deselect or clear the unwanted functions.

Now look at the data set. Ask yourself, is it reasonable to describe this data set with a linear function? The linear function need not be a perfect fit to the data set, but should act as a general descriptor of the trend of the data in the viewing window. Here we notice the general upward trend of the data. It appears reasonable to draw a straight line through the data set that would act as a basic descriptor of the general trend of the data.

Note You can use the TRACE feature to trace the data points.

Step 3: The Calculations
Now we fit a straight line through the data points. Of course, a straight line is uniquely determined by two points. Although our twelve points do not fit exactly on any straight line, the TI-83 has a built in feature called linear regression that determines the straight line that best fits our points. In statistics, this line of best fit is called a regression line.

• Press the key, then use the right arrow to highlight CALC.
• Press to select 4:LinReg(ax+b). The home screen displays the term LinReg(ax+b) followed by a blinking cursor. We now need to enter three items: the list containing the inputs, the list containing the outputs, and the function to carry the regression line.
•  Press (do not press the enter key yet). Now press . Use the right arrow to highlight Y-VARS, thereby accessing the Y-VARS menu. Press to select 1:Function... . Then press again to select 1:Y1 in the function menu. You are returned to the home screen that displays LinReg(ax+b) L1, L2, Y1. Press . The screen displays the results of the linear regression: the regression equation is y=ax+b with slope a = .7171428571 and b = 4.785714286.

We report: from the given data, we estimate the average rate of crop yield with respect to amount of fertilizer applied is .7 bushels of crop for each pound per 100 square feet of fertilizer applied.

Step 4: Plotting the Data with the Regression Curve
We now obtain a plot of the data set with the regression line superimposed on the data. Since the plot setup is already done, we merely need to ask for the graph.

 Press . The TI-83 now displays a plot of the data points overlaid by the regression line. Although the line doesn't exactly go through all points, the regression line is the straight line of best fit. Based on the given data, the slope of the regression line is a reasonable estimate of the average rate of change.

Note You can use the TRACE feature to trace either the data points or the regression line. Use the left-right thumb pad keys to move along the data set. Use the up (or down) key to transfer to the regression line. Then, the left-right thumb pad keys will navigate along the regression line. Use the up (or down) key to return to the data set.

Of course there are other functional relationships besides linear. The TI-83 supports a handy suite of choices.

Nonlinear Regression
To illustrate obtaining a function from data, we utilize a data set for the growth of the brewers' yeast, Saccharomyces cerevisiae, obtained by the Swedish biologist Tor Carlson in 1913. Here, time is measured in hours and population in biomass units.

First enter the data set. Press to return to the spreadsheet. To clear the old data in a list, use the thumb pad to highlight the list heading, then press . After the old data set is cleared, then enter the new data set. After the data are entered and checked, then we are ready to view the scatter plot. Press . Although something is plotted, we must adjust the view to the data set. First go to the Y= menu and clear any previous functions. Then adjust the viewing window to the data by pressing to select 9:ZoomStat.

Step 3: The Calculations

We are now ready to fit a function to the data. For this we must first decide on a function whose graph looks like a good descriptor for the data. From merely looking at the data and mentally overlaying a smooth curve through the points, we envision a curve that is increasing and describing growth, suggesting an exponential function. No calculator or computer can make this decision. You must make this decision using your knowledge of mathematics and the science of the background reality. For the TI-83, the general exponential function is y=abx. Using exponential regression, the TI-83 will determine the values for a and b that provide a general exponential function of best fit based on the given data.

The calculations and plots are done exactly as in linear regression, with one exception. In the STAT CALC menu, instead of selecting item 4:LinReg (ax+b) for linear regression, we select item 0:ExpReg. Notice that the TI-83 can accommodate a variety of function choices: linear, quadratic, cubic, quartic, logarithmic, exponential, power, logistic, and sine functions. For convenience, we summarize the calculations and viewing the scatter plot with the regression equation.

 Press the key, then use the right arrow to highlight CALC. Press to select 0:ExpReg. This takes you to the home screen with the term ExpReg displayed, followed by a blinking cursor. Press use the right arrow to highlight Y-VARS press to select 1:Function press to select 1:Y1. Press . The screen now displays the results of the exponential regression: the regression equation is y=abx where a=10.97569488 and b=1.589836831.

We are now ready to get a graph of the data plot overlaid with the regression curve.

Step 4: Plotting the Data and Regression Curve
Since the plot setup has already been done in viewing the data set, we are ready to graph.

 Press . Now that's really awesome! Note You can use the TRACE feature to trace either the data points or the exponential curve on your StatPlot. We now include an additional item for students in calculus.

A Tangent Line
Your TI-83 can draw a tangent line to a function at a specified point. The slope of the tangent line is our desired estimate for the instantaneous rate of growth; say, at t=4. Here is how it works. We suppose that the screen is showing a plot of the data and a graph of the exponential regression curve.

 Access the DRAW menu by pressing . Press to select 5:Tangent(. Then simply type in your input value (here, 4 ) and press .

Soon the tangent line will be drawn and its equation will be displayed at the bottom of the screen. Notice the slope of 32.5. We conclude, the yeast population is increasing at the rate of about 32 biomass units per hour after four hours of growth. Recall that your conclusion to any applied problem should always be stated as a complete sentence where the numbers are described within the context of the reality of the given problem.

Suppose now that you would like to estimate the slope of the tangent line at another input value. If you want to leave the old tangent line for comparison, proceed with the above instructions for obtaining the tangent line at a new input value. If you'd like to clear the current tangent line, then press and to select the 1:ClrDraw option to clear the drawing. Enjoy!

END

The author wishes to extend his appreciation to Texas Instruments for their professor assistance program. Visit the TI calculator website at http://www.ti.com.

Charles M. Biles, Ph.D.
Department of Mathematics
Humboldt State University
Arcata, CA 95521-8299

Email: cmb2@axe.humboldt.edu