Practise › Questions › Correlation coefficients: product moment and Spearman
Correlation coefficients: product moment and Spearman questions
Two numbers between −1 and 1, measuring two different things. One asks how close the points are to a straight line. The other only asks whether the orders agree.
6 original questions · 22 marks · the correlation coefficients: product moment and spearman notes · Further Statistics 2
Every question here is written for this library rather than taken from a past paper. Write your answer out before opening the worked one: the answers award marks point by point, and the marks are easier to see when you have something of your own to compare against.
State what the product moment correlation coefficient measures and the range of values it can take.
Worked answer
It measures the strength and direction of the linear association between two variables, and always lies between −1 and 1 inclusive. B1 for the strength and direction of linear association, B1 for the range −1 to 1. Values at the ends mean the points lie exactly on a straight line, falling or rising; zero means no linear association, which is not the same as no relationship.A data set gives Sxx = 40, Sxy = 58 and Syy = 86. Find r and interpret it.
Worked answer
r = 58/√(40 × 86) = 58/√3440 = 58/58.65 = 0.989 to three decimal places. That is very strong positive linear correlation, so the points lie almost exactly on a rising straight line. M1 for the formula, A1 for 0.989, B1 for the interpretation. An interpretation in words is a mark of its own, and a bare number does not earn it.Each x value is coded as u = (x − 20)/5 and each y as v = (y − 100)/10. Explain the effect on r, and on the gradient of the regression line of y on x.
Worked answer
Coding by a shift and a positive scale factor leaves r unchanged, because the scatter is only translated and stretched, so its straightness is untouched. The gradient does change. If the regression of v on u has gradient B, then b = B × (10/5) = 2B, since y varies ten units for every one of v and x five for every one of u. B1 for r unchanged, B1 for the reason, M1 for relating the two gradients, A1 for b = 2B. A negative scale factor on exactly one variable would flip the sign of r.Two coaches rank seven players. Coach A gives 1 to 7 in order; coach B gives 1, 3, 2, 5, 4, 7, 6. Calculate Spearman's rank correlation coefficient.
Worked answer
The differences are 0, −1, 1, −1, 1, −1, 1, so Σd² = 0 + 1 + 1 + 1 + 1 + 1 + 1 = 6. With n = 7, n(n² − 1) = 7 × 48 = 336, so rs = 1 − 36/336 = 1 − 0.1071 = 0.893. M1 for the differences, A1 for Σd² = 6, M1 for the formula, A1 for 0.893. The two rankings agree closely.Six items are ranked, and two of them tie for third place. Explain how the ranks are assigned, and calculate rs if the resulting Σd² is 8.
Worked answer
Tied items share the average of the ranks they would have occupied, so two tying for third and fourth both take rank 3.5, and the next item takes rank 5. With n = 6, n(n² − 1) = 6 × 35 = 210, so rs = 1 − 48/210 = 0.771. B1 for the shared rank of 3.5, M1 for the formula, A1 for 0.771. With ties present the formula is an approximation; the product moment coefficient applied to the ranks is exact.A colony is counted at six equally spaced times. The counts, in order, are 2, 3, 5, 9, 17 and 33, at times 1, 2, 3, 4, 5 and 6. Calculate the product moment correlation coefficient and Spearman's rank correlation coefficient, and explain why they differ so much.
Worked answer
Product moment. With n = 6, Σx = 21, Σy = 69, Σxy = 342, Σx² = 91 and Σy² = 1497.
Sxy = 342 − (21)(69)/6 = 342 − 241.5 = 100.5. Sxx = 91 − 441/6 = 17.5. Syy = 1497 − 4761/6 = 703.5.
r = 100.5/√(17.5 × 703.5) = 100.5/110.96 = 0.906. Set the five sums out before substituting; the method marks are for those, and a single wrong total sinks the whole answer.
Spearman. The counts increase throughout, so ranking them 1 to 6 gives exactly the same order as the times. Every d is zero, so Σd² = 0 and rs = 1 − 0 = 1.
Why they differ. The relationship is a perfect increasing one, which is all that Spearman's coefficient asks about, so it returns its maximum. The product moment coefficient asks whether the points lie on a straight line, and these lie on a curve that steepens sharply, so it falls short of 1. M1 for Sxy, Sxx and Syy, A1 for r = 0.906, M1 for ranking the counts, A1 for the Spearman value of 1, B1 for Spearman needing only a monotonic relationship, B1 for the product moment coefficient measuring straightness.
Spearman is the sensible choice when the relationship is monotonic but curved, or when the data are already ranks. The product moment coefficient is for linear association in genuinely numerical data. A value of r near zero would not even rule out a relationship; the points (−2, 4), (−1, 1), (0, 0), (1, 1), (2, 4) give r = 0 while y is exactly x².
The same practice on paper: the printable workbook for this topic, questions and a worked answer book.
Practise correlation coefficients: product moment and spearman one question at a time
The player marks nothing for you. It shows one question, waits, then shows the worked answer so you can mark yourself, and brings a question back sooner when it went badly.