## Biostatistics: Spearman Rank Correlation

Biostatistics: Spearman Rank Correlation

CHAPTER 17, PROBLEM 5, SECTION E

SECTIONS A-D IS HERE:

http://www.brianthemountainram.com/2012/12/10/biostatistics-pearsons-correlation/

SECTION E IS BELOW

e) Calculate rs, the Spearman rank correlation coefficient.

Patient | Cholesterol Level (mmol/l) | Cholesterol rank | Triglyceride level (mmol/l) | Triglyceride rank | Rank difference X-Y = d |
Square of the differences = d^2 |

1 | 5.12 | 1 | 2.30 | 1 | 0 | 0 |

2 | 6.18 | 5 | 2.54 | 2 | 3 | 9 |

3 | 6.77 | 8 | 2.95 | 3 | 5 | 25 |

4 | 6.65 | 7 | 3.77 | 4 | 3 | 9 |

5 | 6.36 | 6 | 4.18 | 5 | 1 | 1 |

6 | 5.90 | 3 | 5.31 | 6 | -3 | 9 |

7 | 5.48 | 2 | 5.53 | 7 | -5 | 25 |

8 | 6.02 | 4 | 8.83 | 8 | -4 | 14 |

9 | 10.34 | 10 | 9.48 | 9 | 1 | 1 |

10 | 8.51 | 9 | 14.20 | 10 | 1 | 1 |

Summation of squared differences = 94

CALCULATE Rs

rs = 1 – [6*(summation of squared differences)/n(n2-1))]

rs = 1-[6*(94)/(10)(100-1))]

rs = 1 – [6*(94) / 990)]

rs = 0.43

f) How does the value of rs, compare to that of r?

rs is smaller than r.

g) Using rs, again test the null hypothesis that the population correlation is equal to 0. What do you conclude?

HYPOTHESIS TEST

– If the sample size is large enough (at least 10, but that’s pretty small), you can use the same t statistic we used for the Pearson correlation coefficient.

– If the sample size is 10 or smaller, you would have to use special tables to find the p-value for the Spearman rank correlation.

Hypothesis: Ho: ρ = 0

CALCULATIONS

– The standard deviation of r is approximately

sqrt[(1-rs2)/(n-2)]

– Use that to compute the test statistic

t = (r-0) / sqrt[(1-rs2)/(n-2)]

Another way to write t is this:

t = rs*sqrt[(n-2)/(1-rs2)]

t = (0.43)(sqrt[(10-2)/(1-0.43^2)]

t = (0.43)(sqrt[9.8147466])

t = 1.347

– This t statistic has a t(n-2) degrees of freedom in the usual way.

df = 10-2 = 8

GO TO TABLE A.4

– Remember to multiply p by 2 if it is a two sided test.

p >2X0.10

p>0.20

Using the Spearman rank correlation, I conclude that there is no association between the cholesterol level and triglyceride level.

**Categorised as:** Uncategorized