Up  

 

 

Home Up

Spearman rank correlation

it is a nonparametric measure of the relationship between 2 sets of ordinal (ranked) values

calculation

where d is the difference between ranks

example

river

catchment

rank

discharge

rank

d

d2

yellow

672

7

3.3

7

0

0

ganges

956

5

11.7

4

1

1

amazon

5775

1

175.0

1

0

0

missi.

3269

2

18.4

3

1

1

mekong

795

6

11.0

5

1

1

indus

969

4

5.6

6

2

4

yantze

1942

3

22.0

2

1

1

         

Gd2

8

significance

only has meaning in a sample, if it is say the set of preferences for people it has no meaning

if it is a sample case

H0: there is no rank correlation

H1: may be directional or nondirectional

a nondirectional test is a 2 tail test

a directional test is a 1 tail test

the df is the number of of pairs of ranked values

you can use a table if the sample size is small <100

but more generally the test statistic is

where N is the number of observations

this might be a case where a one tailed test is desirable since most researchers have an idea of the direction of the sign of the coefficient

example

we reject H0, 2 tailed c.v.=2.57

 

H0: no association between 2 variables

H1: association between 2 variables - 2 tailed

H1: +/- association between 2 variables - 1 tailed

correction for tied ranks

from a practical viewpoint it is often not worth correcting for ties

use of correction is advised if

1) when 3 or more observations are tied equally

2) when the number of pairs of ties is more than 1/4 of the number of observations

the formula is

A=(n3-n)/12

B=3((tx3-tx)/12)

C=3((ty3-ty)/12)

where tx is the number of values of variable x tying at a given rank

ty is the same for y

the effect of the correction for ties is to increase the value of rs making it easier to reject the null hypothesis

ks test runs test spearman Friedman kw test U test proportions chi square wilcoxon median sign