SlideShare a Scribd company logo
Lecture:
Simple Linear Regression
in MICROSOFT EXCEL
Chaudhary Awais Salman
Doctoral Researcher in Future Energy
Course instructor
School of Business, Society and Engineering
Fuuture Energy – Centre of Excellence
Email: Chaudhary.awais.salman@mdh.se
Regression analysis in Excel
● Three methods are described to perform the regression analysis in EXCEL
1. By formulas
2. By graph
3. By built-in data analysis tool
2
Temperature (deg F) Icecream sales, USD
52 185
58 215
60 332
62 325
64 408
66 406
68 412
72 522
74 445
74 545
74 640
76 522
77 544
80 614
82 614
84 620
85 627
88 627
90 632
Data set used for regression analysis
Formulas (1)
● Microsoft Excel has built-in functions such as LINEST, SLOPE, INTERCPET, and
CORREL that can help to do the linear regression.
3
The LINEST Function uses the least
squares method and determine a best
fitted straight line between studied
variables and returns an array
describing that line.
LINEST function returns an array of values (a and b), so it
must be entered as an array formula. Select two adjacent
cells in the same row, D3:F3 in this case, type the formula,
and press Ctrl + Shift + Enter to complete it.
Formulas (2)
● Microsoft Excel has built-in functions such as LINEST, SLOPE, INTERCPET, and
CORREL that can help to do the linear regression.
4
Otherwise, we can find the value of slope (a) and intercept
(b) directly by using the SLOPE and INTERCEPT
formulas
Formulas (3)
● Microsoft Excel has built-in functions such as LINEST, SLOPE, INTERCPET, and
CORREL that can help to do the linear regression.
5
Similarly correlations and R-squared between two variables can be determined by using the CORREL and
RSQ function of excel. (R-squared can also be determined by squaring the correlation)
By graph (1)
● Select the two columns with your data, including headers.
● On the Inset tab, in the Charts group, click the Scatter chart icon, and select
the Scatter thumbnail (the first one):
6
7
● Now, a least squares regression line needs to be drawn. Right click on any point in scatter
graph and choose Add Trendline
By graph (2)
8
● From Trendline options select linear as option and check the display equation and R-
squared on chart options
By graph (3)
On the Data tab, in the Analysis group, click the Data Analysis button.
9
Select Regression and click OK
● Select the Input Y Range, which is your dependent variable. In our case, it’s (B1:B20).
● Select the Input X Range, i.e. your independent variable. In this example, it's the (A1:A20).
● Select your preffered output range, it can be new worksheet also
10
● Optionally select the
residual option
Summary of results
11
Explanation of Regression statistics terms
● Multiple R. It is the Correlation Coefficient
● R Square. It is the Coefficient of Determination, which is used as an indicator of the goodness
of fit. In our example, R2 is 0.87 (rounded to 2 digits), which is fairy good. It means that 87% of
our values fit the regression analysis model. Generally, R Squared of 95% or more is
considered a good fit.
● Adjusted R Square. It is the R square adjusted for the number of independent variable in the
model. You will want to use this value instead of R square for multiple regression analysis.
● Standard Error. It is another goodness-of-fit measure that shows the precision of your
regression analysis - the smaller the number, the more certain you can be about your
regression equation. While R2 represents the percentage of the dependent variables variance
that is explained by the model, Standard Error is an absolute measure that shows the average
distance that the data points fall from the regression line.
● Observations. It is simply the number of observations in your model.
12
https://www.ablebits.com/office-addins-blog/2018/08/01/linear-regression-analysis-excel/
Explanation of Regression output terms
● The most useful component in this section is Coefficients. It helps us to make a model.
● X variable 1 =a = slope = 12,72
● Intercept = b = -442,387
● Equation
● Y = aX + b
● Y = 12,72 X -442,387
13
https://www.ablebits.com/office-addins-blog/2018/08/01/linear-regression-analysis-excel/
Regression analysis output: residuals
● If you compare the estimated and actual number of sold
ice-creams corresponding to the temperature , you will
see that these numbers are slightly different:
● Estimated: 219,44 (calculated above)
● Actual: 185 (row 2 of the source data)
● Why's the difference? Because independent variables
are never perfect predictors of the dependent variables.
And the residuals can help you understand how far
away the actual values are from the predicted values:
14
https://www.ablebits.com/office-addins-blog/2018/08/01/linear-regression-analysis-excel/

