Measuring Correlation
A single number, from -1 to 1, that says how closely two variables follow a straight line.
The product moment correlation coefficient
The product moment correlation coefficient (PMCC), denoted $r$, is a single number that measures the strength and direction of linear correlation between two variables. It always satisfies $-1\le r\le1$.
- $r=1$: perfect positive linear correlation — every point lies exactly on a line sloping upward.
- $r=-1$: perfect negative linear correlation — every point lies exactly on a line sloping downward.
- The closer $r$ is to $-1$ or $1$, the stronger the correlation.
- $r=0$, or close to $0$, means no linear correlation — though a strong non-linear relationship could still be present.
A scatter diagram can show an unmistakable curved pattern — points tracing a perfect parabola, say — and still have $r$ close to $0$. The PMCC only ever asks "how close to a straight line", never "is there a relationship at all". This is exactly why the coding from the previous lesson exists: turning a curved relationship into a linear one first lets $r$ actually detect it.
Calculating r
The PMCC has a formula built from sums of squares and cross-products, but in practice you almost never compute it from that formula directly — scientific and statistical calculators compute $r$ straight from a list of paired $(x,y)$ data, the same way they compute a regression line.
Enter the bivariate data into your calculator's statistics mode (the same mode used for the regression line), and read $r$ directly from its output — this is the expected method in the exam, and no working is required beyond stating the value.
Worked example
| Day | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|
| $w$ | 4 | 4 | 8 | 7 | 12 | 12 | 3 | 4 | 7 | 10 |
| $g$ | 13 | 12 | 19 | 23 | 33 | 37 | 10 | n/a | n/a | 23 |
a — State the meaning of n/a in the table
b — Calculate r for the remaining 8 days, and comment on the suitability of a linear regression model
Never silently substitute a missing value with $0$ or an average — incomplete pairs are removed from the calculation entirely, and any comment about a "day" always refers to the original numbering, even after some days have been dropped.
Check yourself
A sample of 12 paired observations gives $r=-0.12$. Describe, in context, what this value suggests about the linear correlation between the two variables — and explain why it would be wrong to conclude there is "no relationship" between them.