A linear regression is a data plot that graphs the linear relationship between an independent and a dependent variable. It is typically used to visually show the strength of the relationship, and the dispersion of results – all for the purpose of explaining the behavior of the dependent variable.
Say, as a simple example, we wanted to see test the strength of the relationship between amount of ice cream eaten and obesity. We would take the independent variable, the amount of ice cream, and relate it to the dependent variable, obesity, to see if there was a relationship. Given a regression is a graphical display of this relationship, the lower the variability in the data, the stronger the relationship, and the tighter the fit to the regression line.
Important Considerations
There are a few critical assumptions about your data set that must be true in order to proceed with a regression analysis:
 The variables must be truly independent (using a Chisquare test).
 The data must not have different error variances (this is called heteroskedasticity).
 The error terms of each variable must be uncorrelated. If not, it means the variables are serially correlated.
If those three things sound complicated, well – they are. But the effect of one of all of those considerations not being true is a biased estimate. Essentially, you'd be misstating the relationship you are trying to measure.
Outputting a Regression in Excel
The first step in running regression analysis in Excel is to doublecheck that the free Excel plugin Data Analysis ToolPak is installed. This plugin makes calculating a range of statistics very easy. It is not required to chart a linear regression line, but it makes creating statistics tables simpler.
Using the Data Analysis ToolPak, creating a regression output is just a few clicks. Remember that the independent variable goes in the X range.
Say we want to know, given the S&P 500 returns, if we can estimate the strength and relationship of Visa (V) stock returns.
Go to the Data Tab —> Data Analysis, and run the result:
[Note: If the table seems small, rightclick image and open in new tab for higher resolution.]
Interpret the Results
Using that data (the same from our Rsquared article), we get the following table:
Charting a Regression in Excel
We can chart a regression in Excel by highlighting the data and charting it as a scatter plot. Apply some formatting, and the visual result sums up the strength of the relationship, albeit at the expense of not providing as much detail as the table above.

How do you calculate variance in Excel?
To calculate statistical variance in Microsoft Excel, use the builtin Excel function VAR. Read Answer >> 
How do you calculate Rsquared in Excel?
Calculate Rsquared in Microsoft Excel by creating two data ranges to correlate. Use the correlation formula to correlate ... Read Answer >> 
Do production costs include all fixed and variable costs?
Learn more about fixed and variable costs and how they affect production costs. Understanding how to graph these costs can ... Read Answer >> 
What are the differences between regressive, proportional, and progressive taxes?
Learn the three basic types of tax systemsregressive, proportional, and progressiveused in the U.S., and how they affect ... Read Answer >> 
How should I interpret a negative correlation?
Learn more about correlation and how businesses analyze variables. Find out how negative correlations are interpreted by ... Read Answer >> 
How do fixed costs and variable costs affect gross profit?
Learn about the differences between fixed and variable costs and find out how they affect the calculation of gross profit ... Read Answer >>

Trading
When Is A Bull Market Not A Bull Market?
During some bull or bear moves in the stock markets, investors will be going with the trend, but day traders may find they cannot. 
Taxes
Comparing Regressive, Proportional and Progressive Taxes
Learn about the basic differences between three common tax systems. 
Financial Advisor
How Do Companies Forecast Oil Prices?
Read about the different forecasting methods that businesses use to predict future crude oil prices, and why it's so difficult to guess correctly. 
Investing
Guide To Excel For Finance
Formulas, functions and features you need to know when using Excel for financial analysis. 
Investing
Rising Prices: Inflation or Quality Improvements?
Price indices are used to measure inflation, but qualitative improvements in products complicates attempts to isolate the true cause of rising prices. 
Financial Advisor
Calculating Beta: Portfolio Math For The Average Investor
Beta is a useful tool for calculating risk, but the formulas provided online aren't specific to you. Learn how to make your own. 
Managing Wealth
Variable Annuities: The Pros and Cons
Variable annuities are one of the most complicated financial instruments—weighing the pros and cons.

Line Of Best Fit
The line of best fit is an output of regression analysis that ... 
Nonlinear Regression
Nonlinear regression is a form of regression analysis in which ... 
Least Squares Method
The least squares method is a statistical technique to determine ... 
Econometrics
Econometrics is the application of statistical and mathematical ... 
Residual Sum Of Squares  RSS
A residual sum of squares is a statistical technique used to ... 
Characteristic Line
A characteristic line is a line formed using regression analysis ...