More Related Content

What's hot

Regression analysis
Regression analysisRegression analysis
Regression analysis
Shameer P Hamsa
 
Simple Linier Regression
Simple Linier RegressionSimple Linier Regression
Simple Linier Regressiondessybudiyanti
 
Principle of Least Square, its Properties, Regression line and standard error...
Principle of Least Square, its Properties, Regression line and standard error...Principle of Least Square, its Properties, Regression line and standard error...
Principle of Least Square, its Properties, Regression line and standard error...
Ali Lodhra
 
Regression analysis ppt
Regression analysis pptRegression analysis ppt
Regression analysis pptElkana Rorio
 
Auto Correlation Presentation
Auto Correlation PresentationAuto Correlation Presentation
Auto Correlation Presentation
Irfan Hussain
 
Simple linear regression
Simple linear regressionSimple linear regression
Simple linear regression
RekhaChoudhary24
 
Linear regression
Linear regressionLinear regression
Linear regression
vermaumeshverma
 
Heteroskedasticity
HeteroskedasticityHeteroskedasticity
Heteroskedasticityhalimuth
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
Srikant001p
 
Simple linear regression
Simple linear regressionSimple linear regression
Simple linear regression
Avjinder (Avi) Kaler
 
Basics of Regression analysis
 Basics of Regression analysis Basics of Regression analysis
Basics of Regression analysis
Mahak Vijayvargiya
 
Autocorrelation
AutocorrelationAutocorrelation
Autocorrelation
Pabitra Mishra
 
Simple & Multiple Regression Analysis
Simple & Multiple Regression AnalysisSimple & Multiple Regression Analysis
Simple & Multiple Regression Analysis
Shailendra Tomar
 
Multicollinearity PPT
Multicollinearity PPTMulticollinearity PPT
Multicollinearity PPT
GunjanKhandelwal13
 
Methodology of Econometrics / Hypothesis Testing
Methodology of Econometrics / Hypothesis Testing  Methodology of Econometrics / Hypothesis Testing
Methodology of Econometrics / Hypothesis Testing
Sakthivel R
 
Regression analysis.
Regression analysis.Regression analysis.
Regression analysis.
sonia gupta
 
Granger causality testing
Granger causality testingGranger causality testing
Granger causality testing
ThomasReader
 
Simple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-StepSimple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-Step
Dan Wellisch
 
Logistic Regression Analysis
Logistic Regression AnalysisLogistic Regression Analysis
Logistic Regression Analysis
COSTARCH Analytical Consulting (P) Ltd.
 

What's hot (20)

Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Simple Linier Regression
Simple Linier RegressionSimple Linier Regression
Simple Linier Regression
 
Index number
Index numberIndex number
Index number
 
Principle of Least Square, its Properties, Regression line and standard error...
Principle of Least Square, its Properties, Regression line and standard error...Principle of Least Square, its Properties, Regression line and standard error...
Principle of Least Square, its Properties, Regression line and standard error...
 
Regression analysis ppt
Regression analysis pptRegression analysis ppt
Regression analysis ppt
 
Auto Correlation Presentation
Auto Correlation PresentationAuto Correlation Presentation
Auto Correlation Presentation
 
Simple linear regression
Simple linear regressionSimple linear regression
Simple linear regression
 
Linear regression
Linear regressionLinear regression
Linear regression
 
Heteroskedasticity
HeteroskedasticityHeteroskedasticity
Heteroskedasticity
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Simple linear regression
Simple linear regressionSimple linear regression
Simple linear regression
 
