SlideShare a Scribd company logo
1 of 8
Download to read offline
Linear Regression Analysis In Excel- A Complete Guide
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.
1. Manual method for simple linear regression analysis.
2. Regression analysis with Excel formulas or worksheet functions.
3. Regression analysis with scatter plot charts with Trendline.
4. Detailed linear regression analysis in Excel using Analysis ToolPak.
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.
Manual method of simple linear regression analysis with least squares
method
You have to know at least a little bit about the regression formulas to carry out a manual regression analysis.
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
Equation for slope of the regression line,
Equation for intercept of the regression line
Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/
1 of 8 06/09/2020, 1:33 am
Equation for R-squared
Let us see an example to learn the procedure for regression analysis.
This regression model finds the relationship between advertising expenses and sales volume.
Regression analysis procedure in manual method
Step 01: set up the calculation table as follows. Keep columns for x,y, x², y² and xy.
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.
Finally your table should look like this.
Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/
2 of 8 06/09/2020, 1:33 am
Step 03: Calculate the regression coefficients using equations as follows.
Now you should get your output as follows,
Interpretation of results of regression analysis in manual method.
Slope of the regression line (m) = 1.8693
Intercept of the regression line (b) = 4733.681
Therefore, the regression equation for this case is,
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).
Regression analysis in excel using scatter plot charts with Trendline
You can use Microsoft Excel scatter charts when you want to do a quick and brief regression analysis. This method also uses the least
squares method. In addition to simple linear regression, Trendline gives you the option to fit your data in to other regression models
such as, exponential; logarithmic; polynomial; power and moving average.
Regression analysis procedure in excel using trendline option
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.
Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/
3 of 8 06/09/2020, 1:33 am
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.
Step 08 : Click “More options” 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.
Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/
4 of 8 06/09/2020, 1:33 am
1) Select radio button for “Linear”.
2) Select the checkbox for “Display Equation on chart”.
3) Select the checkbox for “Display R – squared value on chart”.
Now, you can see the regression equation and R² value above the trendline.
Compare the equation to the equation we got in manual method. You should see that they are similar.
Regression analysis in Excel using formulas or worksheet functions
There are times that you only need to find regression coefficients. In that case you can simply use Excel worksheet functions or
formulas. SLOPE (), INTERCEPT () and RSQ () are the main worksheet function you will need to find linear regression coefficients.
Prepare your independent (X) and dependent (Y) variable values as in previous cases.
Calculate the slope of the regression line
Step 01 : Insert “= SLOPE ()” formula within a desired cell.
Step 02 : For the first parameter, select the Excel cell range that you have entered the Y-values which is the dependent variable. And
for the second parameter select the cell range that you have entered the X-values which is the independent variable.
Step 03 : Press “Enter”.
Now we got the value for the slope of the regression line.
Calculate the intercept of the regression line
Step 01 : Insert “= INTERCEPT ()” formula within a desired cell.
Step 02 : Select the suitable the x and y ranges same as above SLOPE formula.
Step 03 : Press “Enter”.
Now we got the value for the intercept of the regression line.
Calculate the R-squared value of the regression model
Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/
5 of 8 06/09/2020, 1:33 am
Step 01 : Insert “= RSQ ()” formula within a desired cell.
Step 02 : Select the suitable the x and y ranges same as above SLOPE formula.
Step 03 : Press “Enter”
Now we got the value for the R-squared value of the regression line.
Compare the these coefficients to the coefficients we got in other two method. It is clear that they are similar.
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.
Now the “Data analysis” dialog box appears.
If you cannot find the “Data Analysis” button, go through the Analysis ToolPak tutorial here.
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.
Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/
6 of 8 06/09/2020, 1:33 am
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.
Interpretation of the regression analysis output in excel
Let us discuss the most important parts of information in the regression analysis output.
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”.
p-value for coefficients
The p-value located next to t-stat tells us the significance of each regression coefficient.
Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/
7 of 8 06/09/2020, 1:33 am
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.
Download the Regression analysis in Excel example file
You can download the excel file which has all the examples I have discussed above.
Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/
8 of 8 06/09/2020, 1:33 am

