Product moment and Spearman's rank correlation
Studying this course? Keep your progress in one place.
Key facts
- The product moment correlation coefficient measures linear correlation, .
- It needs a roughly elliptical scatter (bivariate normal) with no clear curve or outlier.
- Coding does not change the size of ; it changes sign only if exactly one multiplier is negative.
- Spearman's rank correlation coefficient measures monotonic association from ranks.
- Tied values share the mean rank; use Spearman for ranks, curved monotonic data or outliers.
The product moment correlation coefficient
Find , and from summary statistics, then .
The product moment correlation coefficient measures the strength of linear correlation, with .
Values near show strong correlation and values near show little.
- PMCC
Worked example
, and . Find and describe the correlation.
- 1
.
- 2
.
- 3
.
Which value of shows the strongest linear correlation?
Conditions and coding
The PMCC suits an elliptical scatter; coding leaves the size of unchanged.
The PMCC needs data from a bivariate normal distribution: the scatter should look roughly elliptical, with no clear curve and no outlier.
Coding is a linear change such as , . It never changes the size of . If and have the same sign, is unchanged; if exactly one is negative, changes sign.
Example: between and becomes between and .
Multipliers of the same sign
- r unchanged
- e.g. 3x + 1 and 2y − 5
Multipliers of opposite signs
- r changes sign, same size
- e.g. 3x + 1 and 5 − 4y
between and . What is between and ?
Spearman's coefficient
It measures how well a monotonic function describes the link between two variables, using ranks.
Spearman's rank correlation coefficient measures how well the relationship can be described by a monotonic function (always increasing or always decreasing).
Use it for rank data, for data that are not bivariate normal, for a monotonic but non-linear relationship, or when outliers are present. Rank each variable, find the rank difference for each pair, then use the formula.
- Spearman
Worked example
and . Find .
- 1
.
- 2
.
- 3
.
Which situation calls for Spearman's coefficient rather than the PMCC?
Ties in ranks
Tied values each get the mean of the ranks they would have occupied.
When values are equal, give each the mean rank of the places they occupy. Two scores sharing 3rd and 4th place both get rank , and the next value is rank .
The formula for assumes no tied ranks, so with ties it is an approximation (the exact value is the PMCC of the ranks). You may enter the ranks into a calculator instead.
- 1
Order the values
smallest first
- 2
Share the ranks
mean of the places occupied
- 3
Carry on
the next value skips the used places
Worked example
Mathematics scores have physics ranks . Find .
- 1
Ordered: . The two 61s share ranks 3 and 4, so each gets .
- 2
Maths ranks in the original order: .
- 3
Differences : , so .
- 4
: , so .
Three values tie for 2nd, 3rd and 4th place. What rank does each get?
Choosing and interpreting
Use the PMCC for a linear scatter of measured values, and Spearman's for ranks, curves or outliers.
Use the PMCC when the data are measured and the scatter is roughly elliptical (linear association).
Use Spearman's when the data are ranks, when the relationship is monotonic but not linear, or when an outlier is present. If is much larger than , the relationship may be curved or contain an extreme value.
Interpret in context: means students who score highly in mathematics tend to score highly in physics. Do not claim cause.
- 1
Look at the data
measured values or ranks?
- 2
Ranks only
use Spearman's coefficient
- 3
Measured values
draw the scatter diagram
- 4
Roughly elliptical, no outlier
use the PMCC
- 5
Curved but monotonic, or outliers
use Spearman's coefficient
A scatter diagram shows a clear upward curve with no outliers. Which coefficient suits it?
Try an exam question
Two judges rank five entries in a competition. Judge A ranks them and judge B ranks the same entries . Calculate Spearman's rank correlation coefficient.
[4 marks]
- [1]Differences : .
- [1].
- [1].
- [1].
That's the notes covered.
Carry on to the next subtopic.
Try a question
Calculate the product moment correlation coefficient between and .
1 mark, marked against the mark scheme
Calculate the product moment correlation coefficient between and .
1 mark, marked against the mark scheme