SlideShare a Scribd company logo
Correlation and Regression Analysis:
Learning Objectives
• Explain the purpose of regression analysis and the
meaning of independent versus dependent variables.
• Compute the equation of a simple regression line from a
sample of data, and interpret the slope and intercept of
the equation.
• Estimate values of Y to forecast outcomes using the
regression model.
• Understand residual analysis in testing the assumptions
and in examining the fit underlying the regression line.
• Compute a standard error of the estimate and interpret
its meaning.
• Compute a coefficient of determination and interpret it.
Correlation
• Correlation is a measure of the degree of relatedness
of variables.
• Coefficient of Correlation (r) - applicable only if both
variables being analyzed have at least an interval level
of data.
Three Degrees of Correlation

r<0

r>0

r=0
Degree of Correlation
• The term (r) is a measure of the linear
correlation of two variables
– The number ranges from -1 to 0 to +1
 Positive correlation: as one variable increases, the other
variable increases
 Negative correlation: as one variable increases, the
other one decreases
 No correlation: the value of r is close to 0

– Closer to +1 or -1, the higher the correlation
between two variables
Pearson Product-Moment
Correlation Coefficient
Regression Analysis
• Regression analysis is the process of constructing a
mathematical model or function that can be used to
predict or determine one variable by another variable
or variables.
Simple Regression Analysis
• Bivariate (two variables) linear regression -- the
most elementary regression model
– dependent variable, the variable to be predicted,
usually called Y
– independent variable, the predictor or explanatory
variable, usually called X
– Usually the first step in this analysis is to construct a
scatter plot of the data

• Nonlinear relationships and regression models
with more than one independent variable can be
explored by using multiple regression models
Regression Models
• Deterministic Regression Model - - produces an
exact output:
ˆ
y   0  1 x
• Probabilistic Regression Model
ˆ
y   0  1 x  

• 0 and 1 are population parameters
• 0 and 1 are estimated by sample statistics b0
and b1
Equation of
the Simple Regression Line
A typical regression line
Y

ϴ

X
Least Squares Analysis
• Least squares analysis is a process whereby a regression model
is developed by producing the minimum sum of the squared
error values
• The vertical distance from each point to the line is the error of
the prediction.
• The least squares regression line is the regression line that
results in the smallest sum of errors squared.
Least Squares Analysis

  X  X Y  Y    XY  nXY

b
 X n X
 X  X 
2

1

2

2





Y   X
b Y b X  n b n
0

1

1

 X  Y 
XY 
n

X

2





X
n

2
Least Squares Analysis
SSXY    X  X Y  Y   
SSXX  

b1 

X  X

2



X

 X  Y 
XY 
n

2





X

2

n

SSXY
SSXX

Y   X
b  Y b X  n b n
0

1

1
Airlines Cost Data include the costs and associated number of
passengers for twelve 500-mile commercial airline flights using
Boeing 737s during the same season of the year.
Number of
Passengers
61
63
67
69
70
74
76
81
86
91
95
97

Cost
($1,000)
4,280
4,080
4,420
4,170
4,480
4,300
4,820
4,700
5,110
5,130
5,640
5,560
Number of
Passengers
x

x2

61
63
67
69
70
74
76
81
86
91
95
97

x

Cost ($1,000)
y
4.28
4.08
4.42
4.17
4.48
4.30
4.82
4.70
5.11
5.13
5.64
5.56

3,721
3,969
4,489
4,761
4,900
5,476
5,776
6,561
7,396
8,281
9,025
9,409

= 930

y

= 56.69

x

2

= 73,764

xy
261.08
257.04
296.14
287.73
313.60
318.20
366.32
380.70
439.46
466.83
535.80
539.32

 xy

= 4,462.22
SS XY 

 XY 

SS XX 

X

b1 

b0 

2



 X Y
n
( X ) 2
n

 4,462 .22 

(930 )( 56 .69 )
 68 .745
12

(930 ) 2
 73,764 
 1689
12

SS XY
68 .745

 .0407
SS XX
1689

Y
n

 b1

X
n

ˆ
Y  1.57  .0407 X



56 .69
930
 (. 0407 )
 1.57
12
12
Residual Analysis
Residual Analysis:
Airline Cost Example
Number of
Passengers
X
61
63
67
69
70
74
76
81
86
91
95
97

