 Hello friends, in the last two sessions we have studied about various forecasting methods, what is forecasting, what are the advantages and applications of forecasting, what are the various methods of forecasting. Further to the same, we will be going to study today, what is regression analysis and how it can be used for forecasting. At the end of this session, we will be able to apply and analyze linear regression as a tool for the forecasting and if the problem of the forecasting is given, we will be able to find out with the help of linear regression, what is the forecast for the future period. The overall content will be, we will first introduce what is regression is, simple linear regression, what are the assumptions in the linear regression, how to calculate coefficient of regressions. We will have a small example, a very simple small example of linear regression and finally, what are the references we have used. Regression analysis as you know is a statistical tool for investigating the relationship between a dependent variable and one or more independent variables. This is a forecasting model in which historical data is used to establish functional relationship between variables and then used to forecast dependent variable values. We have got the variables in the production area manufacturing area like sales versus the demand. We can have production capacity and sales. We can have a very simple example of a driving also, the rash driving versus accidents. So, we are generally classifying variables into two categories. One is dependent variable and independent variable. The data of independent variable is known and then we are finding out what is the value of dependent variable depending upon the statistical analysis of the historical data which we have. We are using this method for forecasting into mainly production area. It is an important tool for modeling and analyzing the data. We fit the curve or the line to data points in such a manner that the differences between the data points from the curve or the line is minimized. We have got a data point and we have got a curve or a line. Then we try to estimate the difference between the data point and the curve is be as minimum as possible. That is why it is also called as a least square method. What are the applications of regression analysis? Applications can be into any field. It can be into engineering to solve management problems, to solve biological problems, to find out solutions for physical and chemical sciences. It has got important applications in economics as well as into social sciences. Simple linear regression. Regression can be into simple or in multiple regression analysis. We are going to study simple regression analysis today. Simple linear regression model establishes a relationship between dependent variable y and one or more independent variables x using a best fit straight line also known as regression analysis. We all know y is equal to mx plus c, a very common equation which you have been studying from the high school days. The same equation is generally the linear regression model which we are using for the forecasting model. It is generally represented as y is equal to a plus bx plus e where y is the response variable. We want to find out the value of y. x is the regression variable, b is the slope of the straight line, e is the error of the variation and a is the intercept. You know y is equal to mx plus c. Now what can you think about when the slope of the line is more or when the slope of the line is less? What is the interpretation of the slope? The interpretation of the slope you can think and then try to give the answer of this. The answer is the greater is the magnitude of the slope, the steeper is the line. That means greater is the rate of the change. Rate of change is correlated with the slope. The more is the rate of change, the steeper will be the slope of the equation. We have got some basic assumptions in the linear regression. Some of the assumptions are the dependent and independent variable show a linear relationship between the slope and the intercept. This is a very fundamental and basic assumption that it follows a linearity. Two variables are following. Linearity we are not trying to find out any other type of equations. Nonlinear relations we are not studying over here. The dependent variable is not randomized. The value of the residual is 0. The value of the residual is constant across all observations. The value of the residual is not correlated across all observations. And the residual value follow a normal distribution curve. Once we say that normal distribution curve is followed, we can apply all the theory of statistics related to normal distribution for this particular equation. How to obtain a best fit line or how to find out value and A and B? The task can be easily accomplished by least a square method. It calculates the best fit line or the observed data by minimizing the sum of the squares of the vertical deviations from each data point to the line. Because the deviations are first squared, when added there is no cancelling out between positive and negative values. That is the difference between the data point and the line. When squared we will give the minimum value that is why this method is called as least a square. We are trying to find out the differences as many as possible. Linear regression will make this particular line with the minimum possible square that is least a square method. The coefficient of A and B can be calculated by following two equations. Where B is equal to N into bracket sigma xt dt minus into bracket sigma xt multiplied by sigma dt divided by N into sigma x square t minus sigma xt bracket square. This is the value of B and the value of A can be found out with a simple equation sigma dt minus B into sigma xt upon N where D is equal to A plus Bx and N is the number of periods that are available for the which the data we know already. We will try to solve the problem with a let us take a simple example. A paper box company makes carry out pizza boxes. The operation planning department knows that pizza sales of major client are function of advertising dollars the client spends. That means it is a function of advertisement. So sale will be proportional to the advertisement the company spending an account which they can receive in advance of the expenditure. Operation planning is interested in determining the relationship between client sale and advertisement. The amount of pizza boxes the client will order in dollar volume is known to be fixed percentage of sales. What is the meaning of this? The meaning of this is that a client is there and where there is a relation between the company spends on the advertising and the sales volume. So sales are correlated with the adverting expenses. For example in the first quarter the adverting expenses have been 4 lakhs and the sales have been 1 cr. In the second quarter the adverting expenses has gone up to higher level like 10 lakhs and the sales has jumped from 1 to 4 cr. Similarly if you look at the sixth quarter the advertisement has gone to 16 lakhs the advertisement has gone to 12 lakhs and the sale has remained as 4 lakhs. So the second column is indicating the advertising spent and the last column is indicating sales of the company in cr. Now what we have to find out is we have to calculate the sales forecast for the next quarter that is 11th quarter when in the 11th quarter the company is expected to spend around 11 lakhs rupees on the advertisement. Is the problem clear to you? That the data of 10 quarter is given to you the data of all advertisement of 10 quarter is available. Similarly the data for the actual sales is also available. Now the estimate for the 11th quarter for advertisement is 11 lakhs we have to estimate the sales forecast with the help of regression analysis. So that is the problem formulation. Let us try to solve this problem. We have made an excel sheet where quarter 1 to 10 the first column second column is obtained expenses as given in the data the third column sales as given in this the fourth and fifth column are xt square and xt dt the multiplication of these two and then finally you have summed up the data and then we have taken sigma of xt dt sigma of dt sigma of bracket xt square and sigma of xt dt all the values are required for the formula. Putting all these values into formula we are getting a solution the solution is like this the value of b is equal to 10 into bracket 328 minus 96 into 30 divided by 10 into 10 60 minus 96 divided square the value of b comes out to be 0.29 similarly the value of a comes out to be 0.22 hence the ft for the period is 0.22 into 0.29 xt and the value of xt we put into 11 finally we get 3.41 cr as the forecast for the 11th quarter. So given the data we will be able to estimate and we will be able to forecast with the help of regression analysis that expected sale in the 11th quarter will be 3.41 cr. So this is a very simple method we can find out the various values based on this similarly if I put xt as 12 we will be able to forecast the value for the 12th quarter also we can try this by putting xt is equal to 15 also we will have the practice and then we can find out try to correlate regression analysis and the forecasting okay thank you