Basics of Regression analysis
 Basics of Regression analysis Basics of Regression analysis
Basics of Regression analysis
 
Autocorrelation
AutocorrelationAutocorrelation
Autocorrelation
 
Simple & Multiple Regression Analysis
Simple & Multiple Regression AnalysisSimple & Multiple Regression Analysis
Simple & Multiple Regression Analysis
 
Multicollinearity PPT
Multicollinearity PPTMulticollinearity PPT
Multicollinearity PPT
 
Methodology of Econometrics / Hypothesis Testing
Methodology of Econometrics / Hypothesis Testing  Methodology of Econometrics / Hypothesis Testing
Methodology of Econometrics / Hypothesis Testing
 
Regression analysis.
Regression analysis.Regression analysis.
Regression analysis.
 
Granger causality testing
Granger causality testingGranger causality testing
Granger causality testing
 
Simple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-StepSimple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-Step
 
Logistic Regression Analysis
Logistic Regression AnalysisLogistic Regression Analysis
Logistic Regression Analysis
 

Similar to Regression analysis in excel

Regression analysis in excel
Regression analysis in excelRegression analysis in excel
Regression analysis in excel
Thilina Rathnayaka
 
Principal component analysis and lda
Principal component analysis and ldaPrincipal component analysis and lda
Principal component analysis and lda
Suresh Pokharel
 
Six sigma pedagogy
Six sigma pedagogySix sigma pedagogy
Six sigma pedagogy
MallikarjunRaoPanaba
 
Six sigma
Six sigma Six sigma
Exploring Support Vector Regression - Signals and Systems Project
Exploring Support Vector Regression - Signals and Systems ProjectExploring Support Vector Regression - Signals and Systems Project
Exploring Support Vector Regression - Signals and Systems Project
Surya Chandra
 
SupportVectorRegression
SupportVectorRegressionSupportVectorRegression
SupportVectorRegressionDaniel K
 
Multiple Regression.ppt
Multiple Regression.pptMultiple Regression.ppt
Multiple Regression.ppt
TanyaWadhwani4
 
How to combine interpolation and regression graphs in R
How to combine interpolation and regression graphs in RHow to combine interpolation and regression graphs in R
How to combine interpolation and regression graphs in R
DougLoqa
 
Documents.pub sigmaplot 13-smit-principal-components-analysis-principal-compo...
Documents.pub sigmaplot 13-smit-principal-components-analysis-principal-compo...Documents.pub sigmaplot 13-smit-principal-components-analysis-principal-compo...
Documents.pub sigmaplot 13-smit-principal-components-analysis-principal-compo...
Martin Magu
 
An Introduction to MATLAB with Worked Examples
An Introduction to MATLAB with Worked ExamplesAn Introduction to MATLAB with Worked Examples
An Introduction to MATLAB with Worked Examples
eAssessment in Practice Symposium
 
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
Redwan Ferdous
 
What is Isotonic Regression and How Can a Business Utilize it to Analyze Data?
What is Isotonic Regression and How Can a Business Utilize it to Analyze Data?What is Isotonic Regression and How Can a Business Utilize it to Analyze Data?
What is Isotonic Regression and How Can a Business Utilize it to Analyze Data?
Smarten Augmented Analytics
 
JF608: Quality Control - Unit 3
JF608: Quality Control - Unit 3JF608: Quality Control - Unit 3
JF608: Quality Control - Unit 3
Asraf Malik
 
2.6b scatter plots and lines of best fit
2.6b scatter plots and lines of best fit2.6b scatter plots and lines of best fit
2.6b scatter plots and lines of best fit
hartcher
 
Dimensionality Reduction and feature extraction.pptx
Dimensionality Reduction and feature extraction.pptxDimensionality Reduction and feature extraction.pptx
Dimensionality Reduction and feature extraction.pptx
Sivam Chinna
 
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
YASHU40
 