Cost ($1,000)
Y

Predicted
Value
ˆ
Y

Residual
ˆ
Y Y

4.28
4.08
4.42
4.17
4.48
4.30
4.82
4.70
5.11
5.13
5.64
5.56

4.053
4.134
4.297
4.378
4.419
4.582
4.663
4.867
5.070
5.274
5.436
5.518

.227
-.054
.123
-.208
.061
-.282
.157
-.167
.040
-.144
.204
.042

 (Y  Yˆ )  .001
Residual Analysis:
Airline Cost Example

Outliers: Data points that lie apart from the rest of the points.
They can produce large residuals and affect the regression line.
Using Residuals to Test
the Assumptions of the Regression Model
• The assumptions of the regression model
– The model is linear
– The error terms have constant variances
– The error terms are independent
– The error terms are normally distributed
Using Residuals to Test
the Assumptions of the Regression Model

• The assumption that the regression model is linear
does not hold for the residual plot shown above
• In figure (a) below the error variance is greater for
smaller values of x and smaller for larger values of x
and vice-versa in figure (b) below. This is a case of
heteroscedasiticity.
Standard Error of the Estimate
• Residuals represent errors of estimation for
individual points.
• A more useful measurement of error is the
standard error of the estimate.
• The standard error of the estimate, denoted by
se,
is a standard deviation of the error of the
regression model.
Standard Error of the Estimate

Sum of Squares Error

SSE  
Standard Error
of the
Estimate

 

Y Y

2

  Y  b0  Y  b1  XY
2

SSE
Se  n  2
Determining SSE for the
Airline Cost Data Example
Number of
Passengers
X

Cost ($1,000)
Y

Residual
ˆ
Y Y

ˆ
(Y  Y ) 2

61
63
67
69
70
74
76
81
86
91
95
97

4.28
4.08
4.42
4.17
4.48
4.30
4.82
4 .70
5.11
5.13
5.64
5.56

.227
-.054
.123
-.208
.061
-.282
.157
-.167
.040
-.144
.204
.042

.05153
.00292
.01513
.04326
.00372
.07952
.02465
.02789
.00160
.02074
.04162
.00176

 (Y

ˆ
 Y )  .001

 (Y

ˆ
 Y ) 2 =.31434

Sum of squares of error = SSE = .31434
• The coefficient of determination is the proportion of
variability of the dependent variable (y) accounted
for or explained by the independent variable (x)
• The coefficient of determination ranges from 0 to 1.
• An r 2 of zero means that the predictor accounts for
none of the variability of the dependent variable
and that there is no regression prediction of y by x.
• An r 2 of 1 means perfect prediction of y by x and
that 100% of the variability of y is accounted for by
x.
SSYY  

Y Y   Y
2

 Y 


2

2

n
SSYY  exp lained var iation  un exp lained var iation
SSYY  SSR  SSE
SSR SSE
1

SSYY SSYY
SSR
2

r SSYY
SSE
 1
SSYY
SSE
 1
2
Y
2
Y  n

 
SSE  0.31434

 Y   270.9251 56.69  3.11209
 Y 
2

SSYY

2

n

SSE
r  1
SSYY
.31434
 1
3.11209
 .899
2

2

12

89.9% of the variability
of the cost of flying a
Boeing 737 is accounted for
by the number of passengers.
Exercise in R:
Linear Regression

Open URL: www.openintro.org
Go to Labs in R and select 7 - Linear Regression

More Related Content

What's hot

Job evaluation
Job evaluationJob evaluation
performance appraisal
performance appraisalperformance appraisal
performance appraisal
SARAVANAN GOVINDASAMY
 
Sampling distribution
Sampling distributionSampling distribution
Sampling distribution
swarna dey
 
Linear regression analysis
Linear regression analysisLinear regression analysis
Linear regression analysis
Dhritiman Chakrabarti
 
Job evaluation and performance appraisal
Job evaluation and performance appraisalJob evaluation and performance appraisal
Job evaluation and performance appraisal
HR Tapader
 
Non linear curve fitting
Non linear curve fitting Non linear curve fitting
Non linear curve fitting
Anumita Mondal
 