More Related Content

What's hot

Data Science - Part IV - Regression Analysis & ANOVA
Data Science - Part IV - Regression Analysis & ANOVAData Science - Part IV - Regression Analysis & ANOVA
Data Science - Part IV - Regression Analysis & ANOVADerek Kane
 
Multiple regression presentation
Multiple regression presentationMultiple regression presentation
Multiple regression presentationCarlo Magno
 
Data Analysis using SPSS: Part 1
Data Analysis using SPSS: Part 1Data Analysis using SPSS: Part 1
Data Analysis using SPSS: Part 1Taddesse Kassahun
 
Chap03 numerical descriptive measures
Chap03 numerical descriptive measuresChap03 numerical descriptive measures
Chap03 numerical descriptive measuresUni Azza Aunillah
 
Spss lecture notes
Spss lecture notesSpss lecture notes
Spss lecture notesDavid mbwiga
 
Statistics For Data Science | Statistics Using R Programming Language | Hypot...
Statistics For Data Science | Statistics Using R Programming Language | Hypot...Statistics For Data Science | Statistics Using R Programming Language | Hypot...
Statistics For Data Science | Statistics Using R Programming Language | Hypot...Edureka!
 
Simple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-StepSimple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-StepDan Wellisch
 
Data Analytics Using MS Excel
Data Analytics Using MS ExcelData Analytics Using MS Excel
Data Analytics Using MS ExcelRajesh Math
 
Measures of central tendency
Measures of central tendencyMeasures of central tendency
Measures of central tendencyJoydeep Hazarika
 
Regression analysis
Regression analysisRegression analysis
Regression analysissaba khan
 
Simple Linier Regression
Simple Linier RegressionSimple Linier Regression
Simple Linier Regressiondessybudiyanti
 
Business analytics
Business analyticsBusiness analytics
Business analyticsSilla Rupesh
 
Introduction to Statistics
Introduction to StatisticsIntroduction to Statistics
Introduction to StatisticsAnjan Mahanta
 

What's hot (20)

Data Science - Part IV - Regression Analysis & ANOVA
Data Science - Part IV - Regression Analysis & ANOVAData Science - Part IV - Regression Analysis & ANOVA
Data Science - Part IV - Regression Analysis & ANOVA
 
statistic
statisticstatistic
statistic
 
Multiple regression presentation
Multiple regression presentationMultiple regression presentation
Multiple regression presentation
 
Data Analysis using SPSS: Part 1
Data Analysis using SPSS: Part 1Data Analysis using SPSS: Part 1
Data Analysis using SPSS: Part 1
 
Chap03 numerical descriptive measures
Chap03 numerical descriptive measuresChap03 numerical descriptive measures
Chap03 numerical descriptive measures
 
Spss lecture notes
Spss lecture notesSpss lecture notes
Spss lecture notes
 
Statistics For Data Science | Statistics Using R Programming Language | Hypot...
Statistics For Data Science | Statistics Using R Programming Language | Hypot...Statistics For Data Science | Statistics Using R Programming Language | Hypot...
Statistics For Data Science | Statistics Using R Programming Language | Hypot...
 
Simple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-StepSimple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-Step
 
Data Analytics Using MS Excel
Data Analytics Using MS ExcelData Analytics Using MS Excel
Data Analytics Using MS Excel
 
Measures of central tendency
Measures of central tendencyMeasures of central tendency
Measures of central tendency
 
Regression analysis on SPSS
Regression analysis on SPSSRegression analysis on SPSS
Regression analysis on SPSS
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Excel solver
Excel solverExcel solver
Excel solver
 
Simple Linear Regression
Simple Linear RegressionSimple Linear Regression
Simple Linear Regression
 
Simple Linier Regression
Simple Linier RegressionSimple Linier Regression
Simple Linier Regression
 
