SlideShare a Scribd company logo
Jamri AB Chapter 5 : Correlation and Simple Linear Regression 
1 
CHAPTER 5 :CORRELATION AND SIMPLE LINEAR REGRESSION 
5.1 INTRODUCTION 
 In this chapter, we will learn about a population which a measure of the strength of the linear 
relationship between two variables only. For example: 
 Expenditure (y) and revenue (x) 
 Price (x) and sales (y) 
 Advertising (x) and sales (y) 
 Quantity/output (x) and cost of production (y) 
5.2 THE SCATTER DIAGRAM 
 The purpose of the scatter diagram, as you know, is to illustrate diagrammatically any relationship 
that may exist between the dependent and independent variables. 
 To the extent that it succeeds it can help the analyst in three ways: 
 It indicates generally whether or not there appears to be a relationship between the two 
variables. 
 If there is a relationship it may indicate whether it is linear or non linear. 
 If the relationship is linear, the scatter diagram will show whether it is positive or negative. 
5.3 COEFFICIENT OF CORRELATION 
 Apart from plotting scatter diagrams, it is often useful to have an actual measure of the amount of 
correlation that exists between two given variables such as weight and height, turnover and profit, 
age and salary and so on. This measure of correlation is called a coefficient of correlation and is 
normally given the symbol “r”. 
 It can only lies between –1 and +1. 
Two methods are commonly used to give reasonable approximations to r . 
1. Pearson’s product- moment correlation coefficient 
2. Spearman’s rank correlation coefficient. 
5.3.1 PEARSON’S PRODUCT MOMENT CORRELATION COEFFICIENT 
 The Pearson’s correlation coefficient tells us two aspects of the relationship between two 
variables. The sign (negative or positive) for r identifies the kind of relationship and the magnitude 
of r describes the strength of relationship. 
 The formula is as follows. 
r = 
    
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
n 
y 
y 
n 
x 
x 
n 
x y 
xy 
2 
2 
2 
2
Jamri AB Chapter 5 : Correlation and Simple Linear Regression 
2 
Example. 
Suppose we record the height and weight of a random sample of six adults. It is reasonable to 
assume that these variable are normally distributed, so the pearson correlation coefficient is the 
appropriate measure of the degree of association between height and weight. 
Height (cm) weight (kg) 
170 57 
175 64 
176 70 
178 76 
183 71 
185 82 
 Where one of our variable is the x variable, the other is the y variable and n is the number of 
individuals. 
 In correlation, it is an arbitrary decision to which variable we call x and which we call y. 
Solution 
x y 2 x 2 y xy 
170 57 28900 3249 9690 
175 64 30625 4096 11200 
176 70 30976 4900 12320 
178 76 31684 5776 13528 
183 71 33489 5041 12993 
185 82 34225 6724 15170 
 x = 1067  y = 420  2 x = 189 899  2 y = 29 786  xy = 74901 
r = 
    
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
n 
y 
y 
n 
x 
x 
n 
x y 
xy 
2 
2 
2 
2 
r = 
 
 
 
 
 
 
 
 
  
  
 
 
 
 
 
6 
(420) 
29786 
6 
(1067) 
189899 
6 
(1067)(420) 
74901 
2 2 
r = 0.874 
5.3.2 COEFFICIENT OF DETERMINATION. 
 The coefficient of determination, 2 r is the ratio of the explained variation to the total variation. 
The term 
2 r is expressed as a percentage. 
 If r = 0.9349, 2 r = 0.8740 means that 87.40% of the total variation in y can be explained by 
the total variation in x.
Jamri AB Chapter 5 : Correlation and Simple Linear Regression 
3 
5.4 LINEAR REGRESSION ANALYSIS 
 The primary objective of regression analysis is to make predictions. 
 In regression analysis of the simple linear case, linear implying that the relationship between x 
and y is a straight line relationship. In this simple case, the equation which best fits the data can 
be written in the form of y = a + bx. 
 The formula of ‘a’ and ‘b’ 
Example 
A local travel agency collected data on the numbers of booking made and the total payment received 
from organizing trips within Malaysia between January 2007 through June 2007. 
Number of bookings made Total payment received (RM’00) 
20 60 
2 25 
4 26 
23 66 
18 49 
14 48 
Find the regression equation. 
Solution 
x y 2 x 2 y xy 
20 60 400 3600 1200 
2 25 4 625 50 
4 26 16 676 104 
23 66 529 4356 1518 
18 49 324 2401 882 
14 48 196 2304 672 
 x = 81  y = 274  2 x = 1469  2 y = 13962  xy = 4426 
 
 
 
  
 
 
 