My regression lecture mk3 (uploaded to web ct)
My regression lecture   mk3 (uploaded to web ct)My regression lecture   mk3 (uploaded to web ct)
My regression lecture mk3 (uploaded to web ct)
chrisstiff
 
Levels of measurement
Levels of measurementLevels of measurement
Levels of measurement
Sarfraz Ahmad
 
Probability models & basic rules
Probability models & basic rulesProbability models & basic rules
Probability models & basic rules
amylute
 
Chap01 describing data; graphical
Chap01 describing data;  graphicalChap01 describing data;  graphical
Chap01 describing data; graphical
Judianto Nugroho
 
HR analytics
HR analyticsHR analytics
HR analytics
preksha1185
 
Multiple linear regression
Multiple linear regressionMultiple linear regression
Multiple linear regression
Avjinder (Avi) Kaler
 
Correlation
CorrelationCorrelation
Correlation
joshuarodrick
 
Scatterplots, Correlation, and Regression
Scatterplots, Correlation, and RegressionScatterplots, Correlation, and Regression
Scatterplots, Correlation, and Regression
Long Beach City College
 
Compensation Strategy
Compensation StrategyCompensation Strategy
Compensation Strategy
CreativeHRM
 
Job Analysis & Job Design
Job Analysis & Job DesignJob Analysis & Job Design
Job Analysis & Job Design
RebekahSamuel2
 
STRATEGIC PAY PLAN
STRATEGIC PAY PLANSTRATEGIC PAY PLAN
STRATEGIC PAY PLAN
GHULAMFATIMA24
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
Subin Raj
 
staffing chapter no 8 external selection part 1, by heneman
staffing chapter no 8 external selection part 1, by henemanstaffing chapter no 8 external selection part 1, by heneman
staffing chapter no 8 external selection part 1, by heneman
fareeha zanib
 
Quantitative tools for HR managers
Quantitative tools for HR managersQuantitative tools for HR managers
Quantitative tools for HR managers
raza kamal
 

What's hot (20)

Job evaluation
Job evaluationJob evaluation
Job evaluation
 
performance appraisal
performance appraisalperformance appraisal
performance appraisal
 
Sampling distribution
Sampling distributionSampling distribution
Sampling distribution
 
Linear regression analysis
Linear regression analysisLinear regression analysis
Linear regression analysis
 
Job evaluation and performance appraisal
Job evaluation and performance appraisalJob evaluation and performance appraisal
Job evaluation and performance appraisal
 
Non linear curve fitting
Non linear curve fitting Non linear curve fitting
Non linear curve fitting
 
My regression lecture mk3 (uploaded to web ct)
My regression lecture   mk3 (uploaded to web ct)My regression lecture   mk3 (uploaded to web ct)
My regression lecture mk3 (uploaded to web ct)
 
Levels of measurement
Levels of measurementLevels of measurement
Levels of measurement
 
Probability models & basic rules
Probability models & basic rulesProbability models & basic rules
Probability models & basic rules
 
Chap01 describing data; graphical
Chap01 describing data;  graphicalChap01 describing data;  graphical
Chap01 describing data; graphical
 
HR analytics
HR analyticsHR analytics
HR analytics
 
Multiple linear regression
Multiple linear regressionMultiple linear regression
Multiple linear regression
 
Correlation
CorrelationCorrelation
Correlation
 
Scatterplots, Correlation, and Regression
Scatterplots, Correlation, and RegressionScatterplots, Correlation, and Regression
Scatterplots, Correlation, and Regression
 
Compensation Strategy
Compensation StrategyCompensation Strategy
Compensation Strategy
 
Job Analysis & Job Design
Job Analysis & Job DesignJob Analysis & Job Design
Job Analysis & Job Design
 
STRATEGIC PAY PLAN
STRATEGIC PAY PLANSTRATEGIC PAY PLAN
STRATEGIC PAY PLAN
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
staffing chapter no 8 external selection part 1, by heneman
staffing chapter no 8 external selection part 1, by henemanstaffing chapter no 8 external selection part 1, by heneman
staffing chapter no 8 external selection part 1, by heneman
 
Quantitative tools for HR managers
Quantitative tools for HR managersQuantitative tools for HR managers
Quantitative tools for HR managers
 

Similar to Statr session14, Jan 11