X‾ and r charts
X‾ and r chartsX‾ and r charts
X‾ and r charts
Akhil Krishnan G
 
Calculator scientific
Calculator scientificCalculator scientific
Calculator scientific
Anil Sharma
 
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
AbramMartino96
 

Similar to Regression analysis in excel (20)

Regression analysis in excel
Regression analysis in excelRegression analysis in excel
Regression analysis in excel
 
Principal component analysis and lda
Principal component analysis and ldaPrincipal component analysis and lda
Principal component analysis and lda
 
Six sigma pedagogy
Six sigma pedagogySix sigma pedagogy
Six sigma pedagogy
 
Six sigma
Six sigma Six sigma
Six sigma
 
Exploring Support Vector Regression - Signals and Systems Project
Exploring Support Vector Regression - Signals and Systems ProjectExploring Support Vector Regression - Signals and Systems Project
Exploring Support Vector Regression - Signals and Systems Project
 
SupportVectorRegression
SupportVectorRegressionSupportVectorRegression
SupportVectorRegression
 
Multiple Regression.ppt
Multiple Regression.pptMultiple Regression.ppt
Multiple Regression.ppt
 
How to combine interpolation and regression graphs in R
How to combine interpolation and regression graphs in RHow to combine interpolation and regression graphs in R
How to combine interpolation and regression graphs in R
 
Documents.pub sigmaplot 13-smit-principal-components-analysis-principal-compo...
Documents.pub sigmaplot 13-smit-principal-components-analysis-principal-compo...Documents.pub sigmaplot 13-smit-principal-components-analysis-principal-compo...
Documents.pub sigmaplot 13-smit-principal-components-analysis-principal-compo...
 
An Introduction to MATLAB with Worked Examples
An Introduction to MATLAB with Worked ExamplesAn Introduction to MATLAB with Worked Examples
An Introduction to MATLAB with Worked Examples
 
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
 
What is Isotonic Regression and How Can a Business Utilize it to Analyze Data?
What is Isotonic Regression and How Can a Business Utilize it to Analyze Data?What is Isotonic Regression and How Can a Business Utilize it to Analyze Data?
What is Isotonic Regression and How Can a Business Utilize it to Analyze Data?
 
JF608: Quality Control - Unit 3
JF608: Quality Control - Unit 3JF608: Quality Control - Unit 3
JF608: Quality Control - Unit 3
 
R9
R9R9
R9
 
2.6b scatter plots and lines of best fit
2.6b scatter plots and lines of best fit2.6b scatter plots and lines of best fit
2.6b scatter plots and lines of best fit
 
Dimensionality Reduction and feature extraction.pptx
Dimensionality Reduction and feature extraction.pptxDimensionality Reduction and feature extraction.pptx
Dimensionality Reduction and feature extraction.pptx
 
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
 
X‾ and r charts
X‾ and r chartsX‾ and r charts
X‾ and r charts
 
Calculator scientific
Calculator scientificCalculator scientific
Calculator scientific
 
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
 

Recently uploaded

社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
NABLAS株式会社
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
yhkoc
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
oz8q3jxlp
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape ReportSOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
Oppotus
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
ewymefz
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
nscud
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
Tiktokethiodaily
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
ocavb
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
Opendatabay
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
u86oixdj
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Subhajit Sahu
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
ewymefz
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
AbhimanyuSinha9
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
slg6lamcq
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 

Recently uploaded (20)

社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape ReportSOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape Report
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 

