# Introduction to the TI-83/TI-84 Graphing Calculators and Mathematical Modeling via Regression Dr. John C. Nardo (404) 364-8327
Division of Mathematics & Computer Science
Oglethorpe University www.oglethorpe.edu/faculty/~j_nardo/
Atlanta, GA 30319 jnardo@oglethorpe.edu The TI-83/TI-84 family of calculators contains powerful graphics capabilities. They can graph functions given by equations and also data sets. We will start with graphing basic functions.

### PART I – GRAPHING FUNCTIONS

These calculators can graph up to ten functions at one time. You begin the process by typing in the function you wish to graph. Press the [Y=] button on the top row of keys. You will see: .

To see all of the ten rows for functions, press the down arrow to scroll down. When you’re doing exploring, use the arrow keys to return to the first row Y1. We will begin by graphing a simple linear function: y = 2x + 1. The function rows already have the “y =” built in; all you must type is the right-hand side of the function, i.e. the functional expression/formula. With the blinking cursor beside the Y1 = type in 2x + 1. Note that the x key is directly to the right of the green [ALPHA] key. You should see: .

Single-variable functions are visualized in the two-dimensional plane which extends infinitely in two directions (left-right and up-down). Clearly the finite display screen of the calculator cannot display the infinite space of the plane! So, you have to choose a “window” to view the graph(s), i.e. a section of the plane to display. Recall that the horizontal axis is traditionally the x-axis, and the vertical axis is traditionally the y-axis.

To specify the viewing window, you need to give the left and right borders/edges, called x-min and x-max respectively, and the bottom and top borders/edges, called y-min and y-max respectively.

You type in these values in the window menu, accessed by pressing the [WINDOW] button on the top row of keys. Type in the four values for x-min, x-max, y-min, and y-max. For our first graph, we will use:

x-min = –10
x
-max = 10
y-min = –10
y-max = 10.

When typing in –10 you must use the negative key under the number 3 and not the subtraction key on the right side of the calculator. If you mix these buttons up, the calculator will give an error message! Leave the other entries to their default settings. You should see: Then press the [GRAPH] button on the top row of keys to display the graph below. This 20 by 20 grid of the plane surrounding the origin is used so often that its settings are built into the calculator. Instead of setting the window manually to these settings, you could use the built-in “Zoom Standard.” Press the [ZOOM] key on the top row of keys and then scroll down to the sixth option called ZStandard; this will highlight the number of this option, see below. When that is done, press the [ENTER] key to execute the same graph from above.

“Zoom Standard” is a good place to start when graphing a function because usually we are interested in the area around the origin. However, many times that window is not a good window for our final view: it may only have a portion of the function’s graph in it, it may have no graph at all, it may display the function too small, it may not show relevant features of the graph, etc. So, if the “Zoom Standard” window is inadequate, change the settings manually until you have a satisfactory window. It will take some trial and error usually to find adequate settings. Window finding is a skill you should practice. To that end, we’ll practice now with a several examples.

Now, we will graph the linear function y = – 9x + 10. Press the [Y=] button to access the graphing screen. Press the [CLEAR] button to eliminate the previous function in Y1. Now, type in the formula – 9x + 10 in the Y1 row.

The y-intercept of the function is at the top edge of the standard viewing window, i.e. at the point (0,10). So, the standard viewing window will give only a portion of the graph with half the window empty. This unsatisfactory window is shown below. Clearly we need to move the top edge up by adjusting y-max; let’s make y-max be 20, as shown below.  There is still quite a bit of empty space in the graph; so, we should adjust the left and right edges to zoom in, i.e. x-min and x-max. Set them as below to see an acceptable copy of this graph.  Be sure to use the [GRAPH] button to implement your window settings. If you use Zoom Standard, you will revert back to the standard viewing window and will have to start over!

Now, let’s graph the cubic function . To raise a variable to the power three, i.e. cube it, you must use the carat/housetop key above the division button. Because squaring is used so often, it has a built-in button to the upper left of the 7 key. Return to the graphing menu [Y=] and clear out the previous function on Y1 and type:

x 3 – 9 x [ button] – 12x + 20
or
x 3 – 9 x 2 – 12x + 20.

You will see: ### The standard viewing window is inadequate for this graph as well. (As a reminder, press the [ZOOM] button and then the  key to access the standard viewing window, or use the arrow keys to scroll to highlight the ZStandard option and press [ENTER].) The top and bottom of the graph are cut off; so, y-max and y-min must be adjusted.  The right edge of the graph is cut off at its x-intercept; so, we should expand the right border by making x-max larger. This makes the acceptable graph seen below on the right.  Now that you can graph one function at a time, we will turn our attention to graphing more than one function simultaneously on the screen and getting data from those graphs.