Regression Analysis.pptx
Regression Analysis.pptxRegression Analysis.pptx
Regression Analysis.pptx
ShivankAggatwal
 
Statr session 23 and 24
Statr session 23 and 24Statr session 23 and 24
Statr session 23 and 24
Ruru Chowdhury
 
ML Module 3.pdf
ML Module 3.pdfML Module 3.pdf
ML Module 3.pdf
Shiwani Gupta
 
Regression
Regression  Regression
Regression analysis
Regression analysisRegression analysis
Regression analysis
Awais Salman
 
슬로우캠퍼스: scikit-learn & 머신러닝 (강박사)
슬로우캠퍼스:  scikit-learn & 머신러닝 (강박사)슬로우캠퍼스:  scikit-learn & 머신러닝 (강박사)
슬로우캠퍼스: scikit-learn & 머신러닝 (강박사)
마이캠퍼스
 
Regression
RegressionRegression
Regression
simran sakshi
 
Bba 3274 qm week 6 part 1 regression models
Bba 3274 qm week 6 part 1 regression modelsBba 3274 qm week 6 part 1 regression models
Bba 3274 qm week 6 part 1 regression models
Stephen Ong
 
Regression vs Neural Net
Regression vs Neural NetRegression vs Neural Net
Regression vs Neural Net
Ratul Alahy
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
bijuhari
 
Regression
RegressionRegression
regression
regressionregression
Simple linear regression
Simple linear regressionSimple linear regression
Simple linear regression
RekhaChoudhary24
 
Simple lin regress_inference
Simple lin regress_inferenceSimple lin regress_inference
Simple lin regress_inference
Kemal İnciroğlu
 
Regression analysis algorithm
Regression analysis algorithm Regression analysis algorithm
Regression analysis algorithm
Sammer Qader
 
Linear regression
Linear regressionLinear regression
Linear regression
Karishma Chaudhary
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
Avijit Famous
 
Simple Regression Years with Midwest and Shelf Space Winter .docx
Simple Regression Years with Midwest and Shelf Space Winter .docxSimple Regression Years with Midwest and Shelf Space Winter .docx
Simple Regression Years with Midwest and Shelf Space Winter .docx
budabrooks46239
 
Different Types of Machine Learning Algorithms
Different Types of Machine Learning AlgorithmsDifferent Types of Machine Learning Algorithms
Different Types of Machine Learning Algorithms
rahmedraj93
 
Unit-III Correlation and Regression.pptx
Unit-III Correlation and Regression.pptxUnit-III Correlation and Regression.pptx
Unit-III Correlation and Regression.pptx
Anusuya123
 

Similar to Statr session14, Jan 11 (20)

Regression Analysis.pptx
Regression Analysis.pptxRegression Analysis.pptx
Regression Analysis.pptx
 
Statr session 23 and 24
Statr session 23 and 24Statr session 23 and 24
Statr session 23 and 24
 
ML Module 3.pdf
ML Module 3.pdfML Module 3.pdf
ML Module 3.pdf
 
Regression
Regression  Regression
Regression
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
슬로우캠퍼스: scikit-learn & 머신러닝 (강박사)
슬로우캠퍼스:  scikit-learn & 머신러닝 (강박사)슬로우캠퍼스:  scikit-learn & 머신러닝 (강박사)
슬로우캠퍼스: scikit-learn & 머신러닝 (강박사)
 
Regression
RegressionRegression
Regression
 
Bba 3274 qm week 6 part 1 regression models
Bba 3274 qm week 6 part 1 regression modelsBba 3274 qm week 6 part 1 regression models
Bba 3274 qm week 6 part 1 regression models
 
Regression vs Neural Net
Regression vs Neural NetRegression vs Neural Net
Regression vs Neural Net
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Regression
RegressionRegression
Regression
 
regression
regressionregression
regression
 
Simple linear regression
Simple linear regressionSimple linear regression
Simple linear regression
 
Simple lin regress_inference
Simple lin regress_inferenceSimple lin regress_inference
Simple lin regress_inference
 
Regression analysis algorithm
Regression analysis algorithm Regression analysis algorithm
Regression analysis algorithm
 
