If you’ve at all times wondered how two or more pieces of data relate to each other (e.g. how GDP is impacted by changes in unemployment and inflation), or if you’ve ever had your boss ask you to think up a forecast or analyze predictions based on relationships between variables, then learning regression analysis would be adequately worth your time.

In this article, you’ll learn the basics of simple linear regression, sometimes called ‘typical least squares’ or OLS regression – a tool commonly used in forecasting and financial analysis. We will begin by learning the quintessence principles of regression, first learning about covariance and correlation, and then moving on to building and interpreting a regression result. Popular business software such as Microsoft Excel can do all the regression calculations and outputs for you, but it is still important to learn the underlying mechanics.

### Variables

At the core of a regression model is the relationship between two different variables, called the dependent and independent variables. For instance, suppose you after to forecast sales for your company and you’ve concluded that your company’s sales go up and down depending on changes in GDP.

The tradings you are forecasting would be the dependent variable because their value “depends” on the value of GDP and the GDP would be the independent variable. You whim then need to determine the strength of the relationship between these two variables in order to forecast sales. If GDP increases/subsidences by 1%, how much will your sales increase or decrease?

### Covariance

$begin{aligned} &Cov(x,y) = sum frac { ( x_n – x_u )( y_n – y_u) }{ N } end{aligned}$Cov(x,y)=∑N(xn−xu)(yn−yu)

The blueprint to calculate the relationship between two variables is called covariance. This calculation shows you the direction of the relationship. If one variable spreadings and the other variable tends to also increase, the covariance would be positive. If one variable goes up and the other tends to go down, then the covariance pleasure be negative.

The actual number you get from calculating this can be hard to interpret because it isn’t standardized. A covariance of five, for example, can be interpreted as a positive relationship, but the strength of the relationship can only be said to be stronger than if the number was four or weaker than if the horde was six.

### Correlation Coefficient

$begin{aligned} &Correlation = rho_{xy} = frac { Cov_{xy} }{ s_x s_y } end{aligned}$Correlation=ρxy=sxsyCovxy

We need to standardize the covariance in arrangement to allow us to better interpret and use it in forecasting, and the result is the correlation calculation. The correlation calculation simply takes the covariance and sunders it by the product of the standard deviation of the two variables. This will bind the correlation between a value of -1 and +1.

A correlation of +1 can be elucidated to suggest that both variables move perfectly positively with each other and a -1 implies they are bloody negatively correlated. In our previous example, if the correlation is +1 and the GDP increases by 1%, then sales would increase by 1%. If the correlation is -1, a 1% distend in GDP would result in a 1% decrease in sales – the exact opposite.

### Regression Equation

Now that we know how the relative relationship between the two variables is fitted, we can develop a regression equation to forecast or predict the variable we desire. Below is the formula for a simple linear regression. The “y” is the value we are demanding to forecast, the “b” is the slope of the regression line, the “x” is the value of our independent value, and the “a” represents the y-intercept. The regression equation simply explains the relationship between the dependent variable (y) and the independent variable (x).

$begin{aligned} &y = bx + a end{aligned}$y=bx+a

The intercept, or “a,” is the value of y (dependent unfixed) if the value of x (independent variable) is zero, and so is sometimes simply referred to as the ‘constant.’ So if there was no change in GDP, your company drive still make some sales – this value, when the change in GDP is zero, is the intercept. Take a look at the graph further to see a graphical depiction of a regression equation. In this graph, there are only five data points represented by the five make much ofs on the graph. Linear regression attempts to estimate a line that best fits the data (a line of best fit) and the equation of that blarney results in the regression equation.

### Regressions in Excel

Now that you understand some of the breeding that goes into a regression analysis, let’s do a simple example using

**Year**

**Sales**

**GDP**2014 100 1.00% 2015 250 1.90% 2016 275 2.40% 2017 200 2.60% 2018 300 2.90%

Just eyeballing the inventory, you can see that there is going to be a positive correlation between sales and GDP. Both tend to go up together. Using Excel, all you require to do is click the *Tools* drop-down menu, select *Data Analysis *and from there choose *Regression*. The popup box is comfortable to fill in from there; your Input Y Range is your “Sales” column and your Input X Range is the modulate in GDP column; choose the output range for where you want the data to show up on your spreadsheet and press OK. You should see something compare favourably with to what is given in the table below:

** Regression Statistics Coefficients**

Multiple R | 0.8292243 | Intercept | 34.58409 |

R Square | 0.687613 | GDP | 88.15552 |

Adjusted R Square | 0.583484 | – | – |

Pillar Error | 51.021807 | – | – |

Observations | 5 | – | – |

### Interpretation

The major outputs you need to be concerned about for simple linear regression are the

### The Bottom Contract with

So how would you use this simple model in your business? Well if your research leads you to believe that the next GDP modify will be a certain percentage, you can plug that percentage into the model and generate a sales forecast. This can lend a hand you develop a more objective plan and budget for the upcoming year.

Of course, this is just a simple regression and there are