Regression analysis in excel

  • 1. Lecture: Simple Linear Regression in MICROSOFT EXCEL Chaudhary Awais Salman Doctoral Researcher in Future Energy Course instructor School of Business, Society and Engineering Fuuture Energy – Centre of Excellence Email: Chaudhary.awais.salman@mdh.se
  • 2. Regression analysis in Excel ● Three methods are described to perform the regression analysis in EXCEL 1. By formulas 2. By graph 3. By built-in data analysis tool 2 Temperature (deg F) Icecream sales, USD 52 185 58 215 60 332 62 325 64 408 66 406 68 412 72 522 74 445 74 545 74 640 76 522 77 544 80 614 82 614 84 620 85 627 88 627 90 632 Data set used for regression analysis
  • 3. Formulas (1) ● Microsoft Excel has built-in functions such as LINEST, SLOPE, INTERCPET, and CORREL that can help to do the linear regression. 3 The LINEST Function uses the least squares method and determine a best fitted straight line between studied variables and returns an array describing that line. LINEST function returns an array of values (a and b), so it must be entered as an array formula. Select two adjacent cells in the same row, D3:F3 in this case, type the formula, and press Ctrl + Shift + Enter to complete it.
  • 4. Formulas (2) ● Microsoft Excel has built-in functions such as LINEST, SLOPE, INTERCPET, and CORREL that can help to do the linear regression. 4 Otherwise, we can find the value of slope (a) and intercept (b) directly by using the SLOPE and INTERCEPT formulas
  • 5. Formulas (3) ● Microsoft Excel has built-in functions such as LINEST, SLOPE, INTERCPET, and CORREL that can help to do the linear regression. 5 Similarly correlations and R-squared between two variables can be determined by using the CORREL and RSQ function of excel. (R-squared can also be determined by squaring the correlation)
  • 6. By graph (1) ● Select the two columns with your data, including headers. ● On the Inset tab, in the Charts group, click the Scatter chart icon, and select the Scatter thumbnail (the first one): 6
  • 7. 7 ● Now, a least squares regression line needs to be drawn. Right click on any point in scatter graph and choose Add Trendline By graph (2)
  • 8. 8 ● From Trendline options select linear as option and check the display equation and R- squared on chart options By graph (3)
  • 9. On the Data tab, in the Analysis group, click the Data Analysis button. 9 Select Regression and click OK
  • 10. ● Select the Input Y Range, which is your dependent variable. In our case, it’s (B1:B20). ● Select the Input X Range, i.e. your independent variable. In this example, it's the (A1:A20). ● Select your preffered output range, it can be new worksheet also 10 ● Optionally select the residual option
  • 12. Explanation of Regression statistics terms ● Multiple R. It is the Correlation Coefficient ● R Square. It is the Coefficient of Determination, which is used as an indicator of the goodness of fit. In our example, R2 is 0.87 (rounded to 2 digits), which is fairy good. It means that 87% of our values fit the regression analysis model. Generally, R Squared of 95% or more is considered a good fit. ● Adjusted R Square. It is the R square adjusted for the number of independent variable in the model. You will want to use this value instead of R square for multiple regression analysis. ● Standard Error. It is another goodness-of-fit measure that shows the precision of your regression analysis - the smaller the number, the more certain you can be about your regression equation. While R2 represents the percentage of the dependent variables variance that is explained by the model, Standard Error is an absolute measure that shows the average distance that the data points fall from the regression line. ● Observations. It is simply the number of observations in your model. 12 https://www.ablebits.com/office-addins-blog/2018/08/01/linear-regression-analysis-excel/
  • 13. Explanation of Regression output terms ● The most useful component in this section is Coefficients. It helps us to make a model. ● X variable 1 =a = slope = 12,72 ● Intercept = b = -442,387 ● Equation ● Y = aX + b ● Y = 12,72 X -442,387 13 https://www.ablebits.com/office-addins-blog/2018/08/01/linear-regression-analysis-excel/
  • 14. Regression analysis output: residuals ● If you compare the estimated and actual number of sold ice-creams corresponding to the temperature , you will see that these numbers are slightly different: ● Estimated: 219,44 (calculated above) ● Actual: 185 (row 2 of the source data) ● Why's the difference? Because independent variables are never perfect predictors of the dependent variables. And the residuals can help you understand how far away the actual values are from the predicted values: 14 https://www.ablebits.com/office-addins-blog/2018/08/01/linear-regression-analysis-excel/