n 
x 
x 
n 
x y 
xy 
b 2 
2 ( ) 
( )( ) 
= 
6 
(81) 
1469 
6 
(81)(274) 
4426 
2 
 
 
= 1.936 
n 
x 
b 
n 
y 
a     
( ) ( ) 
= 
6 
(81) 
1.936 
6 
(274) 
 = 19.530 
Thus, the regression line is y = 19.530 + 1.936x 
2 2 2 
2 
( X)( Y) 
( XY) 
n( XY) ( X)( Y) n 
b or 
n( X ) ( X) ( X) 
( X ) 
n 
    
           
      
    
  
( y) ( x) 
a Y bX or b 
n n 
  
  
Jamri AB Chapter 5 : Correlation and Simple Linear Regression 
4 
5.5 SPEARMAN’S RANK CORRELATION COEFFICIENT 
 It can also be used on quantitative data but the variables must first ranked. The value of r is 
calculated based on these rankings. 
rs = 
( 1) 
6 
1 2 
2 
 
  
n n 
d 
Example 
The manufacturer of Physio exercise equipment wants to study the relationship between the number 
of months exercise equipment was purchased and the number of hours the equipment was purchased 
and the number of hours the equipment was used. A random sample of 10 persons who purchased 
the equipment yielded the following: 
Person A B C D E F G 
Months purchased 2 6 9 7 8 4 5 
Hours exercised 10 8 5 5 3 8 5 
Compute Spearman’s rank correlation and interpret its value. 
Solution 
Months 
Purchased 
(x) 
Hours 
Exercised 
(y) 
x R y R d 2 d 
2 10 1 7 -6.0 36 
6 8 4 5.5 -1.5 2.25 
9 5 7 3 4 16 
7 5 5 3 2 4 
8 3 6 1 5 25 
4 8 2 5.5 -3.5 12.25 
5 5 3 3 0 0 
d  0   95.5 2 d 
rs = 
( 1) 
6 
1 2 
2 
 
  
n n 
d 
= 1- 
7(49 1) 
6(95.5) 
 
= -0.705

More Related Content

What's hot

Simple linear regression
Simple linear regressionSimple linear regression
Simple linear regression
Maria Theresa
 
Gauss-Jordan Theory
Gauss-Jordan TheoryGauss-Jordan Theory
Gauss-Jordan Theory
HernanFula
 
Chapter 2 part2-Correlation
Chapter 2 part2-CorrelationChapter 2 part2-Correlation
Chapter 2 part2-Correlation
nszakir
 

What's hot (19)

Correlation analysis ppt
Correlation analysis pptCorrelation analysis ppt
Correlation analysis ppt
 
Regression Analysis
Regression AnalysisRegression Analysis
Regression Analysis
 
5 regression
5 regression5 regression
5 regression
 
Simple linear regression
Simple linear regressionSimple linear regression
Simple linear regression
 
Chap11 simple regression
Chap11 simple regressionChap11 simple regression
Chap11 simple regression
 
Correlation 2
Correlation 2Correlation 2
Correlation 2
 
Gauss-Jordan Theory
Gauss-Jordan TheoryGauss-Jordan Theory
Gauss-Jordan Theory
 
Regression
Regression Regression
Regression
 
Nmsa 170900713008
Nmsa 170900713008Nmsa 170900713008
Nmsa 170900713008
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Regression analysis.
Regression analysis.Regression analysis.
Regression analysis.
 
Regression Analysis
Regression AnalysisRegression Analysis
Regression Analysis
 
04 regression
04 regression04 regression
04 regression
 
Regression
RegressionRegression
Regression
 
Chapter 2 part2-Correlation
Chapter 2 part2-CorrelationChapter 2 part2-Correlation
Chapter 2 part2-Correlation
 
Course pack unit 5
Course pack unit 5Course pack unit 5
Course pack unit 5
 
Curve Fitting
Curve FittingCurve Fitting
Curve Fitting
 
Correlation and Regression
Correlation and RegressionCorrelation and Regression
Correlation and Regression
 
Gauss
GaussGauss
Gauss
 

Viewers also liked

Carrie's Practice Slideshow
Carrie's Practice SlideshowCarrie's Practice Slideshow
Carrie's Practice Slideshow
Carrie Nelson
 