Business analytics
Business analyticsBusiness analytics
Business analytics
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Measure of Central Tendency
Measure of Central TendencyMeasure of Central Tendency
Measure of Central Tendency
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Introduction to Statistics
Introduction to StatisticsIntroduction to Statistics
Introduction to Statistics
 

Similar to Regression analysis in excel

Lab 4 excel basics
Lab 4 excel basicsLab 4 excel basics
Lab 4 excel basicsAnuja Lad
 
Correlations and Scatterplots MS Excel Lesson 2 Grade 8.ppt
Correlations and Scatterplots MS Excel Lesson 2 Grade 8.pptCorrelations and Scatterplots MS Excel Lesson 2 Grade 8.ppt
Correlations and Scatterplots MS Excel Lesson 2 Grade 8.pptJoshuaCasas7
 
Using microsoft excel for weibull analysis
Using microsoft excel for weibull analysisUsing microsoft excel for weibull analysis
Using microsoft excel for weibull analysisMelvin Carter
 
Elementary Data Analysis with MS Excel_Day-5
Elementary Data Analysis with MS Excel_Day-5Elementary Data Analysis with MS Excel_Day-5
Elementary Data Analysis with MS Excel_Day-5Redwan Ferdous
 
Using Microsoft Excel for Weibull Analysis by William Dorner
Using Microsoft Excel for Weibull Analysis by William DornerUsing Microsoft Excel for Weibull Analysis by William Dorner
Using Microsoft Excel for Weibull Analysis by William DornerMelvin Carter
 
MAT 240 Random Sampling in Excel Tutorial This tutorial wi
MAT 240 Random Sampling in Excel Tutorial This tutorial wiMAT 240 Random Sampling in Excel Tutorial This tutorial wi
MAT 240 Random Sampling in Excel Tutorial This tutorial wiAbramMartino96
 
MAT 240 Random Sampling in Excel Tutorial This tutorial wi
MAT 240 Random Sampling in Excel Tutorial This tutorial wiMAT 240 Random Sampling in Excel Tutorial This tutorial wi
MAT 240 Random Sampling in Excel Tutorial This tutorial wiAbramMartino96
 
Electronic Keno Project 3 Overview and Rationale.docx
  Electronic Keno Project 3 Overview and Rationale.docx  Electronic Keno Project 3 Overview and Rationale.docx
Electronic Keno Project 3 Overview and Rationale.docxShiraPrater50
 
Data AnalysisInstructions of Excel 2016By Yancy Chow.docx
Data AnalysisInstructions of Excel 2016By Yancy Chow.docxData AnalysisInstructions of Excel 2016By Yancy Chow.docx
Data AnalysisInstructions of Excel 2016By Yancy Chow.docxwhittemorelucilla
 
Microsoft® Excel® 2016ExploringSeries Editor Mary Anne Poats.docx
Microsoft® Excel® 2016ExploringSeries Editor Mary Anne Poats.docxMicrosoft® Excel® 2016ExploringSeries Editor Mary Anne Poats.docx
Microsoft® Excel® 2016ExploringSeries Editor Mary Anne Poats.docxARIV4
 
ENGR 102B Microsoft Excel Proficiency LevelsPlease have your in.docx
ENGR 102B Microsoft Excel Proficiency LevelsPlease have your in.docxENGR 102B Microsoft Excel Proficiency LevelsPlease have your in.docx
ENGR 102B Microsoft Excel Proficiency LevelsPlease have your in.docxYASHU40
 

Similar to Regression analysis in excel (20)

Dealing with data-excel
Dealing with data-excelDealing with data-excel
Dealing with data-excel
 
Lab 4 excel basics
Lab 4 excel basicsLab 4 excel basics
Lab 4 excel basics
 
Lab 4 excel basics
Lab 4 excel basicsLab 4 excel basics
Lab 4 excel basics
 
Excle
ExcleExcle
Excle
 
