S1 4.3 - Measuring correlation

S1 4.3 - Measuring correlation

Calculate the product moment correlation coefficient from paired-data summaries and interpret a linear relationship's strength and direction in context. Recognise what correlation can establish and where its evidence stops.

Calculating the product moment coefficient

Changing a height measurement from centimetres to metres changes a regression gradient. Should it change how closely the points follow a straight line? Correlation measures that closeness without depending on the choice of positive measurement units.

Product moment correlation coefficient

The product moment correlation coefficient, often abbreviated PMCC, is a number rr measuring the direction and strength of a linear association between two variables. It is dimensionless and lies between −1-1 and 11, inclusive.

The centred summaries used for regression also supply the coefficient.

Product moment correlation

For paired observations,

r=SxySxxSyy,r=\frac{S_{xy}}{\sqrt{S_{xx}S_{yy}}},

where

Sxx=∑x2−(∑x)2n,Syy=∑y2−(∑y)2n,Sxy=∑xy−(∑x)(∑y)n.\begin{aligned} S_{xx}&=\sum x^2-\frac{(\sum x)^2}{n},\\ S_{yy}&=\sum y^2-\frac{(\sum y)^2}{n},\\ S_{xy}&=\sum xy-\frac{(\sum x)(\sum y)}{n}. \end{aligned}

These results are printed on page 15 of the S1 formula booklet. Both variables must vary: if either centred sum of squares is zero, r is undefined by this formula. A derivation or a significance test is not required in S1.

The numerator records whether paired deviations from the two means tend to have the same or opposite signs. The positive denominator scales this by the variability of both variables. Do not use uncentred sums of squares or round the centred sums early.

Worked example 1

Five paired observations have ∑x=15\sum x=15, ∑y=20\sum y=20, ∑x2=55\sum x^2=55, ∑y2=90\sum y^2=90, ∑xy=69\sum xy=69. Find r.

Plan. Calculate all three centred sums, then substitute into the PMCC formula.

Sxx=55−152/5=10,Syy=90−202/5=10,S_{xx}=55-15^2/5=10,\qquad S_{yy}=90-20^2/5=10, Sxy=69−15(20)/5=9,r=910(10)=0.9.S_{xy}=69-15(20)/5=9, \qquad r=\frac9{\sqrt{10(10)}}=0.9.

Answer. r=0.9r=0.9, indicating a strong positive linear association.

Check. These are the summaries of (1,2),(2,3),(3,5),(4,4),(5,6)(1,2),(2,3),(3,5),(4,4),(5,6). The deviations from (3,4)(3,4) give products 4,1,0,0,44,1,0,0,4, summing independently to 99; each squared-deviation sum is 1010. The result is within [−1,1][-1,1].

Change only the response scale by reflecting every y-value: set z=10−yz=10-y. Distances from the mean are unchanged in size but reversed in sign.

Worked example 2

For the same x-values, the reflected data have ∑z=30\sum z=30, ∑z2=190\sum z^2=190 and ∑xz=81\sum xz=81. Find the PMCC between x and z.

Plan. Recalculate the response and cross-product summaries using z rather than y.

Szz=190−302/5=10,Sxz=81−15(30)/5=−9,S_{zz}=190-30^2/5=10, \qquad S_{xz}=81-15(30)/5=-9, rxz=−910(10)=−0.9.r_{xz}=\frac{-9}{\sqrt{10(10)}}=-0.9.

Answer. −0.9-0.9. The linear association has the same strength and the opposite direction.

Check. Since z−zˉ=−(y−yˉ)z-\bar z=-(y-\bar y), every deviation product reverses sign, while every squared deviation is unchanged. Hence the original rr must change from 0.90.9 to −0.9-0.9.

Adding a constant to either variable does not change its deviations from its own mean. Multiplying by a positive constant scales the numerator and denominator equally, so r stays the same. A negative multiplier for exactly one variable reverses r's sign; negative multipliers for both leave it unchanged. Swapping x and y leaves r unchanged too, unlike swapping the regression direction.

For example, coding u=(x−100)/5u=(x-100)/5, v=2y+7v=2y+7 preserves r. If centred summaries are needed, the same deviation reasoning gives Suu=Sxx/25S_{uu}=S_{xx}/25, Svv=4SyyS_{vv}=4S_{yy}, Suv=2Sxy/5S_{uv}=2S_{xy}/5. A zero multiplier makes one variable constant, so correlation then becomes undefined.

Interpreting strength and direction

The sign describes direction; the magnitude describes closeness to a straight line.

When r>0r>0, larger values of one variable tend to accompany larger values of the other. When r<0r<0, larger values of one tend to accompany smaller values of the other. Values with ∣r∣|r| close to 11 indicate a strong linear association; values close to zero indicate a weak linear association. There is no universal set of numerical cut-offs separating words such as moderate and strong.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account