Suppose we wanted to know where the linear function y = x + 2 and the quadratic function intersect. From the [Y=] menu, enter the linear function in the Y1 row and the quadratic function in the Y2 row. Using the [ZOOM] menu, graph using the standard viewing window. Visually, we see the graphs intersect twice, but we must zoom in to see the points more clearly.  Now, we estimate that the graphs intersect at (–1,1) and at (2,4). To be sure of the values, we use the [TRACE] feature to get coordinates of these points. Once the [TRACE] button is pressed, it gives coordinates “live” from the graph. Pressing the left or right arrows will move along the graph giving coordinates. Typing a number and then pressing [ENTER] will jump to a particular x-value (just in case you cannot get the precision you need by the left-right action). Pressing the up or down arrows will switch between the different graphs on the screen. The equation of the active graph being traced will be displayed in the upper-left corner.

Press the [TRACE] button on the top row of keys. It will default to the first equation, i.e. the linear equation. Type 2 and then press [ENTER]. The result is in the left picture below.  Press the up or down arrow, type 2, and then press [ENTER]. The result is in the right picture above. This shows that both graphs pass through the point (2,4); so, this is an intersection point. You should verify that our other “guess” that (–1,1) is an intersection point is valid!

You should now practice graphing functions in your textbook; see your course website for homework problems. For some, the standard viewing window will be adequate; for others, you will have to explore to find an appropriate window. Now, we will turn our attention to graphing data sets and approximating that data using various types of functions, called mathematical models for the data.

### Diagnostics

In order to get full information during linear regression analysis, the diagnostics for the TI-83/
TI-84 calculators must be on. Access the DiagnosticOn command through the catalog. Access the catalog: [2nd] . To move to the commands which begin with the letter D, scroll down to the command using the down arrow or type the key for the letter D [ ]. When the DiagnosticOn command is selected with the character, press [ENTER] to bring the command to the home screen. Press [ENTER] again to execute the command. The calculator should now display "Done." The diagnostics will remain on until they are turned off or something catastrophic occurs.

Entering the Data

First, we must enter the data set we wish to explore into the calculator using the Stat Editor. Press [STAT]. The Edit command should be selected, i.e. its label 1 should be highlighted. Use the up and down arrows to move among the other commands, if needed. To execute the Edit command, press [ENTER]. You should now have a workspace consisting of six columns labeled L1 through L6. Each column is a separate data set/list. Use the left and right arrows to move to a column/list which is blank. Usually, we will reuse list one (L1) and list two (L2) for our data sets. If these lists are not blank/empty as above, use the arrow keys to highlight the list’s name in the top row and then press the [CLEAR] and [ENTER] keys. That will empty the list. Do this so that both L1 and L2 are empty as above.

WARNING: Do NOT use the [DELETE] key to empty lists! This action will delete both the data and the lists themselves. They will no longer appear in the Stat Editor for your use.

Type each piece of data and press [ENTER]. Continue until all data has been entered into the calculator. Enter all the x data into L1 and all the y data into L2. You may use the arrow keys to navigate these lists. If you make a mistake before you press [ENTER], you may use the left and right arrows to move in the entry and retype to correct the error. If you do not realize your error until after you have pressed [ENTER], use the up and down keys to reselect/highlight the mistaken entry and retype. If you want to erase an entry entirely, use the up and down keys to reselect/highlight the entry and press the delete key [DEL].

First Example

Your neighborhood association has become more and more alarmed about the number of muggings happening on its streets. It is particularly interested in the relationship between the number of police officers on duty on a day and the number of muggings reported on that day. It collects the data below.

 Number of Police Officers on Duty X Number of Reported Muggings Y 10 5 15 2 16 1 1 9 4 7 6 8 18 1 12 5 14 3 7 6

Enter the x-data into L1 and the y-data into L2. A portion of the data is shown below. Creating Scatterplots

We may create a graphical representation of a pair of data sets by using the calculator to generate a scatterplot. Each xy-pair is treated as a point (x,y). First, go to the regular graphing menu [Y=] and clear out all the equations in the menu. Sometimes, the regular graphs and the scatterplots have strange interactions. If you’re done with an equation in the [Y=] menu, clear it.

Then access the STAT PLOT screen by pressing [2nd] [Y=]. There are three separate plots which you may use: Plot1, Plot2, and Plot3. You may choose to always reuse the same plot or to switch back and forth between plots. Choose a plot by using the up and down arrows to select/highlight the plot. Press [ENTER] to carry out this choice. The cursor should be blinking on the word On. Press [ENTER] to turn the plot on; the word On should now be selected/highlighted. Move to the next selection/choice by pressing the down arrow. There are six icons denoting the various types of statistical plots available on the TI-83/TI-84. The icons represent scatterplots, line graphs, histograms, modified boxplots, boxplots, and normal quantile plots, respectively. The left and right arrows move between these choice. Make sure that the cursor is blinking over the top left icon and press [ENTER] to select the scatterplot option.

Press the down arrow to move to the next selection. Now, we must choose which data is graphed on the horizontal axis and which is graphed on the vertical axis. The number of police officers on duty data is in the list L1 and should be selected as the Xlist. Press [2nd] . Press the down arrow to move to the Ylist choice. The number of muggings, L2, should be selected: press [2nd] .

Finally, to decide with which label to mark points on the scatterplot, press the down arrow. The left and right arrows move between the three style choices. Press [ENTER] to select your choice.

