Hello again, Mr. Tarrou. As promised I'm going to show you with Ti-84 or Ti-83, how to make a regression
line with your calculator. Now when we make a regression line with our calculator we are trying to make
a linear model which means that we need to double check that it is actually linear by making
something called a residual plot. So let me quickly run through this again. A regression line, the purpose of it is
to predict Y values based on some X values. Or predict some response variables by the explanatory variable X.
So here we have the regression line Y-hat = a+bx. Y-hat is read as the predicted Y value. A is going to be the Y
intercept. You might think of Y=mx+b from your Algebra class. The constant is the y intercept and the number in
front of x, in this case slope, or b I mean, is going to be slope. So b is the slope which is the average change in y
per one unit of change in x. That is the definition of slope you want to use when dealing with word problems and
applications not the basic rise over run that we use in Algebra. The y intercept rarely has a real application
in terms of statistics problems where as the slope will always have a real life application and therefore you need
to read the examples in your textbook to be able to interpret what the slope is. And basically just take out y
and replace it with whatever the response variable is in your word problem and take out the x and replace it with
whatever verbage is good for the problem you are doing at the moment. So again, slope is average change in y
per one unit of change in x. In a scatter plot, the actual y value is labeled as x and y and the predicted y value is
from the regression line are going to be x and y-hat. The vertical distance between the regression line and our
points are going to be measured, those vertical distances, those vertical arrows from our predicted y
values are y minus y-hat and the sum of those residuals always equals zero. And we place the line to minimize
the sum of those residuals squared. So, anyway, you might have already watched this video so how about
the notes about regression lines and residuals. So how do we make this regression line with a calculator and
how do we come up with the residual plot to verify that the pattern is indeed linear that we thought was linear in
the first place with an 84. So I'm going to turn this on and hit clear. Now you would do stat, edit and I've
just got a few numbers in here for x and y. You of course with these word problems in our textbooks
will have many more values. But remember the x-axis which doesn't have to be list one is explanatory variable
and I'm going to use list 2 as my response variable or my y-axis. Okay, so my data is in the calculator and if you
some basic use of a calculator then you can watch my video about histograms, box plots and I do a lot of very
detailed explanations explanations about how to put the numbers in the calculator but our are already in here.
So, I'm going to do second, stat plot and just kind of see what's going on. Hit enter, mine's already on and I want
to choose histogram and I want to look at raw data which is in list 1 and second 2 for list 2. And every time
you want to make a graph with your calculator just hit zoom 9 if you are doing a stat plot, that's zoom stat plot.
Now you're seeing that I've already done this problem in my calculator to make sure that this all works before we
do this. So let me do zoom 9. Okay, so there's our scatter plot. Now if I hit trace I can go along the individual data
points and see whatever they happen to be at the bottom. And it looks like it's a linear pattern. So lets
make a regression line to model that linear pattern and then before we blindly start using it and talk about
correlation or r and r squared, lets make sure that it's actually straight as well. But it does look like it's straight.
So back to the home screen. I'm going to do stat calc. You have two choices for regression lines in my book
and most stat books I'm sure you are going to do, you want to use the same format that is in your book so
LinReg(a+bx). Hit enter. Now don't hit enter again. You want to tell the calculator where the data is.
Now mine's in list one and two so it's going to default to that but just as practice, second L1 to tell it where the x's
are comma which is above the 7 comma second L2 to tell it where the y's are comma now this little extra step
I'm going to use is going to have the calculator automatically put the equation back into the y equals list
so that the graph will show up automatically. So you hit VARS choose Y-VARS you want a function.
And you want to put that function where? Let's just put it in y sub one. Now when I do that and hit enter it's going
to tell me what the y-intercept is of a, what the slope is of b. Your calculator might not be showing you r squared
and r, when you need it to do that I will tell you how to do that in a second. And if I hit y equals, there at y sub one
is my equation. And when I hit graph, I get the line going through those points and indeed it does still look like we
have a linear relationship. We are going to move on to a residual plot but before we do that, what if you calculator
was not telling you what r and r squared was? Well that means that means you just bought your calculator
and you haven't started doing much stats with it yet. This is a one time setup unless all your batteries
completely die and your backup battery. So just one time, let's go to catalog. So second, catalog and we're
going to scroll down. There is a faster way to do this but I almost never use this catalog so I don't worry about
bothering with the shortcut. And we're going to scroll down until we see diagnosticOn. Hit enter and hit enter
again and that will be the only time that you will have to do this. Every time now when you come up with your
regression line and I can do second enter to pull up my last command and do second enter to pull up my
previous command where I tried to ask for the regression line. If I hit enter and of course my calculator
was already given me r and r squared but yours will now too. Don't forget, r is the strength and direction of
a linear relationship, we have a very very close to negative one which means the slope is negative
and our correlation appears to be very strongly linear. R squared is going to tell us the percent or fraction of
variation in y that's explained by the regression line of y on x. So r strength and relationship of a linear
relationship, r squared percent of variation of y that's explained by the variable x or the line y on x. Okay, so we
have our graph with our regression line going through it, now that we've
made the scatter plot, now that we've made our regression line, let's make a residual plot to actually
make sure that that data was indeed straight. To do that we want to look at our original x's on the x-axis down
here and the residuals now are going to be on the y-axis or that's where we want them. So, scatter plot,
regression line now when you make that line, the calculator makes all your residuals for you and puts them
in a list. So back to the home screen and I'm going to go to list, second list and after you have the calculator make
the regression line, it makes a bunch of residuals for you. Let's take those residuals and put them somewhere
we can use them.So store, put them in an empty list in your stat edit menu which in my case is list 3. Hit enter,
now when I go to STAT, EDIT 4 I only had two columns of data, now I've got three. The original x's, the original y's
and the residuals, y mins y-hat. These are all the vertical distances these y values are from our predicted
regression line, our predicted y values. Now a residual plot is original x's over the residuals. The original
x's on the x-axis still, the y's are now going to be the residuals. So I want to make a new scatter plot so
second, stat plot, hit enter and I want to keep my x's where they are but the y's I want to replace with the
residuals which are in list 3. And zoom, okay, when you do that hit clear, try again, zoom 9. What I want to see in
a residual plot is no curving pattern. You can
easily have a scatter plot on this small low definition screen. You can easily have a scatter plot look like it's
straight when it actually is not. A residual plot will magnify any curvature that was in the original scatter
plot that you then drew the line through. Sometimes we can deal with these residuals because they are so so
small that they do not have any real life application. But, generally do you not want your residual plot to show any
curved pattern. Now one pattern I am seeing is as my x's got bigger, my residuals got smaller and there's almost
like a sideways cone shape. That might not be okay with some problems but what you really don't want to see is a
curved pattern in your residual plot, that means that your regression line was not a good model. We do not have a
curved pattern so our linear model was a good fit. If you hit window, you can see the scale, the min and mix of the
x-axis is going to be set by the original x values. My Ymin and my Ymax are pretty small values, just to say. So we
have our residuals ranging from -.7 to .5 or at least as how the window is defined. That's it, BAM! I can't yell
BAM really loud with the camera right next to my face but that is how you use your TI-83 and TI-84 to make a
regression line and a scatter plot. Let's go back to the original data. Zoom 9, so there is our original scatter plot,
there is our regression line going through it. After making that regression line, the calculator stored the
residuals in a list. We pulled those out, we stored them in a useful place and them made the residual plot to verify
that the pattern was indeed actually linear. So there you go, how to use your graphing calculator. At least if its an
83 or 84 TI. Good luck with your homework!