If you've ever wondered how two or more things relate to each other, or if you've ever had your boss ask you to create a forecast or analyze relationships between variables, then learning regression would be worth your time. In this article, you'll learn the basics of simple linear regression  a tool commonly used in forecasting and financial analysis. We will begin by learning the core principles of regression, first learning about covariance and correlation, and then move on to building and interpreting a regression output. A lot of 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 center of regression is the relationship between two variables, called the dependent and independent variables. For instance, suppose you want 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 sales 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 would then need to determine the strength of the relationship between these two variables in order to forecast sales. If GDP increases/decreases by 1%, how much will your sales increase or decrease?
Covariance
The formula to calculate the relationship between two variables is called covariance. This calculation shows you the direction of the relationship as well as its relative strength. If one variable increases 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 would 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 instance, 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 number was six.
Correlation Coefficient
We need to standardize the covariance in order 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 divides it by the product of the standard deviation of the two variables. This will bound the correlation between a value of 1 and +1. A correlation of +1 can be interpreted to suggest that both variables move perfectly positively with each other, and a 1 implies they are perfectly 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% increase 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 calculated, 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 trying to forecast, the "b" is the slope of the regression, the "x" is the value of our independent value, and the "a" represents the yintercept. The regression equation simply describes the relationship between the dependent variable (y) and the independent variable (x).
The intercept, or "a", is the value of y (dependent variable) if the value of x (independent variable) is zero. So if there was no change in GDP, your company would still make some sales  this value, when the change in GDP is zero, is the intercept. Take a look at the graph below to see a graphical depiction of a regression equation. In this graph, there are only five data points represented by the five dots on the graph. Linear regression attempts to estimate a line that best fits the data, and the equation of that line results in the regression equation.
Figure 1: Line of best fit 
Source: Investopedia, 2009. 
Excel
Now that you understand some of the background that goes into regression analysis, let's do a simple example using Excel's regression tools. We'll build on the previous example of trying to forecast next year's sales based on changes in GDP. The next table lists some artificial data points, but these numbers can be easily accessible in real life.
Year  Sales  GDP 
2005  100  1.00% 
2006  250  1.90% 
2007  275  2.40% 
2008  200  2.60% 
2009  300  2.90% 
Just eyeballing the table, 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 have to do is click the Tools dropdown menu, select Data Analysis, and from there choose Regression. The popup box is easy to fill in from there; your Input Y Range is your "Sales" column and your Input X Range is the change 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 similar 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     
Standard Error  51.021807     
Observations  5     
Interpretation
The major outputs you need to be concerned about for simple linear regression are the Rsquared, the intercept and the GDP coefficient. The Rsquared number in this example is 68.7%  this shows how well our model predicts or forecasts the future sales. Next we have an intercept of 34.58, which tells us that if the change in GDP was forecasted to be zero, our sales would be about 35 units. And lastly, the GDP correlation coefficient of 88.15 tells us that if GDP increases by 1%, sales will likely go up by about 88 units.
So how would you use this simple model in your business? Well if your research leads you to believe that the next GDP change will be a certain percentage, you can plug that percentage into the model and generate a sales forecast. This can help you develop a more objective plan and budget for the upcoming year. Of course this is just a simple regression and there are models that you can build that use several independent variables called multiple linear regressions. But multiple linear regressions are more complicated and have several issues that would need another article to discuss.

Fundamental Analysis
Guide To Excel For Finance
Formulas, functions and features you need to know when using Excel for financial analysis. 
Professionals
Microsoft Excel Features For The Financially Literate
Here are some of Excel's functions and features that a financial professional can use to make his or her job more efficient. 
Forex Education
How To Trade Currency And Commodity Correlations
Relationships between currencies and commodities exist throughout the financial markets. Find out how to trade these trends. 
Forex Education
Improve Your Investing With Excel
Excel is a useful tool to assist with investment organization and evaluation. Find out how to use it. 
Trading Systems & Software
Backtesting And Forward Testing: The Importance Of Correlation
Correlations between backtesting and forward performance testing results can help you optimize your trading system. 
Forex Education
Using Currency Correlations To Your Advantage
Knowing the relationships between pairs can help control risk exposure and maximize profits. 
Professionals
Small RIAs: How to Level the Playing Field
In order to compete with larger firms, small RIAs have to get a little creative. Here are a few ways to kickstart growth. 
Mutual Funds & ETFs
ETF Analysis: PowerShares S&P 500 Low Volatility
Find out about the PowerShares S&P 500 Low Volatility ETF, and learn detailed information about this fund that provides exposure to lowvolatility stocks. 
Mutual Funds & ETFs
ETF Analysis: SPDR Barclays Short Term Corp Bd
Learn about the SPDR Barclays ShortTerm Corporate Bond ETF, and explore detailed analysis of the exchangetraded fund tracking U.S. shortterm corporate bonds. 
Mutual Funds & ETFs
ETF Analysis: Vanguard IntermediateTerm Bond
Find out about the Vanguard IntermediateTerm Bond ETF, and delve into detailed analysis of this fund that invests in investmentgrade intermediateterm bonds.

Compound Annual Growth Rate  CAGR
The Compound Annual Growth Rate (CAGR) is the mean annual growth ... 
Enterprise Investment Scheme (EIS)
A UK program that helps smaller, riskier companies to raise capital ... 
Per Transaction Fees
An expense a business must pay each time it processes a customer’s ... 
Operating Cost
Expenses associated with administering a business on a day to ... 
Altman ZScore
The output of a creditstrength test that gauges a publicly traded ... 
Age Discrimination In Employment ...
A federal statute protecting "certain applicants and employees" ...

What is the difference between business intelligence and business analytics?
Business intelligence and business analytics share the same goal  to help firms make better decisions through actionable ... Read Full Answer >> 
What kind of training do I need for a career in business analytics?
There is rising demand and competition for data analytics in business. To build a career, prospective analysts should earn ... Read Full Answer >> 
What assumptions are made when conducting a ttest?
The common assumptions made when doing a ttest include those regarding the scale of measurement, random sampling, normality ... Read Full Answer >> 
What types of capital are not considered share capital?
The money a business uses to fund operations or growth is called capital, and there are a number of capital sources available. ... Read Full Answer >> 
What are some of the more common types of regressions investors can use?
The most common types of regression an investor can use are linear regressions and multiple linear regressions. Regressions ... Read Full Answer >> 
What types of assets lower portfolio variance?
Assets that have a negative correlation with each other reduce portfolio variance. Variance is one measure of the volatility ... Read Full Answer >>