INSTRUCTOR: Welcome to our lesson on logistic regression. The goals of the video are to perform logistic regression on the TI-84 graphing calculator, determine how well the regression model fits the data, then make predictions using the regression equation. A logistic function is defined as-- we see here-- where a, b, and c are constants. And if B is greater than 0, we have a growth model. And if b is less than 0, we have a decay model. So pictured here in red, we have a logistic growth model. So if our scatter plot fits the pattern of this curve, logistic regression would be a good choice to model the data. Let's take a look at some other variations of the logistic curve. Here's another model of logistic growth. Notice how at the beginning, it looks like exponential growth. But then over time, it levels off. And it can take on a variety of forms and still model logistic growth, as we see here. These would all be logistic growth. And here, we see a model of logistic decay. So again, based upon how the scatter plot behaves, we may want to select logistic regression. Let's take a look at an example. Here, a population of a new fish was introduced to a lake. And we're comparing the number of months since the introduction to the fish population in the thousands. Let's create a scatter plot and see if logistic function would be appropriate. So the first thing we need to do is enter in our data. So we'll press the Stat key and then Enter. Clear out any old data by going to the top of the column. Press Clear and then Enter. So we'll go to the top of L1 and press Clear, Enter. And now we'll enter the new data. Now we need to adjust the window to make sure that these six points will show on the screen. I've already done that. Let's go ahead and take a look. Notice the x values go from 0 to 5. So I set the X minimum to negative 1 and the Xmax to 6 scaling it by 1. Notice that 0 through 5 are in this interval. And then the y values go from 1,000 to 10,500. I wanted to see the origin, so I set the Y minimum to negative 500, the Ymax to 11,000. Again, notice these values will be in this interval. And I scaled it by 500's. Let's go ahead and press Graph. And it does look like logistic growth will be a nice model for this data. Let's go ahead and perform the regression and also store the regression equation in Y1. Unfortunately, the TI-84 graphing calculator does not show r squared for logistic regression, so there's no need to make sure the diagnostic tool is turned on for logistic regression. Let's go ahead and press the Stat key, right arrow once, and scroll down to logistic regression, which is option B. So we're going to press Enter here. Now, we want to store the equation in Y1. So we're going to press Vars, right arrow once, Enter, and then Enter to select Y1. So the regression equation will be automatically stored in Y1. So now we'll press Enter. Here's our logistic model, and it's also stored in Y1. Notice, here, we have the values of a, b, and c. And if we press Graph, we have the scatter plot and the model graphed on the same coordinate plane. And we can visually see that the equation is an excellent model for the given data. In fact, it almost looks like it goes through each point. Let's go ahead and write down our equation and then answer some questions based upon our model. The first question is, what will the fish population be after one year, according to our model? Remember that x represents the number of months and y represents the population in thousands. So if we want to know what the population is after one year, we want to know, when x is equal to 12 for 12 months, what would y be equal to? There's a couple of ways to answer this question. One way would be to use the table feature. If we press 2nd, Window, let's have the table start at 0, increase by 1's, and leave these on automatic. So if we press 2nd, Graph, we can just scroll down to x equals 12, and the y value would be our population. So it looks like it's 10,661. However, remember, this is in thousands, so that would be thousands of fish. The other way would be to go back to the home screen and select Y1 of 12. We can do that by pressing Vars, right arrow, Enter, Enter, and then in parentheses, enter 12. So this is just like function notation. And I actually prefer this method here because, remember, this is in thousands. So if we multiply this by 1,000, we'll have the actual number of fish predicted from our model. So it looks like we'd have 10,660,543 fish after one year, based upon our model. Number 2-- is the model a good indicator of the initial fish population? Going back to our data, the initial fish population was 1,000 times 1,000 or 1 million fish. Using our model, if we replace x with 0, that will give us the initial amount based upon the model. And instead of doing this by hand, we can go ahead and use the graphing calculator and determine Y1 of 0. So Vars, right arrow, Enter, Enter. So Y1 of 0 gives us approximately 1,013. Remember, this is in the thousands. So we'll multiply this by 1,000. And according to the model, the initial population was 1,012,863 fish. And again, this was from the model, but the actual data says it was 1 million. So our model is off a little bit, but that's the case for most models. There are limitations for every model. Number 3 asks, what will the maximum population be? If we go back to our table and start scrolling down, notice how the population levels out. And it looks like approximately 10,661. And again, that would be thousands. So that would be 10,661,000 fish as the maximum population. So we can see from the data the population grew dramatically for the first four months. And then it started to level off, more than likely because the lake had a limited amount of resources to support the population. Looking at the equation for a moment, as x increased, this exponent decreased. So this entire term here actually approached 0. And therefore, the numerator of this fraction rounded to the nearest integer gave us the maximum fish population. And that's true for any logistic growth function. The last question to consider-- is this a good model? Why or why not? Again, unfortunately, the graphing calculator didn't give us r squared, but we can tell graphically that this model seems like an excellent fit for that data. And therefore, it would be a good model to make predictions, assuming the resources in the lake stay consistent after the time frame provided by the given data. I think we'll go ahead and stop here. I hope you found this example helpful. Thank you, and have a good day.