Regression Analysis in Excel
Regression Analysis in Excel
Regression Analysis in Excel
com/tutorials/regression-analysis-in-excel/
Post author:Thilina
This tutorial created using Microsoft Excel 2019. Other compatible versions are Excel for Office 365 Excel for Office 365 for Mac;
Excel 2016; Excel 2019 for Mac; Excel 2013; Excel 2010; Excel 2007; Excel 2016 for Mac; Excel for Mac 2011. If you find any issues
doing regression analysis in those versions, please leave a comment below.
In this tutorial, we discuss how to do a regression analysis in Excel. I will teach you how to activate the regression analysis feature,
what are the functions and methods we can use to do a regression analysis in Excel and most importantly, how to interpret the
regression analysis results.
There are four different methods to do the simple linear regression analysis in excel.
Microsoft Excels functions and tools use the least squares method to calculate regression coefficients. Visit this useful article If you like
to learn about least squares method before moving into regression analysis in excel.
In simple linear regression, there is an independent variable (X) and a dependent variable (Y).
We assume that there is a linear relationship between the independent variable , X and the dependent variable , Y. Then we formulate
the equation for that linear relationship between X and Y using regression theory.
Regression equation,
Y = b + mX
1 of 8 06/09/2020, 1:33 am
Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/
This regression model finds the relationship between advertising expenses and sales volume.
Step 02: Fill the table with respective x², y² and xy values.
For calculation of x², y² and xy you can enter the formulas into first row. Then copy the formulas to other rows by dragging the fill
handle. After that, get the sum of each column to the bottom row.
2 of 8 06/09/2020, 1:33 am
Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/
Y = 4733.681 + 1.8693X
We got an R-squared value equals to 0.896. It is very close to 1.0. That means there is a strong relationship between advertisement
expenses (x) and the sales volume (y).
Step 01: Prepare your data in two adjacent columns. Make sure that your independent variable, x is in first column and the dependent
variable, y is in next column.
Step 02 : Select both columns having X and Y values. You have the option to select with or without column headers.
Step 03: Go to → “Insert” Tab → “Charts” group → click “Insert scatter (X,Y ) or Bubble chart” button.
Select any of the Scatter Chart type provided in the drop menu. I prefer the first chart type having only points.
3 of 8 06/09/2020, 1:33 am
Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/
Step 04 : Click anywhere on the scatter chart. Three buttons will appear top right corner just outside the chart area.
Step 05 : Click the “Chart Elements” button which looks like thick ‘+’ symbol.
Step 06 : Move the mouse pointer on to the “Trendline” item of the appeared drop down menu.
Step 07 : Click the small black right-arrow head which appears in “Trendline” menu item.
Now you will see that the “Format Trendline” pane appears right side of the Microsoft Excel window.
Step 09: Configure the trendline options as follows.
4 of 8 06/09/2020, 1:33 am
Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/
Step 02 : Select the suitable the x and y ranges same as above SLOPE formula.
5 of 8 06/09/2020, 1:33 am
Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/
Step 02 : Select the suitable the x and y ranges same as above SLOPE formula.
The best method to do a detailed regression analysis in Excel is to use the “Regression” tool which comes with Microsoft Excel Analysis
ToolPak. It is a very powerful add-in in Microsoft Excel. If you do not know anything about Analysis ToolPak, please go through this
link to learn more.
First you should prepare your data as in previous cases.
Step 01: Go to → “Data tab” → “Analysis” group → click “Data Analysis” command button.
Step 02 : Select “Regression” from “Analysis Tools” list, then click “OK”.
Then the “Regression” dialog box appears.
Step 03: Configure the options for Regression analysis in “Regression” dialog box.
6 of 8 06/09/2020, 1:33 am
Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/
1. Select the cell range that contains your dependent variable for “input Y range”. Then select the cell range that contains your
independent variable for “input X range”.
If you need to do a multiple regression model use the following procedure. Arrange all the independent variables such that they
are in adjacent columns. Select the whole range that contains independent variables as the “Input X range”.
2. Select the check box called “Label” if you selected the x and y ranges with their column headers or title.
3. Keep the default “Output options” selection as “New Worksheet Ply”.
4. Select “Residuals” options from “Residuals” group.
5. Click “OK”.
A new worksheet loads with the information for the regression analysis we just carried out in excel.
R – Squared
This is also called as the coefficient of determination. R-squared value indicates the strength of relationship between independent and
dependent variable. A value that is closer to one indicates a stronger relationship. R-squared value that is closer to zero indicates a
weaker relationship between dependent and independent variable.
Significance F
If the “significance F” value is lower than the significance level you consider which is 0.05 here, then your regression model is
significant. That means it provides a better fit than the intercept only model. In statistics terms, you can reject the null hypothesis that
the “regression model and intercept only model is equal”.
The p-value located next to t-stat tells us the significance of each regression coefficient.
7 of 8 06/09/2020, 1:33 am
Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/
If it is lesser than 5% (0.05) you can conclude that it provides a better fit. When you get a higher p-value than the level of significance,
the coefficients are not that good. Then you should carefully consider whether to include that coefficients in the final regression model
or not.
Residual output
Residual output shows the difference between the values predicted by regression model and observed values for dependent variable.
You can get an overall assessment about how well your model behaves from the residual output.
8 of 8 06/09/2020, 1:33 am