Linear regression
Linear regressionLinear regression
Linear regression
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Simple Regression Years with Midwest and Shelf Space Winter .docx
Simple Regression Years with Midwest and Shelf Space Winter .docxSimple Regression Years with Midwest and Shelf Space Winter .docx
Simple Regression Years with Midwest and Shelf Space Winter .docx
 
Different Types of Machine Learning Algorithms
Different Types of Machine Learning AlgorithmsDifferent Types of Machine Learning Algorithms
Different Types of Machine Learning Algorithms
 
Unit-III Correlation and Regression.pptx
Unit-III Correlation and Regression.pptxUnit-III Correlation and Regression.pptx
Unit-III Correlation and Regression.pptx
 

More from Ruru Chowdhury

The One With The Wizards and Dragons. Prelims
The One With The Wizards and Dragons. PrelimsThe One With The Wizards and Dragons. Prelims
The One With The Wizards and Dragons. Prelims
Ruru Chowdhury
 
The One With The Wizards and Dragons. Finals
The One With The Wizards and Dragons. FinalsThe One With The Wizards and Dragons. Finals
The One With The Wizards and Dragons. Finals
Ruru Chowdhury
 
Statr session 25 and 26
Statr session 25 and 26Statr session 25 and 26
Statr session 25 and 26
Ruru Chowdhury
 
Statr session 21 and 22
Statr session 21 and 22Statr session 21 and 22
Statr session 21 and 22
Ruru Chowdhury
 
Statr session 19 and 20
Statr session 19 and 20Statr session 19 and 20
Statr session 19 and 20
Ruru Chowdhury
 
Statr session 17 and 18
Statr session 17 and 18Statr session 17 and 18
Statr session 17 and 18
Ruru Chowdhury
 
Statr session 17 and 18 (ASTR)
Statr session 17 and 18 (ASTR)Statr session 17 and 18 (ASTR)
Statr session 17 and 18 (ASTR)
Ruru Chowdhury
 
Statr session 15 and 16
Statr session 15 and 16Statr session 15 and 16
Statr session 15 and 16
Ruru Chowdhury
 
JM Statr session 13, Jan 11
JM Statr session 13, Jan 11JM Statr session 13, Jan 11
JM Statr session 13, Jan 11
Ruru Chowdhury
 
Statr sessions 11 to 12
Statr sessions 11 to 12Statr sessions 11 to 12
Statr sessions 11 to 12
Ruru Chowdhury
 
Nosql part3
Nosql part3Nosql part3
Nosql part3
Ruru Chowdhury
 
Nosql part1 8th December
Nosql part1 8th December Nosql part1 8th December
Nosql part1 8th December
Ruru Chowdhury
 
Nosql part 2
Nosql part 2Nosql part 2
Nosql part 2
Ruru Chowdhury
 
Statr sessions 9 to 10
Statr sessions 9 to 10Statr sessions 9 to 10
Statr sessions 9 to 10
Ruru Chowdhury
 
R part iii
R part iiiR part iii
R part iii
Ruru Chowdhury
 
R part II
R part IIR part II
R part II
Ruru Chowdhury
 
Statr sessions 7 to 8
Statr sessions 7 to 8Statr sessions 7 to 8
Statr sessions 7 to 8
Ruru Chowdhury
 
R part I
R part IR part I
R part I
Ruru Chowdhury
 
Statr sessions 4 to 6
Statr sessions 4 to 6Statr sessions 4 to 6
Statr sessions 4 to 6
Ruru Chowdhury
 
Statistics with R
Statistics with R Statistics with R
Statistics with R
Ruru Chowdhury
 

More from Ruru Chowdhury (20)

The One With The Wizards and Dragons. Prelims
The One With The Wizards and Dragons. PrelimsThe One With The Wizards and Dragons. Prelims
The One With The Wizards and Dragons. Prelims
 
The One With The Wizards and Dragons. Finals
The One With The Wizards and Dragons. FinalsThe One With The Wizards and Dragons. Finals
The One With The Wizards and Dragons. Finals
 
Statr session 25 and 26
Statr session 25 and 26Statr session 25 and 26
Statr session 25 and 26
 
Statr session 21 and 22
Statr session 21 and 22Statr session 21 and 22
Statr session 21 and 22
 
Statr session 19 and 20
Statr session 19 and 20Statr session 19 and 20
Statr session 19 and 20
 
