SlideShare a Scribd company logo
“ Spearman Rank Correlation Coefficient”
Presented by : Eng. Waleed Alzaghal
You Tube Channel : Waleed Alzaghal
The scores of five students in Math and English are shown in below table.
Compute the Spearman Rank Correlation Coefficient for these data. Consider the
rank of the score is as the following:
• 90 – 100 Excellent
• 80 – 89 Very Good
• 70 – 79 Good
• 60 – 69 Weak
Student Math Score (x) English Score (y) Results(x) Results (y)
1 95 97 Excellent Excellent
2 90 92 Excellent Excellent
3 75 80 Good Very Good
4 85 78 Very Good Good
5 60 68 Weak Weak
1- Display the Scatter Plot.
2- Find the Equation of the Regression Line.
3- Draw the Regression Line.
4- Compute the Pearson’s Correlation Coefficient.
5- Compute the Spearman Rank Correlation Coefficient.
6- Predict the value of ŷ for x = 1 , x = 4
7- Compute the Error of Prediction for x = 9
8- Compute the Least Squares of Errors.
9- Compute the Sum of Squares of Errors for the following Equation:
ŷ = - 36.00 x + 322.44
Obs. Age (x) Price(y)
1 8 45
2 3 210
3 6 100
4 9 33
5 2 267
6 5 134
7 6 109
8 3 235
The price of 8 cars (in hundred dollars) with different ages (in year) are in below table:
1- Display the Scatter Plot.
ŷ = mx + b
m =
𝑛 𝑥𝑦 −( 𝑥)( 𝑦)
𝑛 𝑥2
−( 𝑥)2
m =
8 4450 −(42)(1133)
8 264 − 42 2
m =
−11,986
348
m ≈ − 34.44 (Slope of the Regression Line)
Obs. Age (x) Price(y) x
2
y
2
xy
1 8 45 64 2025 360
2 3 210 9 44100 630
3 6 100 36 10000 600
4 9 33 81 1089 297
5 2 267 4 71289 534
6 5 134 25 17956 670
7 6 109 36 11881 654
8 3 235 9 55225 705
Sum 42 1133 264 213565 4450
2- Find the Equation of the Regression Line.
ŷ = mx + b
b =
𝑦 −𝑚 𝑥
𝑛
b =
1133 − (−34.44)(42)
8
b =
2,579.48
8
b = 322.44
ŷ = − 34.44x + 322.44
Obs. Age (x) Price(y) x
2
y
2
xy
1 8 45 64 2025 360
2 3 210 9 44100 630
3 6 100 36 10000 600
4 9 33 81 1089 297
5 2 267 4 71289 534
6 5 134 25 17956 670
7 6 109 36 11881 654
8 3 235 9 55225 705
Sum 42 1133 264 213565 4450
3- Draw the Regression Line.
Obs. Age (x) Price(y) x
2
y
2
xy
1 8 45 64 2025 360
2 3 210 9 44100 630
3 6 100 36 10000 600
4 9 33 81 1089 297
5 2 267 4 71289 534
6 5 134 25 17956 670
7 6 109 36 11881 654
8 3 235 9 55225 705
Sum 42 1133 264 213565 4450
𝑟 =
𝑛 𝑥𝑦 − ( 𝑥)( 𝑦)
(𝑛 𝑥2 − ( 𝑥)2). (𝑛 𝑦2 − ( 𝑦)2
𝑟 =
8 4450 − (42)(1133)
( 8 264 − 42 2)( 8 213565 − 1133 2)
𝑟 =
−11,986
(348)(424,831)
𝑟 =
−11986
12,159.00
r ≈ −0.99
(Interpretation: A very Strong Negative Correlation)
4- Compute the Pearson’s Correlation Coefficient.
rs = 1 −
6 𝑑2
𝑛(𝑛2
−1)
rs = 1 −
(6)(165)
8(82
−1)
rs = 1 −
990
8(64 −1)
rs = 1 −
990
504
rs = − 0.96
(Interpretation: a very strong negative correlation).
5- Compute the Spearman Rank Correlation Coefficient.
Obs. Age (x) Price(y) Rank (Age) Rank (Price) d d
2
1 8 45 7 2 5.0 25.00
2 3 210 2.5 6 -3.5 12.25
3 6 100 5.5 3 2.5 6.25
4 9 33 8 1 7.0 49.00
5 2 267 1 8 -7.0 49.00
6 5 134 4 5 -1.0 1.00
7 6 109 5.5 4 1.5 2.25
8 3 235 2.5 7 -4.5 20.25
165Sum
6- Predict the value of ŷ for x = 1
Ŷ = (-34.44)(1) + 322.44 = 288
Ŷ = (-34.44)(4) + 322.44 = 184.68
6- Predict the value of ŷ for x = 4
7- Compute the Error of Prediction for x=9
Ŷ = (-34.44)(9) + 322.44 = 12.48
E = Y – Ŷ = 33 – 12.48 = 20.52
8- Compute the Sum (Least) Squares of Errors.
Obs. Age (x) Price(y) ŷ=-34.44x+322.44 E=y-ŷ E
2
=(y-ŷ)
2
1 8 45 46.92 -1.92 3.69
2 3 210 219.12 -9.12 83.17
3 6 100 115.80 -15.80 249.64
4 9 33 12.48 20.52 421.07
5 2 267 253.56 13.44 180.63
6 5 134 150.24 -16.24 263.74
7 6 109 115.80 -6.80 46.24
8 3 235 219.12 15.88 252.17
1500.36Sum
Least Squares of Error = ((E1)2 + (E2)2 + (E3)2 + (E4)2 + (E5)2 + (E6)2 + (E7)2 + (E8)2)
Least Squares of Error = 3.69 + 83.17 + ……. + 46.24 + 252.17 = 1500.36
9- Compute the Squares of Errors for the following Equation: ŷ = -36.00 x+322.44
Obs. Age (x) Price(y) ŷ=-36.00 x+322.44 E=y-ŷ E
2
=(y-ŷ)
2
1 8 45 34.44 10.56 111.51
2 3 210 214.44 -4.44 19.71
3 6 100 106.44 -6.44 41.47
4 9 33 -1.56 34.56 1194.39
5 2 267 250.44 16.56 274.23
6 5 134 142.44 -8.44 71.23
7 6 109 106.44 2.56 6.55
8 3 235 214.44 20.56 422.71
2141.83Sum
Sum of Squares of Error = ((E1)2 + (E2)2 + (E3)2 + (E4)2 + (E5)2 + (E6)2 + (E7)2 + (E8)2)
Sum of Squares of Error = 111.51 + 19.71 + ……. + 6.55 + 422.71 = 2141.83

More Related Content

What's hot (11)

Properties of arithmetic mean
Properties of arithmetic meanProperties of arithmetic mean
Properties of arithmetic mean
 
Chapter5
Chapter5Chapter5
Chapter5
 
Armaduras
ArmadurasArmaduras
Armaduras
 
Calculation of arithmetic mean
Calculation of arithmetic meanCalculation of arithmetic mean
Calculation of arithmetic mean
 
Correlation analysis ppt
Correlation analysis pptCorrelation analysis ppt
Correlation analysis ppt
 
10th grade final exam review answer key
10th grade final exam review answer key10th grade final exam review answer key
10th grade final exam review answer key
 
Chapter7
Chapter7Chapter7
Chapter7
 
Z Scores
Z ScoresZ Scores
Z Scores
 
S7 pn
S7 pnS7 pn
S7 pn
 
Algebra 2 unit 12.3.12.5
Algebra 2 unit 12.3.12.5Algebra 2 unit 12.3.12.5
Algebra 2 unit 12.3.12.5
 
Chapter 04 drill_solution
Chapter 04 drill_solutionChapter 04 drill_solution
Chapter 04 drill_solution
 

Similar to Spearman rank correlation coefficient

Howard, anton calculo i- um novo horizonte - exercicio resolvidos v1
Howard, anton   calculo i- um novo horizonte - exercicio resolvidos v1Howard, anton   calculo i- um novo horizonte - exercicio resolvidos v1
Howard, anton calculo i- um novo horizonte - exercicio resolvidos v1cideni
 
William hyatt-7th-edition-drill-problems-solution
William hyatt-7th-edition-drill-problems-solutionWilliam hyatt-7th-edition-drill-problems-solution
William hyatt-7th-edition-drill-problems-solutionSalman Salman
 
Pre-calculus 1, 2 and Calculus I (exam notes)
Pre-calculus 1, 2 and Calculus I (exam notes)Pre-calculus 1, 2 and Calculus I (exam notes)
Pre-calculus 1, 2 and Calculus I (exam notes)William Faber
 
Algebra ii honors study guide
Algebra ii honors study guideAlgebra ii honors study guide
Algebra ii honors study guidemorrobea
 
Algebra ii honors study guide
Algebra ii honors study guideAlgebra ii honors study guide
Algebra ii honors study guidemorrobea
 
Exponent & Logarithm
Exponent &  LogarithmExponent &  Logarithm
Exponent & Logarithmguest0ffcb4
 
workbook_full_solutions_2.pdf
workbook_full_solutions_2.pdfworkbook_full_solutions_2.pdf
workbook_full_solutions_2.pdfZiaSethi1
 
Gabarito completo anton_calculo_8ed_caps_01_08
Gabarito completo anton_calculo_8ed_caps_01_08Gabarito completo anton_calculo_8ed_caps_01_08
Gabarito completo anton_calculo_8ed_caps_01_08joseotaviosurdi
 
Ernest f. haeussler, richard s. paul y richard j. wood. matemáticas para admi...
Ernest f. haeussler, richard s. paul y richard j. wood. matemáticas para admi...Ernest f. haeussler, richard s. paul y richard j. wood. matemáticas para admi...
Ernest f. haeussler, richard s. paul y richard j. wood. matemáticas para admi...Jhonatan Minchán
 
Solucionario de matemáticas para administación y economia
Solucionario de matemáticas para administación y economiaSolucionario de matemáticas para administación y economia
Solucionario de matemáticas para administación y economiaLuis Perez Anampa
 
Sol mat haeussler_by_priale
Sol mat haeussler_by_prialeSol mat haeussler_by_priale
Sol mat haeussler_by_prialeJeff Chasi
 
31350052 introductory-mathematical-analysis-textbook-solution-manual
31350052 introductory-mathematical-analysis-textbook-solution-manual31350052 introductory-mathematical-analysis-textbook-solution-manual
31350052 introductory-mathematical-analysis-textbook-solution-manualMahrukh Khalid
 
Solution Manual : Chapter - 01 Functions
Solution Manual : Chapter - 01 FunctionsSolution Manual : Chapter - 01 Functions
Solution Manual : Chapter - 01 FunctionsHareem Aslam
 
Assignment of class 12 (chapters 2 to 9)
Assignment of class 12 (chapters 2 to 9)Assignment of class 12 (chapters 2 to 9)
Assignment of class 12 (chapters 2 to 9)KarunaGupta1982
 
GREKing: Vedic Maths Concept
GREKing: Vedic Maths ConceptGREKing: Vedic Maths Concept
GREKing: Vedic Maths ConceptRahul Singh
 

Similar to Spearman rank correlation coefficient (20)

Howard, anton calculo i- um novo horizonte - exercicio resolvidos v1
Howard, anton   calculo i- um novo horizonte - exercicio resolvidos v1Howard, anton   calculo i- um novo horizonte - exercicio resolvidos v1
Howard, anton calculo i- um novo horizonte - exercicio resolvidos v1
 
William hyatt-7th-edition-drill-problems-solution
William hyatt-7th-edition-drill-problems-solutionWilliam hyatt-7th-edition-drill-problems-solution
William hyatt-7th-edition-drill-problems-solution
 
Pre-calculus 1, 2 and Calculus I (exam notes)
Pre-calculus 1, 2 and Calculus I (exam notes)Pre-calculus 1, 2 and Calculus I (exam notes)
Pre-calculus 1, 2 and Calculus I (exam notes)
 
Set 1 mawar
Set 1 mawarSet 1 mawar
Set 1 mawar
 
Algebra ii honors study guide
Algebra ii honors study guideAlgebra ii honors study guide
Algebra ii honors study guide
 
Algebra ii honors study guide
Algebra ii honors study guideAlgebra ii honors study guide
Algebra ii honors study guide
 
Exponent & Logarithm
Exponent &  LogarithmExponent &  Logarithm
Exponent & Logarithm
 
workbook_full_solutions_2.pdf
workbook_full_solutions_2.pdfworkbook_full_solutions_2.pdf
workbook_full_solutions_2.pdf
 
Mathematics
MathematicsMathematics
Mathematics
 
Mathematics
MathematicsMathematics
Mathematics
 
Gabarito completo anton_calculo_8ed_caps_01_08
Gabarito completo anton_calculo_8ed_caps_01_08Gabarito completo anton_calculo_8ed_caps_01_08
Gabarito completo anton_calculo_8ed_caps_01_08
 
Calculo integral - Larson
Calculo integral - LarsonCalculo integral - Larson
Calculo integral - Larson
 
Ernest f. haeussler, richard s. paul y richard j. wood. matemáticas para admi...
Ernest f. haeussler, richard s. paul y richard j. wood. matemáticas para admi...Ernest f. haeussler, richard s. paul y richard j. wood. matemáticas para admi...
Ernest f. haeussler, richard s. paul y richard j. wood. matemáticas para admi...
 
Solucionario de matemáticas para administación y economia
Solucionario de matemáticas para administación y economiaSolucionario de matemáticas para administación y economia
Solucionario de matemáticas para administación y economia
 
Sol mat haeussler_by_priale
Sol mat haeussler_by_prialeSol mat haeussler_by_priale
Sol mat haeussler_by_priale
 
31350052 introductory-mathematical-analysis-textbook-solution-manual
31350052 introductory-mathematical-analysis-textbook-solution-manual31350052 introductory-mathematical-analysis-textbook-solution-manual
31350052 introductory-mathematical-analysis-textbook-solution-manual
 
Solution Manual : Chapter - 01 Functions
Solution Manual : Chapter - 01 FunctionsSolution Manual : Chapter - 01 Functions
Solution Manual : Chapter - 01 Functions
 
New stack
New stackNew stack
New stack
 
Assignment of class 12 (chapters 2 to 9)
Assignment of class 12 (chapters 2 to 9)Assignment of class 12 (chapters 2 to 9)
Assignment of class 12 (chapters 2 to 9)
 
GREKing: Vedic Maths Concept
GREKing: Vedic Maths ConceptGREKing: Vedic Maths Concept
GREKing: Vedic Maths Concept
 

Recently uploaded

Tabula.io Cheatsheet: automate your data workflows
Tabula.io Cheatsheet: automate your data workflowsTabula.io Cheatsheet: automate your data workflows
Tabula.io Cheatsheet: automate your data workflowsalex933524
 
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...correoyaya
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单ewymefz
 
Supply chain analytics to combat the effects of Ukraine-Russia-conflict
Supply chain analytics to combat the effects of Ukraine-Russia-conflictSupply chain analytics to combat the effects of Ukraine-Russia-conflict
Supply chain analytics to combat the effects of Ukraine-Russia-conflictJack Cole
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单ewymefz
 
Uber Ride Supply Demand Gap Analysis Report
Uber Ride Supply Demand Gap Analysis ReportUber Ride Supply Demand Gap Analysis Report
Uber Ride Supply Demand Gap Analysis ReportSatyamNeelmani2
 
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...elinavihriala
 
Computer Presentation.pptx ecommerce advantage s
Computer Presentation.pptx ecommerce advantage sComputer Presentation.pptx ecommerce advantage s
Computer Presentation.pptx ecommerce advantage sMAQIB18
 
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 ReboundOppotus
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP
 
Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJames Polillo
 
Business update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMIBusiness update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMIAlejandraGmez176757
 
tapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive datatapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive datatheahmadsaood
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单ewymefz
 
Investigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_CrimesInvestigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_CrimesStarCompliance.io
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单enxupq
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单yhkoc
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhArpitMalhotra16
 

Recently uploaded (20)

Tabula.io Cheatsheet: automate your data workflows
Tabula.io Cheatsheet: automate your data workflowsTabula.io Cheatsheet: automate your data workflows
Tabula.io Cheatsheet: automate your data workflows
 
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
Supply chain analytics to combat the effects of Ukraine-Russia-conflict
Supply chain analytics to combat the effects of Ukraine-Russia-conflictSupply chain analytics to combat the effects of Ukraine-Russia-conflict
Supply chain analytics to combat the effects of Ukraine-Russia-conflict
 
Slip-and-fall Injuries: Top Workers' Comp Claims
Slip-and-fall Injuries: Top Workers' Comp ClaimsSlip-and-fall Injuries: Top Workers' Comp Claims
Slip-and-fall Injuries: Top Workers' Comp Claims
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 
Uber Ride Supply Demand Gap Analysis Report
Uber Ride Supply Demand Gap Analysis ReportUber Ride Supply Demand Gap Analysis Report
Uber Ride Supply Demand Gap Analysis Report
 
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
 
Computer Presentation.pptx ecommerce advantage s
Computer Presentation.pptx ecommerce advantage sComputer Presentation.pptx ecommerce advantage s
Computer Presentation.pptx ecommerce advantage s
 
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
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization Sample
 
Business update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMIBusiness update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMI
 
tapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive datatapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive data
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
 
Investigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_CrimesInvestigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_Crimes
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 

Spearman rank correlation coefficient

  • 1. “ Spearman Rank Correlation Coefficient” Presented by : Eng. Waleed Alzaghal You Tube Channel : Waleed Alzaghal
  • 2. The scores of five students in Math and English are shown in below table. Compute the Spearman Rank Correlation Coefficient for these data. Consider the rank of the score is as the following: • 90 – 100 Excellent • 80 – 89 Very Good • 70 – 79 Good • 60 – 69 Weak Student Math Score (x) English Score (y) Results(x) Results (y) 1 95 97 Excellent Excellent 2 90 92 Excellent Excellent 3 75 80 Good Very Good 4 85 78 Very Good Good 5 60 68 Weak Weak
  • 3. 1- Display the Scatter Plot. 2- Find the Equation of the Regression Line. 3- Draw the Regression Line. 4- Compute the Pearson’s Correlation Coefficient. 5- Compute the Spearman Rank Correlation Coefficient. 6- Predict the value of ŷ for x = 1 , x = 4 7- Compute the Error of Prediction for x = 9 8- Compute the Least Squares of Errors. 9- Compute the Sum of Squares of Errors for the following Equation: ŷ = - 36.00 x + 322.44 Obs. Age (x) Price(y) 1 8 45 2 3 210 3 6 100 4 9 33 5 2 267 6 5 134 7 6 109 8 3 235 The price of 8 cars (in hundred dollars) with different ages (in year) are in below table:
  • 4. 1- Display the Scatter Plot.
  • 5. ŷ = mx + b m = 𝑛 𝑥𝑦 −( 𝑥)( 𝑦) 𝑛 𝑥2 −( 𝑥)2 m = 8 4450 −(42)(1133) 8 264 − 42 2 m = −11,986 348 m ≈ − 34.44 (Slope of the Regression Line) Obs. Age (x) Price(y) x 2 y 2 xy 1 8 45 64 2025 360 2 3 210 9 44100 630 3 6 100 36 10000 600 4 9 33 81 1089 297 5 2 267 4 71289 534 6 5 134 25 17956 670 7 6 109 36 11881 654 8 3 235 9 55225 705 Sum 42 1133 264 213565 4450 2- Find the Equation of the Regression Line.
  • 6. ŷ = mx + b b = 𝑦 −𝑚 𝑥 𝑛 b = 1133 − (−34.44)(42) 8 b = 2,579.48 8 b = 322.44 ŷ = − 34.44x + 322.44 Obs. Age (x) Price(y) x 2 y 2 xy 1 8 45 64 2025 360 2 3 210 9 44100 630 3 6 100 36 10000 600 4 9 33 81 1089 297 5 2 267 4 71289 534 6 5 134 25 17956 670 7 6 109 36 11881 654 8 3 235 9 55225 705 Sum 42 1133 264 213565 4450
  • 7. 3- Draw the Regression Line.
  • 8. Obs. Age (x) Price(y) x 2 y 2 xy 1 8 45 64 2025 360 2 3 210 9 44100 630 3 6 100 36 10000 600 4 9 33 81 1089 297 5 2 267 4 71289 534 6 5 134 25 17956 670 7 6 109 36 11881 654 8 3 235 9 55225 705 Sum 42 1133 264 213565 4450 𝑟 = 𝑛 𝑥𝑦 − ( 𝑥)( 𝑦) (𝑛 𝑥2 − ( 𝑥)2). (𝑛 𝑦2 − ( 𝑦)2 𝑟 = 8 4450 − (42)(1133) ( 8 264 − 42 2)( 8 213565 − 1133 2) 𝑟 = −11,986 (348)(424,831) 𝑟 = −11986 12,159.00 r ≈ −0.99 (Interpretation: A very Strong Negative Correlation) 4- Compute the Pearson’s Correlation Coefficient.
  • 9. rs = 1 − 6 𝑑2 𝑛(𝑛2 −1) rs = 1 − (6)(165) 8(82 −1) rs = 1 − 990 8(64 −1) rs = 1 − 990 504 rs = − 0.96 (Interpretation: a very strong negative correlation). 5- Compute the Spearman Rank Correlation Coefficient. Obs. Age (x) Price(y) Rank (Age) Rank (Price) d d 2 1 8 45 7 2 5.0 25.00 2 3 210 2.5 6 -3.5 12.25 3 6 100 5.5 3 2.5 6.25 4 9 33 8 1 7.0 49.00 5 2 267 1 8 -7.0 49.00 6 5 134 4 5 -1.0 1.00 7 6 109 5.5 4 1.5 2.25 8 3 235 2.5 7 -4.5 20.25 165Sum
  • 10. 6- Predict the value of ŷ for x = 1 Ŷ = (-34.44)(1) + 322.44 = 288
  • 11. Ŷ = (-34.44)(4) + 322.44 = 184.68 6- Predict the value of ŷ for x = 4
  • 12. 7- Compute the Error of Prediction for x=9 Ŷ = (-34.44)(9) + 322.44 = 12.48 E = Y – Ŷ = 33 – 12.48 = 20.52
  • 13. 8- Compute the Sum (Least) Squares of Errors. Obs. Age (x) Price(y) ŷ=-34.44x+322.44 E=y-ŷ E 2 =(y-ŷ) 2 1 8 45 46.92 -1.92 3.69 2 3 210 219.12 -9.12 83.17 3 6 100 115.80 -15.80 249.64 4 9 33 12.48 20.52 421.07 5 2 267 253.56 13.44 180.63 6 5 134 150.24 -16.24 263.74 7 6 109 115.80 -6.80 46.24 8 3 235 219.12 15.88 252.17 1500.36Sum Least Squares of Error = ((E1)2 + (E2)2 + (E3)2 + (E4)2 + (E5)2 + (E6)2 + (E7)2 + (E8)2) Least Squares of Error = 3.69 + 83.17 + ……. + 46.24 + 252.17 = 1500.36
  • 14. 9- Compute the Squares of Errors for the following Equation: ŷ = -36.00 x+322.44 Obs. Age (x) Price(y) ŷ=-36.00 x+322.44 E=y-ŷ E 2 =(y-ŷ) 2 1 8 45 34.44 10.56 111.51 2 3 210 214.44 -4.44 19.71 3 6 100 106.44 -6.44 41.47 4 9 33 -1.56 34.56 1194.39 5 2 267 250.44 16.56 274.23 6 5 134 142.44 -8.44 71.23 7 6 109 106.44 2.56 6.55 8 3 235 214.44 20.56 422.71 2141.83Sum Sum of Squares of Error = ((E1)2 + (E2)2 + (E3)2 + (E4)2 + (E5)2 + (E6)2 + (E7)2 + (E8)2) Sum of Squares of Error = 111.51 + 19.71 + ……. + 6.55 + 422.71 = 2141.83