Hello, everyone. Welcome to our lecture; real-world example. In this video, I'm going to use the normal equation to answer this question here. We have a CSV file called ice cream sales, and then we want to use that data frame to answer this question. We want to be able to predict the sales of the ice cream when the temperature rises to 89, 92, and 101 degrees. To refresh your memory, you can check the video about normal equations, just in case you forgot about what normal equation is. First, I need to convert our data set into a pandas DataFrame and then look at the whole DataFrame. It has the temperature columns and the sales column. The target obviously is a sale column because it is a dependent column. The sales of the ice cream would depend on the temperature. If the temperature is below zero, obviously there will be fewer sales. That will be our Y, and then we want to use that to run our regression model. Now, we can do one thing by sorting this data by sales. We want to start from this lowest number to the biggest number. If you look at here, the lowest number is 40, 228. I'll sort it by sales. If you look at it, we start from smaller number and I end up to the biggest number. Again, like I said, we set X to be the temperature and a Y to be the sale. If you look at the Y here, it gives you the price; the total sale of the ice cream. Now, we are going to use our normal equation here. The solution to this linear regression problem is X transpose times X raised to the power negative one times X transpose times Y. Now, I'm going to do step-by-step. First, I find X transpose times X, which is right here. Now, we start to P, and I will take the inverse of it. X transpose times X inverse equals P. Now, the next thing is X transpose times Y, that's right here, X transpose times Y. Then we can sort out the variable called Q. Q is X transpose times Y. Now as a result, our A will be equal to P times Q; A equals P times Q, which tell us about our intercept, and our slope is 5.96. We got the solution to this linear equation. The next one that we need to do is to plot it; the solution and our data points. You look at the data point here in red, and then the solution is in a blue dashed line. You see our line fits this data point. It's not perfect, but it fit it. The next one we need to do is to predict the sales when the temperature is 89 first. It's a 566. If the temperature is 92, we got 583.89. When the temperature is 101 we have this. This is the prediction when the temperature reaches 101 degrees. The next thing that we need to do is to find the error that we're committing. You remember this is the true data set and our prediction is here. The difference of these two value, we're going to get this total sum of the square of those differences. What did I do here? Let me write the difference of these two and then if I take the square root of that, we get this. In this video, we'll learn how to convert a CSV file, a real data CSV data file, to a pandas DataFrame. Once you've done that, we're able to identify our target, which is the dependent variable always, and then we use our normal equations to approximate the linear solution to this ice creams sale problem. Once we get done, we visualize our solutions, compare it to the real data set, and then we find the error that we're making while approximating the data set with our model, which is a blue dashed line here. Thanks everybody. I will see you in the next video.