Statr session 17 and 18
Statr session 17 and 18Statr session 17 and 18
Statr session 17 and 18
 
Statr session 17 and 18 (ASTR)
Statr session 17 and 18 (ASTR)Statr session 17 and 18 (ASTR)
Statr session 17 and 18 (ASTR)
 
Statr session 15 and 16
Statr session 15 and 16Statr session 15 and 16
Statr session 15 and 16
 
JM Statr session 13, Jan 11
JM Statr session 13, Jan 11JM Statr session 13, Jan 11
JM Statr session 13, Jan 11
 
Statr sessions 11 to 12
Statr sessions 11 to 12Statr sessions 11 to 12
Statr sessions 11 to 12
 
Nosql part3
Nosql part3Nosql part3
Nosql part3
 
Nosql part1 8th December
Nosql part1 8th December Nosql part1 8th December
Nosql part1 8th December
 
Nosql part 2
Nosql part 2Nosql part 2
Nosql part 2
 
Statr sessions 9 to 10
Statr sessions 9 to 10Statr sessions 9 to 10
Statr sessions 9 to 10
 
R part iii
R part iiiR part iii
R part iii
 
R part II
R part IIR part II
R part II
 
Statr sessions 7 to 8
Statr sessions 7 to 8Statr sessions 7 to 8
Statr sessions 7 to 8
 
R part I
R part IR part I
R part I
 
Statr sessions 4 to 6
Statr sessions 4 to 6Statr sessions 4 to 6
Statr sessions 4 to 6
 
Statistics with R
Statistics with R Statistics with R
Statistics with R
 

Recently uploaded

How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
NelTorrente
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
ArianaBusciglio
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 

Recently uploaded (20)

How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 

