S3.5 - Regression and correlation
- Syllabus
- 2019
- Topic
- S3.5
- Level
- A2
Spearman's rank correlation coefficient rs measures the strength and direction of a monotonic association between two variables by comparing their ranks. It is useful for ordinal data or when the relationship is monotonic but a linear model for the original measurements is unsuitable.
Rank both variables in a consistent direction, calculate di as one rank minus the other for each pair, square the differences, and sum them. Reversing both ranking directions changes no differences; reversing only one changes the sign of the coefficient.
r_s=1-\frac{6\sum d_i^2}{n(n^2-1)}\qquad\text{when there are no tied ranks}
For five pairs with ranks (1,2,3,4,5) and (1,3,2,5,4), ∑d2=4. Hence rs=1−6(4)/[5(25−1)]=0.8, showing a fairly strong positive monotonic association.
When values are tied, assign average ranks: each tied value receives the average of the rank positions it occupies. Numerical questions involving ties will not be set, but the correct approach is to calculate the product moment correlation coefficient of the two average-rank lists rather than use the no-ties shortcut unchanged.
rs lies between −1 and 1: its sign gives direction and its magnitude gives strength of monotonic association. It uses order, not the sizes of gaps, so it loses quantitative information; it does not prove causation and need not describe a non-monotonic relationship well.
A correlation test asks whether a sample coefficient is extreme enough to provide evidence that the corresponding population correlation is not zero. Select the table by coefficient, sample size n, significance level and test direction.
For Spearman use H0:ρs=0; for product moment correlation use H0:ρ=0. Choose a >0 or <0 alternative for a predicted direction, or =0 when either direction counts. A two-sided claim requires the two-tailed table value.
Calculate rs or r and compare it with the matching critical value. For an upper-tail test reject H0 above the positive critical value; for a two-tailed test reject when the coefficient's absolute value exceeds the critical magnitude.
Suppose n=7, rs=0.679 and the 5% upper-tail Spearman critical value is 0.7143. Since 0.679<0.7143, do not reject H0; there is insufficient evidence of a positive population rank correlation at the 5% level.
Product moment correlation targets linear association in the original values; Spearman targets monotonic association through ranks. Do not interchange their tables.
Choose the direction before inspecting the coefficient. Non-significance does not establish zero correlation, and significance does not establish causation. Conclude using the named variables and tested direction.