Welcome to customer analytics. So, as Pete mentioned, there are broadly two ways in which we can think about quantifying data. One is making predictions one period ahead. The other is making predictions more than two periods ahead. So, in this module, we'll talk about the first one, making predictions one period ahead. How do we do that? It's done through regression analysis. So what we're going to do with this module is talk about a simple example, show how regression can be done, show what predictions it can make. And then, we'll take it off with Pete, who'll talk more about two periods ahead. So let's start with regression analysis. What's regression all about? It's about quantifying the relationship between two or more variables. Let's take a simple example. Suppose you're looking at demand or data of people purchasing, and you know how prices were changing. What you'd like to do is to think about how you can start thinking about how price is changing demand. In other words, put some numbers behind it. Let's look at some jargon of regression. What we're trying to do is to explain a dependent variable, in this case sales or demand, as a function of independent variables,in this case price. In other words, all we're trying to do in regression is try to make predictions of what would be the demand at different prices. Regression is a technique that uses simple linear additive model to make these kinds of predictions. It'll become clear by taking a simple example. Let's imagine this is the demand data for a particular firm at different prices. What this firm was trying to do is to try and understand how the prices might change demand. So they ended up changing the prices and they observed the demand. The very first thing we should do when we start thinking about quantifying the relationship is just plot the data. So let's plot it. Here's what the plot looks like. What do we see here? On the horizontal axis, we have price. On the vertical axis, we have sales. And what you see here, which is what intuitively you would expect to see is that as prices go up, sales come down. On the one hand, it's intuitive. It makes a lot of sense, and this is what you would call a demand curve. Prices going up, sales coming down. Where does regression come in? Regression comes in to give some hard numbers. You can eyeball it and see that as you increase price, sales does come down. But we would like to see it's specifically by how much. In other words, we'd like to answer the following question. If I increase price by one dollar, how much does sales come down? That's where regression comes in. What does regression do? It tries to fit a straight line to the data that we see here and tries to put formal numbers behind this demand curve. Broadly, what we're going to talk about in a simple example is demand analysis. This is a specific example for regression. You can think about doing it for many other types of data. What we're doing here is sales as a function of price. You can think about sales as a function of advertising. You can think about a variety of different variables that you'd like to see if they're connected together. So the simplest form of regression analysis that we can do here is sales, which is our dependent variable, is a function of price, which is our independent variable. So if you look on the left hand side, we have sales. On the right hand side, we have price. The coefficient b, which is in front of price, basically measures price sensitivity. In the next slide, I'm going to show you how getting an understanding of what b is basically help us understand, if I increase price by one dollar, how much would the sales come down? Now, this equation that we see here is a form of a general regression example, where you can think about sales as being represented by Y, and price being represented by X. So, in the question below, what I've shown you is a general form where you can think about putting in many different Ys that you'd care about. For example, if you're in a company that looks at advertising and sales, in your example, Y would be sales, that's what you're trying to predict, that's your dependent variable, and X would be advertising, that's your independent variable. In this example that we're showing you here, Y is sales as well, X is price. Once you run the regression, what you would see here is a regression or predicted line. That's the line that you see on the graph there. In the line you also see a regression equation, which basically tells you how your sales and prices are connected together. And you also see something called an R-squared. Let me first give an intuition of what R-squared is. R-squared basically tells you how good is the regression line. The more scatter that you see from the straight line, R-squared would be smaller. In other words, the straight line is not able to capture all the variations. The more the lines are closer to the straight line, you would see that R-squared is quite high, closer to one. In other words, the regression is doing quite a good job. Once you determine that the regression is doing a good job, typically R-squared about 70 to 80 percent, then you can go ahead and start using this regression for making predictions. And that's what we will do next.