Statr session14, Jan 11

  • 1. Correlation and Regression Analysis: Learning Objectives • Explain the purpose of regression analysis and the meaning of independent versus dependent variables. • Compute the equation of a simple regression line from a sample of data, and interpret the slope and intercept of the equation. • Estimate values of Y to forecast outcomes using the regression model. • Understand residual analysis in testing the assumptions and in examining the fit underlying the regression line. • Compute a standard error of the estimate and interpret its meaning. • Compute a coefficient of determination and interpret it.
  • 2. Correlation • Correlation is a measure of the degree of relatedness of variables. • Coefficient of Correlation (r) - applicable only if both variables being analyzed have at least an interval level of data.
  • 3. Three Degrees of Correlation r<0 r>0 r=0
  • 4. Degree of Correlation • The term (r) is a measure of the linear correlation of two variables – The number ranges from -1 to 0 to +1  Positive correlation: as one variable increases, the other variable increases  Negative correlation: as one variable increases, the other one decreases  No correlation: the value of r is close to 0 – Closer to +1 or -1, the higher the correlation between two variables
  • 6. Regression Analysis • Regression analysis is the process of constructing a mathematical model or function that can be used to predict or determine one variable by another variable or variables.
  • 7. Simple Regression Analysis • Bivariate (two variables) linear regression -- the most elementary regression model – dependent variable, the variable to be predicted, usually called Y – independent variable, the predictor or explanatory variable, usually called X – Usually the first step in this analysis is to construct a scatter plot of the data • Nonlinear relationships and regression models with more than one independent variable can be explored by using multiple regression models
  • 8. Regression Models • Deterministic Regression Model - - produces an exact output: ˆ y   0  1 x • Probabilistic Regression Model ˆ y   0  1 x   • 0 and 1 are population parameters • 0 and 1 are estimated by sample statistics b0 and b1
  • 9. Equation of the Simple Regression Line
  • 10. A typical regression line Y ϴ X
  • 11. Least Squares Analysis • Least squares analysis is a process whereby a regression model is developed by producing the minimum sum of the squared error values • The vertical distance from each point to the line is the error of the prediction. • The least squares regression line is the regression line that results in the smallest sum of errors squared.
  • 12. Least Squares Analysis   X  X Y  Y    XY  nXY  b  X n X  X  X  2 1 2 2   Y   X b Y b X  n b n 0 1 1  X  Y  XY  n X 2   X n 2
  • 13. Least Squares Analysis SSXY    X  X Y  Y    SSXX   b1  X  X 2  X  X  Y  XY  n 2   X 2 n SSXY SSXX Y   X b  Y b X  n b n 0 1 1
  • 14. Airlines Cost Data include the costs and associated number of passengers for twelve 500-mile commercial airline flights using Boeing 737s during the same season of the year. Number of Passengers 61 63 67 69 70 74 76 81 86 91 95 97 Cost ($1,000) 4,280 4,080 4,420 4,170 4,480 4,300 4,820 4,700 5,110 5,130 5,640 5,560
  • 16. SS XY   XY  SS XX  X b1  b0  2   X Y n ( X ) 2 n  4,462 .22  (930 )( 56 .69 )  68 .745 12 (930 ) 2  73,764   1689 12 SS XY 68 .745   .0407 SS XX 1689 Y n  b1 X n ˆ Y  1.57  .0407 X  56 .69 930  (. 0407 )  1.57 12 12
  • 18. Residual Analysis: Airline Cost Example Number of Passengers X 61 63 67 69 70 74 76 81 86 91 95 97 Cost ($1,000) Y Predicted Value ˆ Y Residual ˆ Y Y 4.28 4.08 4.42 4.17 4.48 4.30 4.82 4.70 5.11 5.13 5.64 5.56 4.053 4.134 4.297 4.378 4.419 4.582 4.663 4.867 5.070 5.274 5.436 5.518 .227 -.054 .123 -.208 .061 -.282 .157 -.167 .040 -.144 .204 .042  (Y  Yˆ )  .001
  • 19. Residual Analysis: Airline Cost Example Outliers: Data points that lie apart from the rest of the points. They can produce large residuals and affect the regression line.
  • 20. Using Residuals to Test the Assumptions of the Regression Model • The assumptions of the regression model – The model is linear – The error terms have constant variances – The error terms are independent – The error terms are normally distributed
  • 21. Using Residuals to Test the Assumptions of the Regression Model • The assumption that the regression model is linear does not hold for the residual plot shown above • In figure (a) below the error variance is greater for smaller values of x and smaller for larger values of x and vice-versa in figure (b) below. This is a case of heteroscedasiticity.
  • 22. Standard Error of the Estimate • Residuals represent errors of estimation for individual points. • A more useful measurement of error is the standard error of the estimate. • The standard error of the estimate, denoted by se, is a standard deviation of the error of the regression model.
  • 23. Standard Error of the Estimate Sum of Squares Error SSE   Standard Error of the Estimate    Y Y 2   Y  b0  Y  b1  XY 2 SSE Se  n  2
  • 24. Determining SSE for the Airline Cost Data Example Number of Passengers X Cost ($1,000) Y Residual ˆ Y Y ˆ (Y  Y ) 2 61 63 67 69 70 74 76 81 86 91 95 97 4.28 4.08 4.42 4.17 4.48 4.30 4.82 4 .70 5.11 5.13 5.64 5.56 .227 -.054 .123 -.208 .061 -.282 .157 -.167 .040 -.144 .204 .042 .05153 .00292 .01513 .04326 .00372 .07952 .02465 .02789 .00160 .02074 .04162 .00176  (Y ˆ  Y )  .001  (Y ˆ  Y ) 2 =.31434 Sum of squares of error = SSE = .31434
  • 25. • The coefficient of determination is the proportion of variability of the dependent variable (y) accounted for or explained by the independent variable (x) • The coefficient of determination ranges from 0 to 1. • An r 2 of zero means that the predictor accounts for none of the variability of the dependent variable and that there is no regression prediction of y by x. • An r 2 of 1 means perfect prediction of y by x and that 100% of the variability of y is accounted for by x.
  • 26. SSYY   Y Y   Y 2  Y   2 2 n SSYY  exp lained var iation  un exp lained var iation SSYY  SSR  SSE SSR SSE 1  SSYY SSYY SSR 2  r SSYY SSE  1 SSYY SSE  1 2 Y 2 Y  n  
  • 27. SSE  0.31434  Y   270.9251 56.69  3.11209  Y  2 SSYY 2 n SSE r  1 SSYY .31434  1 3.11209  .899 2 2 12 89.9% of the variability of the cost of flying a Boeing 737 is accounted for by the number of passengers.
  • 28.
  • 29. Exercise in R: Linear Regression Open URL: www.openintro.org Go to Labs in R and select 7 - Linear Regression