Lab 4 Excel Basics.ppt
Lab 4 Excel Basics.pptLab 4 Excel Basics.ppt
Lab 4 Excel Basics.ppt
 
Lab 4 excel basics
Lab 4 excel basicsLab 4 excel basics
Lab 4 excel basics
 
Correlations and Scatterplots MS Excel Lesson 2 Grade 8.ppt
Correlations and Scatterplots MS Excel Lesson 2 Grade 8.pptCorrelations and Scatterplots MS Excel Lesson 2 Grade 8.ppt
Correlations and Scatterplots MS Excel Lesson 2 Grade 8.ppt
 
Using microsoft excel for weibull analysis
Using microsoft excel for weibull analysisUsing microsoft excel for weibull analysis
Using microsoft excel for weibull analysis
 
Elementary Data Analysis with MS Excel_Day-5
Elementary Data Analysis with MS Excel_Day-5Elementary Data Analysis with MS Excel_Day-5
Elementary Data Analysis with MS Excel_Day-5
 
Using Microsoft Excel for Weibull Analysis by William Dorner
Using Microsoft Excel for Weibull Analysis by William DornerUsing Microsoft Excel for Weibull Analysis by William Dorner
Using Microsoft Excel for Weibull Analysis by William Dorner
 
MAT 240 Random Sampling in Excel Tutorial This tutorial wi
MAT 240 Random Sampling in Excel Tutorial This tutorial wiMAT 240 Random Sampling in Excel Tutorial This tutorial wi
MAT 240 Random Sampling in Excel Tutorial This tutorial wi
 
MAT 240 Random Sampling in Excel Tutorial This tutorial wi
MAT 240 Random Sampling in Excel Tutorial This tutorial wiMAT 240 Random Sampling in Excel Tutorial This tutorial wi
MAT 240 Random Sampling in Excel Tutorial This tutorial wi
 
Electronic Keno Project 3 Overview and Rationale.docx
  Electronic Keno Project 3 Overview and Rationale.docx  Electronic Keno Project 3 Overview and Rationale.docx
Electronic Keno Project 3 Overview and Rationale.docx
 
Excel booklet
Excel bookletExcel booklet
Excel booklet
 
Ms excel 2016_function
Ms excel 2016_functionMs excel 2016_function
Ms excel 2016_function
 
Data AnalysisInstructions of Excel 2016By Yancy Chow.docx
Data AnalysisInstructions of Excel 2016By Yancy Chow.docxData AnalysisInstructions of Excel 2016By Yancy Chow.docx
Data AnalysisInstructions of Excel 2016By Yancy Chow.docx
 
08 ms excel
08 ms excel08 ms excel
08 ms excel
 
Microsoft® Excel® 2016ExploringSeries Editor Mary Anne Poats.docx
Microsoft® Excel® 2016ExploringSeries Editor Mary Anne Poats.docxMicrosoft® Excel® 2016ExploringSeries Editor Mary Anne Poats.docx
Microsoft® Excel® 2016ExploringSeries Editor Mary Anne Poats.docx
 
ENGR 102B Microsoft Excel Proficiency LevelsPlease have your in.docx
ENGR 102B Microsoft Excel Proficiency LevelsPlease have your in.docxENGR 102B Microsoft Excel Proficiency LevelsPlease have your in.docx
ENGR 102B Microsoft Excel Proficiency LevelsPlease have your in.docx
 
stats
statsstats
stats
 

Recently uploaded

100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一ffjhghh
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts ServiceSapana Sha
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystSamantha Rae Coolbeth
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 

Recently uploaded (20)

100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
E-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptxE-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptx
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptx
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts Service
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data Analyst
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 