Philosophy of classroom management
Philosophy of classroom managementPhilosophy of classroom management
Philosophy of classroom management
emmjay91
 
Ch 4 customer buying behaviour
Ch 4 customer buying behaviourCh 4 customer buying behaviour
Ch 4 customer buying behaviour
Ram Kumar
 
Onboarding: Manager l'intégration en entreprise
Onboarding: Manager l'intégration en entrepriseOnboarding: Manager l'intégration en entreprise
Onboarding: Manager l'intégration en entreprise
HR SCOPE
 
Expository text in reading power point
Expository text  in reading power pointExpository text  in reading power point
Expository text in reading power point
sisriCR7smileangel
 
Lugares turisticos de el salvador
Lugares turisticos de el salvadorLugares turisticos de el salvador
Lugares turisticos de el salvador
karoapex
 
Lugares turisticos de el salvador
Lugares turisticos de el salvadorLugares turisticos de el salvador
Lugares turisticos de el salvador
karoapex
 
어랍쇼 발표자료
어랍쇼 발표자료어랍쇼 발표자료
어랍쇼 발표자료
NikYromi
 

Viewers also liked (20)

Chap7 time series
Chap7 time seriesChap7 time series
Chap7 time series
 
Cn presentation
Cn presentationCn presentation
Cn presentation
 
Lecture 4 18-13
Lecture 4 18-13Lecture 4 18-13
Lecture 4 18-13
 
Carrie's Practice Slideshow
Carrie's Practice SlideshowCarrie's Practice Slideshow
Carrie's Practice Slideshow
 
Chap2 data presentation
Chap2 data presentationChap2 data presentation
Chap2 data presentation
 
BCC ECM
BCC ECMBCC ECM
BCC ECM
 
BeeOffice for Shared Service Centers. How to improve the daily work of servic...
BeeOffice for Shared Service Centers. How to improve the daily work of servic...BeeOffice for Shared Service Centers. How to improve the daily work of servic...
BeeOffice for Shared Service Centers. How to improve the daily work of servic...
 
Czas na migrację na SAP HANA
Czas na migrację na SAP HANACzas na migrację na SAP HANA
Czas na migrację na SAP HANA
 
TAMA Company's Presentation #inspiredbyair
TAMA Company's Presentation #inspiredbyairTAMA Company's Presentation #inspiredbyair
TAMA Company's Presentation #inspiredbyair
 
Chap4 measure of dispersion and skewness
Chap4 measure of dispersion and skewnessChap4 measure of dispersion and skewness
Chap4 measure of dispersion and skewness
 
Philosophy of classroom management
Philosophy of classroom managementPhilosophy of classroom management
Philosophy of classroom management
 
International Trade
International TradeInternational Trade
International Trade
 
Ch 4 customer buying behaviour
Ch 4 customer buying behaviourCh 4 customer buying behaviour
Ch 4 customer buying behaviour
 
Group iii
Group iiiGroup iii
Group iii
 
Presentation1
Presentation1Presentation1
Presentation1
 
Onboarding: Manager l'intégration en entreprise
Onboarding: Manager l'intégration en entrepriseOnboarding: Manager l'intégration en entreprise
Onboarding: Manager l'intégration en entreprise
 
Expository text in reading power point
Expository text  in reading power pointExpository text  in reading power point
Expository text in reading power point
 
Lugares turisticos de el salvador
Lugares turisticos de el salvadorLugares turisticos de el salvador
Lugares turisticos de el salvador
 
Lugares turisticos de el salvador
Lugares turisticos de el salvadorLugares turisticos de el salvador
Lugares turisticos de el salvador
 
어랍쇼 발표자료
어랍쇼 발표자료어랍쇼 발표자료
어랍쇼 발표자료
 

Similar to Chap5 correlation

Correlation by Neeraj Bhandari ( Surkhet.Nepal )
Correlation by Neeraj Bhandari ( Surkhet.Nepal )Correlation by Neeraj Bhandari ( Surkhet.Nepal )
Correlation by Neeraj Bhandari ( Surkhet.Nepal )
Neeraj Bhandari
 
Lecture 13 Regression & Correlation.ppt
Lecture 13 Regression & Correlation.pptLecture 13 Regression & Correlation.ppt
Lecture 13 Regression & Correlation.ppt
shakirRahman10
 
Chapter 2 part3-Least-Squares Regression
Chapter 2 part3-Least-Squares RegressionChapter 2 part3-Least-Squares Regression
Chapter 2 part3-Least-Squares Regression
nszakir
 