We will use the ZOOM menu to generate the scatterplot. Press [ZOOM] on the top row of keys. Press the up arrow twice to select/ highlight ZoomStat. Press [ENTER] to execute this command. (As a shortcut you may simply press  to select and execute this command simultaneously.) The TI-83/TI-84 will now choose appropriate ranges of values for the graphing variables, automatically set the "best" viewing window, and generate the scatterplot. If you are interested in the values chosen for the horizontal and vertical axes, press [WINDOW]. The entries Xmin, Xmax, Ymin, and Ymax are as explained above. The entries Xscl and Yscl indicate in what increments tick marks are placed on the axes. Usually, we leave these set to 1 in order to have tick marks at every integer. We may ignore the entry Xres and leave it set to 1. To regenerate the graph, press [GRAPH]. If you wish to stop your current action and return to the home screen, then execute a quit by pressing [2nd] [MODE].

### PART III – LINEAR REGRESSION & MATHEMATICAL MODELING

This data set is remarkably linear. Though it does not fall exactly along a line, the data points cluster tightly along a theoretical line called the regression line. We can use the mathematical field of statistics (or a TI-83/TI-84 calculator) to measure how linear the data is and to find the equation of the regression line (also called the least squares line or LSL).

Calculating the Correlation Coefficient and the Regression Line

We may calculate the correlation coefficient, its square, and the equation of the regression line all in one fell swoop. Press [STAT] and then press the right arrow to access the calculation (or CALC) menu. Press the down arrow until the fourth command LinReg(ax + b) is selected/ highlighted. Press [ENTER]. (As a shortcut, you may simply type  after accessing the CALC menu.)

The LinReg(ax + b) command requires three arguments: the list holding the data which is graphed on the horizontal axis (here L1), the list holding the data which is graphed on the vertical axis (here L2), and the variable in which you wish to store the equation of the least squares line (here Y1).

Once you have the LinReg(ax + b) command on the home screen, type the following sequence of keystrokes to enter the three arguments:

[2nd] 
[,]

[2nd]  [,]

[VARS] [right arrow] [ENTER] [ENTER].

Your screen should look like the following: Press [ENTER] once more to execute the linear regression and correlation analysis. Your screen should now look like the following: The slope and y-intercept of the least squares regression line are displayed along with the correlation coefficient and its square. From your background in Algebra, you can understand what the slope and y-intercept of the line mean. In order to understand the meaning of the correlation coefficient ( ) and its square ( ), you need to take a course in Statistics. For our purposes, we will focus on . It gives a measurement of how well the regression equation fits the data. It is a percentage: the closer it is to one (100%) the better the fit. Here the value is approximately 94% which indicates that this regression line fits the data well!

Graphing the Least Squares Line and the Scatterplot Simultaneously

When the third argument Y1 is used in the LinReg(ax + b) command, the calculator automatically stores the equation of the least squares line as equation Y1. To verify this, access the regular graphing menu by pressing [Y=]. To display the scatterplot and the least squares line simultaneously, press [GRAPH] or [ZOOM] . Prediction via a Function Approach

The reason for constructing a least squares line is to make predictions. Given an x, a value for the variable on the horizontal axis, we may substitute into the least squares equation to yield a y, the predicted value for the variable on the vertical axis. We may also interpret y as a function x and use appropriate notation to generate these predicted values.

So, instead of using the actual data set, we may use its mathematical model instead: .

In this linear model x represents the number of police officers on duty, and y represents the number of reported muggings.

We will routinely “do Calculus” on this model, as seen later in your course. In the mean time, we can make predictions about values of y based on a potential x-value.

Example: Predict the y-value associated with x = 13. To enter Y1(13) in the home screen, type [VARS] [right arrow] [ENTER] [ENTER] [( ] 1 3 [ )]. This should yield approximately 3.368402656. In other words, if there are 13 police officers on duty, we predict there to be approximately 3 reported muggings.

Shortcut: If you wish to calculate another predicted function value, then you may save time by pressing [2nd] [ENTER]. This creates a copy of your previous command on the home screen. Use the left and right arrow keys to edit the command and then press [ENTER] to execute the modified command.

Note: Any real number may be used as a value of x via this function approach.

Prediction via a Graphing Approach

If the scatterplot and regression line are displayed simultaneously on a graph, then you may use the calculator’s [TRACE] feature to make predictions. Make sure that the graph is displayed. Press [TRACE]. Press the up or down arrow to move away from the scatterplot to the regression line. The equation of the least squares line should be in the upper left-hand corner. (If not, then continue to press the down arrow until it is.) Example: To predict the y-value associated with x = 13, simply type 13 to get the same answer.

Note: Only real numbers in the viewing window may be used as values for x via this graphing approach. If the x-value you desire to use is not in the viewing window, then the calculator will give an error message. Press [ENTER] to exit the error message. Now, you must modify the viewing window to allow your value of x. Press [WINDOW]. Choose new values of Xmin and Xmax which include the desired value of x. Press [GRAPH] [TRACE] [down arrow]. Type in the desired value of x again.