Regression analysis in excel

  • 1. Linear Regression Analysis In Excel- A Complete Guide 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. 1. Manual method for simple linear regression analysis. 2. Regression analysis with Excel formulas or worksheet functions. 3. Regression analysis with scatter plot charts with Trendline. 4. Detailed linear regression analysis in Excel using Analysis ToolPak. 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. Manual method of simple linear regression analysis with least squares method You have to know at least a little bit about the regression formulas to carry out a manual regression analysis. 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 Equation for slope of the regression line, Equation for intercept of the regression line Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/ 1 of 8 06/09/2020, 1:33 am
  • 2. Equation for R-squared Let us see an example to learn the procedure for regression analysis. This regression model finds the relationship between advertising expenses and sales volume. Regression analysis procedure in manual method Step 01: set up the calculation table as follows. Keep columns for x,y, x², y² and xy. 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. Finally your table should look like this. Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/ 2 of 8 06/09/2020, 1:33 am
  • 3. Step 03: Calculate the regression coefficients using equations as follows. Now you should get your output as follows, Interpretation of results of regression analysis in manual method. Slope of the regression line (m) = 1.8693 Intercept of the regression line (b) = 4733.681 Therefore, the regression equation for this case is, 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). Regression analysis in excel using scatter plot charts with Trendline You can use Microsoft Excel scatter charts when you want to do a quick and brief regression analysis. This method also uses the least squares method. In addition to simple linear regression, Trendline gives you the option to fit your data in to other regression models such as, exponential; logarithmic; polynomial; power and moving average. Regression analysis procedure in excel using trendline option 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. Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/ 3 of 8 06/09/2020, 1:33 am
  • 4. 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. Step 08 : Click “More options” 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. Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/ 4 of 8 06/09/2020, 1:33 am
  • 5. 1) Select radio button for “Linear”. 2) Select the checkbox for “Display Equation on chart”. 3) Select the checkbox for “Display R – squared value on chart”. Now, you can see the regression equation and R² value above the trendline. Compare the equation to the equation we got in manual method. You should see that they are similar. Regression analysis in Excel using formulas or worksheet functions There are times that you only need to find regression coefficients. In that case you can simply use Excel worksheet functions or formulas. SLOPE (), INTERCEPT () and RSQ () are the main worksheet function you will need to find linear regression coefficients. Prepare your independent (X) and dependent (Y) variable values as in previous cases. Calculate the slope of the regression line Step 01 : Insert “= SLOPE ()” formula within a desired cell. Step 02 : For the first parameter, select the Excel cell range that you have entered the Y-values which is the dependent variable. And for the second parameter select the cell range that you have entered the X-values which is the independent variable. Step 03 : Press “Enter”. Now we got the value for the slope of the regression line. Calculate the intercept of the regression line Step 01 : Insert “= INTERCEPT ()” formula within a desired cell. Step 02 : Select the suitable the x and y ranges same as above SLOPE formula. Step 03 : Press “Enter”. Now we got the value for the intercept of the regression line. Calculate the R-squared value of the regression model Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/ 5 of 8 06/09/2020, 1:33 am
  • 6. Step 01 : Insert “= RSQ ()” formula within a desired cell. Step 02 : Select the suitable the x and y ranges same as above SLOPE formula. Step 03 : Press “Enter” Now we got the value for the R-squared value of the regression line. Compare the these coefficients to the coefficients we got in other two method. It is clear that they are similar. 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. Now the “Data analysis” dialog box appears. If you cannot find the “Data Analysis” button, go through the Analysis ToolPak tutorial here. 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. Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/ 6 of 8 06/09/2020, 1:33 am
  • 7. 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. Interpretation of the regression analysis output in excel Let us discuss the most important parts of information in the regression analysis output. 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”. p-value for coefficients The p-value located next to t-stat tells us the significance of each regression coefficient. Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/ 7 of 8 06/09/2020, 1:33 am
  • 8. 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. Download the Regression analysis in Excel example file You can download the excel file which has all the examples I have discussed above. Linear Regression Analysis In Excel- A Complete Guide https://tinytutes.com/tutorials/regression-analysis-in-excel/ 8 of 8 06/09/2020, 1:33 am