Similar to Chap5 correlation (20)

Correlation by Neeraj Bhandari ( Surkhet.Nepal )
Correlation by Neeraj Bhandari ( Surkhet.Nepal )Correlation by Neeraj Bhandari ( Surkhet.Nepal )
Correlation by Neeraj Bhandari ( Surkhet.Nepal )
 
stats_ch12.pdf
stats_ch12.pdfstats_ch12.pdf
stats_ch12.pdf
 
ML Module 3.pdf
ML Module 3.pdfML Module 3.pdf
ML Module 3.pdf
 
Regression
RegressionRegression
Regression
 
Regression and correlation in statistics
Regression and correlation in statisticsRegression and correlation in statistics
Regression and correlation in statistics
 
correlation and regression
correlation and regressioncorrelation and regression
correlation and regression
 
Chapter13
Chapter13Chapter13
Chapter13
 
Biostats coorelation vs rREGRESSION.DIFFERENCE BETWEEN CORRELATION AND REGRES...
Biostats coorelation vs rREGRESSION.DIFFERENCE BETWEEN CORRELATION AND REGRES...Biostats coorelation vs rREGRESSION.DIFFERENCE BETWEEN CORRELATION AND REGRES...
Biostats coorelation vs rREGRESSION.DIFFERENCE BETWEEN CORRELATION AND REGRES...
 
Regression.pptx
Regression.pptxRegression.pptx
Regression.pptx
 
Correlation and Regression
Correlation and Regression Correlation and Regression
Correlation and Regression
 
Lecture 13 Regression & Correlation.ppt
Lecture 13 Regression & Correlation.pptLecture 13 Regression & Correlation.ppt
Lecture 13 Regression & Correlation.ppt
 
Statistics-Regression analysis
Statistics-Regression analysisStatistics-Regression analysis
Statistics-Regression analysis
 
Regression and corelation (Biostatistics)
Regression and corelation (Biostatistics)Regression and corelation (Biostatistics)
Regression and corelation (Biostatistics)
 
Presentation on Regression Analysis
Presentation on Regression AnalysisPresentation on Regression Analysis
Presentation on Regression Analysis
 
Stat
StatStat
Stat
 
Regression analysis by Muthama JM
Regression analysis by Muthama JMRegression analysis by Muthama JM
Regression analysis by Muthama JM
 
Regression Analysis by Muthama JM
Regression Analysis by Muthama JM Regression Analysis by Muthama JM
Regression Analysis by Muthama JM
 
Applied Business Statistics ,ken black , ch 3 part 2
Applied Business Statistics ,ken black , ch 3 part 2Applied Business Statistics ,ken black , ch 3 part 2
Applied Business Statistics ,ken black , ch 3 part 2
 
Chapter 2 part3-Least-Squares Regression
Chapter 2 part3-Least-Squares RegressionChapter 2 part3-Least-Squares Regression
Chapter 2 part3-Least-Squares Regression
 
Regression
Regression  Regression
Regression
 

Recently uploaded

Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
Avinash Rai
 

Recently uploaded (20)

The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. Henry
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Open Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointOpen Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPoint
 
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
 
Keeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security ServicesKeeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security Services
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
 

