Sei sulla pagina 1di 1

EDUCATION MARKETS SIMULATOR YOUR MONEY ADVISORS ACADEMY

Advertisement
CORPORATE FINANCE & ACCOUNTING FINANCIAL ANALYSIS

Creating a Linear Regression


Advertisement

Corporate
Finance &
Accounting Model in Excel
FINANCIAL ANALYSIS

CORPORATE FINANCE
BY TROY SEGAL | Updated Jul 14, 2019
FINANCIAL STATEMENTS
What is Linear Regression?
FINANCIAL RATIOS Linear regression is a data plot that graphs the linear relationship between an Advertisement

independent and a dependent variable. It is typically used to visually show the


ACCOUNTING strength of the relationship and the dispersion of results – all for the purpose of
explaining the behavior of the dependent variable.
DEBT
Feedback
MERGERS & ACQUISITIONS Say we wanted to test the strength of the relationship between the amount of ice
cream eaten and obesity. We would take the independent variable, the amount of
CORPORATE INSURANCE 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.   

KEY TAKEAWAYS
Linear regression models the relationship between a dependent and
independent variable(s).
Regression analysis can be achieved if the variables are independent,
there is no heteroscedasticity, and the error terms of variables are not be
correlated.
Modeling linear regression in Excel is easier with the Data Analysis
ToolPak.

Important Considerations
There are a few critical assumptions about your data set that must be true to
proceed with a regression analysis:

1. The variables must be truly independent (using a Chi-square test).


2. The data must not have different error variances (this is called
heteroskedasticity (also spelled heteroscedasticity)).
3. The error terms of each variable must be uncorrelated. If not, it means the
variables are serially correlated.
Advertisement
If those three things sound complicated, they are. But the effect of one of those
considerations not being true is a biased estimate. Essentially, you would misstate
the relationship you are measuring.
-33% -9%

Outputting a Regression in Excel


The first step in running regression analysis in Excel is to double-check that the 7299 EGP 3999 EGP 5699 EGP
free Excel plugin Data Analysis ToolPak is installed. This plugin makes calculating a -22%

range of statistics very easy. It is not required to chart a linear regression line, but it
makes creating statistics tables simpler.  To verify if installed, select "Data" from
6399 EGP 6499 EGP 2799 EGP
the toolbar. If "Data Analysis" is an option, the feature is installed and ready to use. Advertisement
If not installed, you can request this option by clicking on the Office button and
selecting "Excel options".

Using the Data Analysis ToolPak, creating a regression output is just a few clicks.

Important: The independent variable goes in the X range.

Given the S&P 500 returns, say we want to know if we can estimate the strength
and relationship of Visa (V) stock returns. The Visa (V) stock returns data populates
column 1 as the dependent variable. S&P 500 returns data populates column 2 as
the independent variable.

1. Select "Data" from the toolbar. The "Data" menu displays.


2. Select "Data Analysis". The Data Analysis - Analysis Tools dialog box displays.
3. From the menu, select "Regression" and click "OK".
4. In the Regression dialog box, click the "Input Y Range" box and select the
dependent variable data (Visa (V) stock returns).
5. Click the "Input X Range" box and select the independent variable data (S&P
500 returns).
6. Click "OK" to run the results.

[Note: If the table seems small, right-click the image and open in new tab for
higher resolution.]

Interpret the Results


Using that data (the same from our R-squared article), we get the following table:

The R2 value, also known as the coefficient of determination, measures the


proportion of variation in the dependent variable explained by the independent
variable or how well the regression model fits the data. The R2 value ranges from 0
to 1, and a higher value indicates a better fit. The p-value, or probability value, also
ranges from 0 to 1 and indicates if the test is significant. In contrast to the R2 value,
a smaller p-value is favorable as it indicates a correlation between the dependent
and independent variables.

Charting a Regression in Excel


We can chart a regression in Excel by highlighting the data and charting it as a
scatter plot. To add a regression line, choose "Layout" from the "Chart Tools"
menu. In the dialog box, select "Trendline" and then "Linear Trendline". To add the
R2 value, select "More Trendline Options" from the "Trendline menu. Lastly, select
"Display R-squared value on chart". The visual result sums up the strength of the
relationship, albeit at the expense of not providing as much detail as the table
above. 

Compete Risk Free with $100,000 in Virtual Cash


Put your trading skills to the test with our FREE Stock Simulator. Compete with
thousands of Investopedia traders and trade your way to the top! Submit trades in
a virtual environment before you start risking your own money. Practice trading
strategies so that when you're ready to enter the real market, you've had the
practice you need. Try our Stock Simulator today >>

Related Articles
FINANCIAL RATIOS
Regression Basics For Business Analysis

FINANCIAL ANALYSIS
What Is the Difference Between Linear
and Multiple Regression?
Partner Links

Sign up for our daily newsletters


ADVANCED TECHNICAL ANALYSIS CONCEPTS
Learn to trade stocks by investing $100,000
What is the Difference Between R- virtual dollars...
Squared and Adjusted R-Squared?
Trade like a top hedge fund manager using
technical analysis and double your wealth...

PORTFOLIO MANAGEMENT
How Can You Calculate Correlation
Using Excel?

FINANCIAL RATIOS
How to Calculate Beta in Excel

RISK MANAGEMENT
Optimize Your Portfolio Using Normal
Distribution

Related Terms
How the Least Squares Method Works
The least squares method is a statistical technique to determine the line of best fit for a
model, specified by an equation with certain parameters to observed data. more

What Regression Measures


Regression is a statistical measurement that attempts to determine the strength of the
relationship between one dependent variable (usually denoted by Y) and a series of other
changing variables (known as independent variables). more

How the Least Squares Criterion Method Works


The least-squares criterion is a method of measuring the accuracy of a line in depicting the
data that was used to generate it. That is, the formula determines the line of best fit. more

What Is an Error Term?


An error term is defined as a variable in a statistical model, which is created when the
model does not fully represent the actual relationship between the independent and
dependent variables. more

Line Of Best Fit


The line of best fit is an output of regression analysis that represents the relationship
between two or more variables in a data set. more

R-Squared
R-squared is a statistical measure that represents the proportion of the variance for a
dependent variable that's explained by an independent variable. more

About Us Terms of Use Dictionary


Editorial Policy Advertise News
Privacy Policy Contact Us Careers

# A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Investopedia is part of the Dotdash publishing family. The Balance | Lifewire | TripSavvy | The Spruce and more

Potrebbero piacerti anche