INSTRUCTOR: Welcome to a lesson on log regression. The goals of the video are to perform log regression using the TI-84 graphing calculator, determine how well the regression model fits the data, and then make predictions using the regression equation. Let's start with a quick review of logarithmic functions. By definition, if we have the equation y equals log base a of x, this means that a raised to the power of y must equal x. So if you start with a raised to the power of y, it must equal x. But the main thing to remember when performing regression-- if the scatter plot behaves in a way similar to any of these functions here, log regression would be a good choice to fit the data. Let's go and take a look at our example. Here, we have some data that compares the time in years to the height of a tree. So what we're going to do is create a scatter plot from this data and see if it fits the pattern of a logarithmic function. So we'll first enter in the data by pressing Stat, Enter. And then we're going to clear out the old data. We'll go to the top of the column. Press Clear, Enter. And we'll clear the entire column at one time. So Clear, Enter. And now we'll enter the new data. Notice L1 will be from 1 6. Now we'll enter in the heights in L2. Next, we have to set up the axes to show these data values. So we'll press the Window key. The values for x go from 1 to 6. So we'll set the x minimum to negative 1 and the x max to 7. Scale it by 1's. The y values go from negative 3 to 16. I like to see the origin, so I'm going to have the y minimum be negative. Let's say negative 5-- and a maximum of 20. And we'll scale this by 5's. Now let's make sure the scatter plot is turned on. We'll press 2nd, Y=. Notice how it's already turned on. But if this was off, we'd press Enter, highlight On, and then press Enter. This is the scatterplot option and the default L1 and L2 for x and y. Let's go ahead and press graph. Here's our data. And what you'll notice is we have this strange equation that was also graphed. And that's because I had an old equation in Y1. So let's go ahead and press Y= clear out these old equations. Let's go back to the graph. Notice how this data does seem to resemble a logarithmic function. Let's go ahead and perform logarithmic regression. And then we'll graph that function right on top of the scatter plot and see how well it fits. So I'm going to press Stat, right arrow once, and then look for log regression, which is off the screen. It's option 9. Notice how we're going to be using the natural log function for our regression model. So we're going to press Enter. And before we press Enter here, we want to select y1 because then it will automatically store the regression equation in y1. So we'll press Vars, right arrow once, Enter, and then Enter to select y1. Now, press Enter one more time. It'll give us our regression equation, r squared and r. And the equation is also in y1. So let's go ahead and press Graph. Graphically, we can see that our model fits the data values very well. Going back to the home screen for a moment, notice that r squared is approximately 0.97, which tells us that approximately 97% of the variability can be explained by this model. Let's go ahead and write this model down and then see if we can answer some questions based upon our equation. And we'll go ahead and round to three decimal places. First question is, how tall will the tree be in 10 years? Remember, x is the number of years and y represents the height of the tree. So for this question, we want to know, when x is equal to 10, what would the y value be? There's a couple ways of doing this on the calculator. Since we have the equation already stored in y1, from the home screen, we can press Vars, right arrow once, Enter, and Enter to select y1. And then using function notation, we want y1 of 10. So we just put a 10 in parentheses. And this will give us the y value when x is 10. So we can see the height of the tree will be approximately 19.8 feet, according to our model, after 10 years. Another way to answer this question would be to use the table feature. If we press 2nd, Window-- let's have our table start at 0, increase by 1, and then leave these options as automatic. If we press 2nd, Graph, now we can just scroll down to x equals 10. Notice how we get the same value we did using the home screen. Number 2 asks us, when will the tree be 30 feet tall? So this is asking, what would x be when y is equal to 30 or 30 feet? So again, there's a couple ways to do this with the calculator. One way would be to scroll down the table and look for y value of 30. This isn't going to give us the most accurate solution. We can see here that after 38 years, the tree will be approximately 30 feet tall. We can also determine this value graphically. If we press Y= and type y equals 30 into y2, we can determine the intersection of these two functions. And the x-coordinate will be when the tree will be 30 feet tall. However, to show the point of intersection, we'll have to adjust the window. We need to make sure that our y maximum is at least 30. So we'll changes this to, let's say, 35. And then we also saw from the table that the x value was approximately 38. So let's go ahead and change the x maximum to 40. Now we'll press Graph. There's our model. There's the height of 30. And now we can press 2nd Trace and select the intersect option. And now we'll press Enter, Enter. And then when it says guess, let's go ahead and just move this cursor closer to that point of intersection. And then press Enter one more time. And we can see that the height will be 30 feet at approximately 37.7 years. One more thing I want to show you before we take a look at this last question-- I'm going to go ahead and adjust the window back to what we had before. I just want to point out that looking at our model, notice that at this x value here, the height would be 0. And then when x is less than this value, the y values would be negative. I just want to make a point that the model would not be appropriate to the left of this point here because we know the height would never be negative. And in fact, we probably would predict the height to be 0 when x is equal to 0. So this model does have some limitations, especially when x is less than 1 year. OK. Last question we want to discuss is, is this a good model? Well, I just gave you one example of when it's not a good model. But in general, based upon having an r squared value of approximately 0.97, and just by viewing the graph of the data and the model, it does look like, for the most part, it's a very good model for the given data set. So I'm not going to write this out, but you may want to think about that a little bit because it is an important question to consider. Whenever we have a model, we do want to analyze what assumptions we're making and what predictions we're drawing from the given model. Every model has its limitations. I hope you found this helpful, and thank you for watching.