Chap5 correlation

  • 1. Jamri AB Chapter 5 : Correlation and Simple Linear Regression 1 CHAPTER 5 :CORRELATION AND SIMPLE LINEAR REGRESSION 5.1 INTRODUCTION  In this chapter, we will learn about a population which a measure of the strength of the linear relationship between two variables only. For example:  Expenditure (y) and revenue (x)  Price (x) and sales (y)  Advertising (x) and sales (y)  Quantity/output (x) and cost of production (y) 5.2 THE SCATTER DIAGRAM  The purpose of the scatter diagram, as you know, is to illustrate diagrammatically any relationship that may exist between the dependent and independent variables.  To the extent that it succeeds it can help the analyst in three ways:  It indicates generally whether or not there appears to be a relationship between the two variables.  If there is a relationship it may indicate whether it is linear or non linear.  If the relationship is linear, the scatter diagram will show whether it is positive or negative. 5.3 COEFFICIENT OF CORRELATION  Apart from plotting scatter diagrams, it is often useful to have an actual measure of the amount of correlation that exists between two given variables such as weight and height, turnover and profit, age and salary and so on. This measure of correlation is called a coefficient of correlation and is normally given the symbol “r”.  It can only lies between –1 and +1. Two methods are commonly used to give reasonable approximations to r . 1. Pearson’s product- moment correlation coefficient 2. Spearman’s rank correlation coefficient. 5.3.1 PEARSON’S PRODUCT MOMENT CORRELATION COEFFICIENT  The Pearson’s correlation coefficient tells us two aspects of the relationship between two variables. The sign (negative or positive) for r identifies the kind of relationship and the magnitude of r describes the strength of relationship.  The formula is as follows. r =                               n y y n x x n x y xy 2 2 2 2
  • 2. Jamri AB Chapter 5 : Correlation and Simple Linear Regression 2 Example. Suppose we record the height and weight of a random sample of six adults. It is reasonable to assume that these variable are normally distributed, so the pearson correlation coefficient is the appropriate measure of the degree of association between height and weight. Height (cm) weight (kg) 170 57 175 64 176 70 178 76 183 71 185 82  Where one of our variable is the x variable, the other is the y variable and n is the number of individuals.  In correlation, it is an arbitrary decision to which variable we call x and which we call y. Solution x y 2 x 2 y xy 170 57 28900 3249 9690 175 64 30625 4096 11200 176 70 30976 4900 12320 178 76 31684 5776 13528 183 71 33489 5041 12993 185 82 34225 6724 15170  x = 1067  y = 420  2 x = 189 899  2 y = 29 786  xy = 74901 r =                               n y y n x x n x y xy 2 2 2 2 r =                  6 (420) 29786 6 (1067) 189899 6 (1067)(420) 74901 2 2 r = 0.874 5.3.2 COEFFICIENT OF DETERMINATION.  The coefficient of determination, 2 r is the ratio of the explained variation to the total variation. The term 2 r is expressed as a percentage.  If r = 0.9349, 2 r = 0.8740 means that 87.40% of the total variation in y can be explained by the total variation in x.
  • 3. Jamri AB Chapter 5 : Correlation and Simple Linear Regression 3 5.4 LINEAR REGRESSION ANALYSIS  The primary objective of regression analysis is to make predictions.  In regression analysis of the simple linear case, linear implying that the relationship between x and y is a straight line relationship. In this simple case, the equation which best fits the data can be written in the form of y = a + bx.  The formula of ‘a’ and ‘b’ Example A local travel agency collected data on the numbers of booking made and the total payment received from organizing trips within Malaysia between January 2007 through June 2007. Number of bookings made Total payment received (RM’00) 20 60 2 25 4 26 23 66 18 49 14 48 Find the regression equation. Solution x y 2 x 2 y xy 20 60 400 3600 1200 2 25 4 625 50 4 26 16 676 104 23 66 529 4356 1518 18 49 324 2401 882 14 48 196 2304 672  x = 81  y = 274  2 x = 1469  2 y = 13962  xy = 4426         n x x n x y xy b 2 2 ( ) ( )( ) = 6 (81) 1469 6 (81)(274) 4426 2   = 1.936 n x b n y a     ( ) ( ) = 6 (81) 1.936 6 (274)  = 19.530 Thus, the regression line is y = 19.530 + 1.936x 2 2 2 2 ( X)( Y) ( XY) n( XY) ( X)( Y) n b or n( X ) ( X) ( X) ( X ) n                            ( y) ( x) a Y bX or b n n     
  • 4. Jamri AB Chapter 5 : Correlation and Simple Linear Regression 4 5.5 SPEARMAN’S RANK CORRELATION COEFFICIENT  It can also be used on quantitative data but the variables must first ranked. The value of r is calculated based on these rankings. rs = ( 1) 6 1 2 2    n n d Example The manufacturer of Physio exercise equipment wants to study the relationship between the number of months exercise equipment was purchased and the number of hours the equipment was purchased and the number of hours the equipment was used. A random sample of 10 persons who purchased the equipment yielded the following: Person A B C D E F G Months purchased 2 6 9 7 8 4 5 Hours exercised 10 8 5 5 3 8 5 Compute Spearman’s rank correlation and interpret its value. Solution Months Purchased (x) Hours Exercised (y) x R y R d 2 d 2 10 1 7 -6.0 36 6 8 4 5.5 -1.5 2.25 9 5 7 3 4 16 7 5 5 3 2 4 8 3 6 1 5 25 4 8 2 5.5 -3.5 12.25 5 5 3 3 0 0 d  0   95.5 2 d rs = ( 1) 6 1 2 2    n n d = 1- 7(49 1) 6(95.5)  = -0.705