Leave lesson

Statistics · Data presentation

1 / 10

Measuring correlation (the PMCC)

The product moment correlation coefficient r as a number between −1 and 1 measuring linear correlation — computing it from the summary statistics S_xy, S_xx, S_yy, interpreting it in context, and why coding leaves it unchanged.

Statistics · Data presentation

Measuring correlation (the PMCC)

The product moment correlation coefficient r as a number between −1 and 1 measuring linear correlation — computing it from the summary statistics S_xy, S_xx, S_yy, interpreting it in context, and why coding leaves it unchanged.

Why it works

A scatter diagram lets you describe correlation — positive or negative, strong or weak — but the product moment correlation coefficient (PMCC), written rr, puts a number on it. It always lies in 1r1,-1 \le r \le 1, where r=1r = 1 is perfect positive linear correlation (all points exactly on a rising line), r=1r = -1 is perfect negative, and r=0r = 0 is no linear correlation at all.123456782468101214xyYou compute rr from three summary statistics: r=SxySxxSyy,r = \frac{S_{xy}}{\sqrt{S_{xx}\,S_{yy}}}, where, for nn data pairs, Sxy=xyxyn,Sxx=x2(x)2n,Syy=y2(y)2n.S_{xy} = \sum xy - \frac{\sum x \sum y}{n}, \quad S_{xx} = \sum x^2 - \frac{(\sum x)^2}{n}, \quad S_{yy} = \sum y^2 - \frac{(\sum y)^2}{n}. SxxS_{xx} and SyyS_{yy} are never negative (they measure spread), so the sign of rr comes entirely from SxyS_{xy}. In an exam you are usually handed x\sum x, y\sum y, xy\sum xy, x2\sum x^2, y2\sum y^2 and nn, and the work is to assemble these three quantities and divide.

Two things worth knowing:
  • Interpret in context. A value like r=0.93r = 0.93 isn't just "strong positive" — say
what it means for the two variables ("strong positive correlation between hours of study and exam mark").
  • Coding doesn't change rr. If you simplify the numbers first by coding, e.g.
p=x10010p = \frac{x - 100}{10}, the correlation between pp and yy is exactly the same as between xx and yy. A linear scaling stretches the axes but doesn't change how tightly the points hug a line, so rr is unaffected.

Remember rr measures linear correlation only: a perfect parabola can have rr near 00 despite an exact relationship — so a small rr means "no straight-line trend", not "no relationship".