Spearman’s Rank Correlation Coefficient © Christine Crisp “Teach A Level Maths” Statistics 1.

18
Spearman’s Rank Spearman’s Rank Correlation Correlation Coefficient Coefficient © Christine Crisp Teach A Level Maths” Teach A Level Maths” Statistics 1 Statistics 1

Transcript of Spearman’s Rank Correlation Coefficient © Christine Crisp “Teach A Level Maths” Statistics 1.

Page 1: Spearman’s Rank Correlation Coefficient © Christine Crisp “Teach A Level Maths” Statistics 1.

Spearman’s Rank Spearman’s Rank Correlation CoefficientCorrelation Coefficient

© Christine Crisp

““Teach A Level Maths”Teach A Level Maths”Statistics 1Statistics 1

Page 2: Spearman’s Rank Correlation Coefficient © Christine Crisp “Teach A Level Maths” Statistics 1.

Spearman’s Rank Correlation Coefficient

This presentation develops another method of measuring the relationship between 2 variables.Instead of dealing with the values of the variables as in the product moment correlation coefficient, we assign a number ( rank ) to each variable. We then calculate a correlation coefficient based on the ranks.The calculated value is called the Spearman’s Rank Correlation Coefficient, rs, and is an approximation to the p.m.c.c.

The formula is )1(

61

2

2

nn

drs

where d is the difference in ranks and n is the number of pairs.The values of rs have the same meanings as those for the p.m.c.c.

Page 3: Spearman’s Rank Correlation Coefficient © Christine Crisp “Teach A Level Maths” Statistics 1.

Spearman’s Rank Correlation Coefficiente.g.1 Two judges rank 8 books which have been

nominated for a prize. The rankings are given below. Find the Spearman’s rank correlation coefficient and comment on it’s value.

A B C D E F G H

Judge 1 2 4 1 8 5 7 3 6

Judge 2 1 5 4 8 6 7 2 3

Solution:

In this example, the data are already ranked.

We find d by subtracting the ranks for each book.

)1(

61

2

2

nn

drs

(I insert signs for d but since we are going to square you can ignore them if you wish. )

Page 4: Spearman’s Rank Correlation Coefficient © Christine Crisp “Teach A Level Maths” Statistics 1.

Spearman’s Rank Correlation Coefficient

)1(

61

2

2

nn

drs )164(8

)9...911(61

sr

740

101 30311

32768451Judge 2

3

G

7

F

5

E

68142Judge 1

d

HDCBA

There is a strong positive correlation.

In general, the judges are in agreement about the books.

This comment is a statistical interpretation.

This comment is in the context of the question.

)164(8

)22(61

Page 5: Spearman’s Rank Correlation Coefficient © Christine Crisp “Teach A Level Maths” Statistics 1.

Spearman’s Rank Correlation Coefficiente.g.2 Find the Spearman’s rank correlation

coefficient for the following data which gives the yield per acre for oats and barley over 5 years.

Solution:

Does it matter whether we choose 1 to be the least or 1 to be the greatest?

709

475

2003

92537578585Oats

211581682681Barley

2002200120001999

Source: Alberta: Agriculture, Food and Rural Development

ANS: No. ( I’ve chosen 1 for the least. )

We first need to assign ranks.

Page 6: Spearman’s Rank Correlation Coefficient © Christine Crisp “Teach A Level Maths” Statistics 1.

Spearman’s Rank Correlation Coefficiente.g.2 Find the Spearman’s rank correlation

coefficient for the following data which gives the yield per acre for oats and barley over 5 years.

Solution:

709

475

2003

92537578585Oats

211581682681Barley

2002200120001999

Source: Alberta: Agriculture, Food and Rural Development

5

2

2003

1345Oats

1243Barley

2002200120001999

We first need to assign ranks.

We now find the differences in the ranks.

Page 7: Spearman’s Rank Correlation Coefficient © Christine Crisp “Teach A Level Maths” Statistics 1.

Spearman’s Rank Correlation Coefficient

30102

51243Barley

2

2003

1345Oats

d

2002200120001999

)1(

61

2

2

nn

drs )125(5

)14(61

sr

30

There is a weak positive correlation. There is little evidence that high ( or low ) yields of both crops appear in the same years.

Page 8: Spearman’s Rank Correlation Coefficient © Christine Crisp “Teach A Level Maths” Statistics 1.

Spearman’s Rank Correlation Coefficient

SUMMARY

Spearman’s rank correlation coefficient is given by

)1(

61

2

2

nn

drs

where d is the difference in ranks and n is the number of pairs.The values of rs have the same meanings as those for the p.m.c.c.

Page 9: Spearman’s Rank Correlation Coefficient © Christine Crisp “Teach A Level Maths” Statistics 1.

Spearman’s Rank Correlation CoefficientExerciseFor each of the following, find Spearman’s rank correlation coefficient and interpret your answer in the context of the question.1. Two students ranked 8 countries in order of

preference for a holiday. Their rankings are given below:

6

5

Ho

2

4

Tu

4

8

Sc

376211st student

587312nd student

ItGeFrGrSp

2. The number of known species of plants (thousands) and birds (hundreds) for 10 Asian countries are as follows:

4

3

Ko

8

16

Ma

7

8

La

5

6

Ja

16

30

In

7193254Plants

9111263Birds

NeIndChBaAr

Source: Earthtrends

Page 10: Spearman’s Rank Correlation Coefficient © Christine Crisp “Teach A Level Maths” Statistics 1.

Spearman’s Rank Correlation Coefficient

Sp Gr Fr Ge Sc Tu Ho It

1st student 1 2 6 7 8 4 5 3

2nd student 1 3 7 8 4 2 6 5

d 0 -1 -1 -1 4 2 -1 -2

)1(

61

2

2

nn

drs )164(8

)28(61

sr

)..2(670 pd

1.

The students largely agree about the holiday destinations.

There is a strong positive correlation.

Solution:

Page 11: Spearman’s Rank Correlation Coefficient © Christine Crisp “Teach A Level Maths” Statistics 1.

Spearman’s Rank Correlation Coefficient

)1(

61

2

2

nn

drs )1100(10

)12(61

sr

930

Ar Ba Ch Ind In Ja La Ko Ma NePlants 4 5 32 19 30 6 8 3 16 7Birds 3 6 12 11 16 5 7 4 8 9

2.

Ar Ba Ch Ind In Ja La Ko Ma NePlants 2 3 10 8 9 4 6 1 7 5Birds 1 4 9 8 10 3 5 2 6 7d 1 -1 1 0 -1 1 1 -1 1 -2

There is a very strong evidence that the higher the number of plant species the higher the number of bird species.

Solution:

Assigning ranks, with 1 the lowest, we get

Page 12: Spearman’s Rank Correlation Coefficient © Christine Crisp “Teach A Level Maths” Statistics 1.
Page 13: Spearman’s Rank Correlation Coefficient © Christine Crisp “Teach A Level Maths” Statistics 1.

Spearman’s Rank Correlation Coefficient

The following slides contain repeats of information on earlier slides, shown without colour, so that they can be printed and photocopied.For most purposes the slides can be printed as “Handouts” with up to 6 slides per sheet.

Page 14: Spearman’s Rank Correlation Coefficient © Christine Crisp “Teach A Level Maths” Statistics 1.

Spearman’s Rank Correlation Coefficient

SUMMARY

Spearman’s rank correlation coefficient is given by

)1(

61

2

2

nn

drs

where d is the difference in ranks and n is the number of pairs.The values of rs have the same meanings as those for the p.m.c.c.

Page 15: Spearman’s Rank Correlation Coefficient © Christine Crisp “Teach A Level Maths” Statistics 1.

Spearman’s Rank Correlation Coefficiente.g.1 Two judges rank 8 books which have been

nominated for a prize. The rankings are given below. Find the Spearman’s rank correlation coefficient and comment on it’s value.

2

3

G

7

7

F

6

5

E

68142Judge 1

38451Judge 2

HDCBA

Solution:

In this example, the data are already ranked.

We find d by subtracting the ranks for each book.

)1(

61

2

2

nn

drs

(I insert signs for d but since we are going to square you can ignore them if you wish. )

Page 16: Spearman’s Rank Correlation Coefficient © Christine Crisp “Teach A Level Maths” Statistics 1.

Spearman’s Rank Correlation Coefficient

)1(

61

2

2

nn

drs )164(8

)9...911(61

sr

740

101 30311

32768451Judge 2

3

G

7

F

5

E

68142Judge 1

d

HDCBA

There is a strong positive correlation.

In general, the judges are in agreement about the books.

This comment is a statistical interpretation.

This comment is in the context of the question.

)164(8

)22(61

Page 17: Spearman’s Rank Correlation Coefficient © Christine Crisp “Teach A Level Maths” Statistics 1.

Spearman’s Rank Correlation Coefficiente.g.2 Find the Spearman’s rank correlation

coefficient for the following data which gives the yield per acre for oats and barley over 5 years.

Solution:

709

475

2003

92537578585Oats

211581682681Barley

2002200120001999

Source: Alberta: Agriculture, Food and Rural Development

5

2

2003

1345Oats

1243Barley

2002200120001999

We first need to assign ranks.

We now find the differences in the ranks.

Page 18: Spearman’s Rank Correlation Coefficient © Christine Crisp “Teach A Level Maths” Statistics 1.

Spearman’s Rank Correlation Coefficient

30102

51243Barley

2

2003

1345Oats

d

2002200120001999

)125(5

)14(61

sr

30

There is a weak positive correlation. There is little evidence that high ( or low ) yields of both crops appear in the same years.

)1(

61

2

2

nn

drs