Product moment correlation coefficient

Product moment correlation coefficient

Spec 4.3 · Edexcel International A Level Maths: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • The PMCC rr measures the strength and direction of linear correlation, with −1≤r≤1-1\le r\le1.
  • r=SxySxxSyyr=\dfrac{S_{xy}}{\sqrt{S_{xx}S_{yy}}}, with the same sign as SxyS_{xy}.
  • Interpret rr with strength, direction and the variables in context; it is not a percentage.
  • Correlation is not causation; rr only detects linear relationships and is affected by outliers.
  • rr and the regression gradient bb always have the same sign.

What the PMCC measures

The PMCC measures the strength and direction of linear correlation, always between −1-1 and 11.

The product moment correlation coefficient (PMCC), rr, measures the strength and direction of linear correlation between two variables. It always satisfies −1≤r≤1-1\le r\le1.

  • r=1r=1: perfect positive linear correlation.
  • r=−1r=-1: perfect negative linear correlation.
  • r=0r=0 (or close): no linear correlation.

Values close to ±1\pm1 show strong correlation; values near 0 show weak correlation. A value outside −1-1 to 11 must be a calculation error.

12345678910246810xyr = 1r = −1
Perfect positive and perfect negative linear correlation: r=1r=1 and r=−1r=-1.

Which of these cannot be a value of rr?

Calculating r

Use the sums of squares and take one square root of the whole product in the denominator.

Use the sums of squares Sxx=∑x2−(∑x)2nS_{xx}=\sum x^2-\frac{(\sum x)^2}{n}, Syy=∑y2−(∑y)2nS_{yy}=\sum y^2-\frac{(\sum y)^2}{n} and Sxy=∑xy−∑x∑ynS_{xy}=\sum xy-\frac{\sum x\sum y}{n}.

The sign of rr is the sign of SxyS_{xy}.

A calculator in statistics mode can also give rr directly from the data.

  1. 1

    Find the sums

    n, Σx, Σy, Σx², Σy² and Σxy

  2. 2

    Work out Sxx, Syy and Sxy

    using the sum-of-squares formulas

  3. 3

    Substitute into r

    r = Sxy / √(Sxx × Syy)

  4. 4

    Check the sign

    r has the same sign as Sxy, and lies between −1 and 1

Calculating r from data.
  • PMCCr=SxySxxSyyr=\dfrac{S_{xy}}{\sqrt{S_{xx}S_{yy}}}

Worked example

Sxx=40S_{xx}=40, Syy=90S_{yy}=90, Sxy=−48S_{xy}=-48. Find rr.

Sxx=16S_{xx}=16, Syy=25S_{yy}=25, Sxy=10S_{xy}=10. What is rr?

Interpreting r in context

Describe the strength, the direction and the variables in context. rr is not a percentage.

Describe three things: strength, direction and the variables in context.

Example: r=−0.8r=-0.8 for age and value of cars. 'There is strong negative linear correlation between age and value; older cars tend to have lower values.'

rr is not a percentage. It is unchanged by a linear change of units or coding of either variable, such as pounds to euros.

Name both variables and use the word 'tend'.

1234567892468101214161820Age (yr)Value (£000)Regression line
Strong negative linear correlation (illustrative data, r about −0.99): older cars tend to have lower values.

rr close to +1+1

  • Strong positive linear correlation

rr near 00

  • Weak or no linear correlation

rr close to −1-1

  • Strong negative linear correlation

Which comment best interprets r=0.85r=0.85 for hours revised and test score?

Limitations of the PMCC

A strong rr shows association, not causation; rr detects only linear relationships and is affected by outliers and small samples.

  • Correlation is not causation. A strong rr shows an association only. Another variable may affect both: hot weather raises both ice cream sales and sunburn cases.
  • Only linear correlation. Data on a curve, such as y=1000xy=\frac{1000}{x} or a U-shape, can give rr well below 1 or close to 0 even though there is a strong relationship.
  • Outliers. One unusual point can change rr dramatically.
  • Sample size. With very few points, a high rr can occur by chance.

Significance tests for rr are not required.

10203040506070809010020406080100xyy = 1000/x
y=1000xy=\frac{1000}{x} is a strong curved relationship, but not a straight line, so rr is not close to 11 or −1-1.

Ice cream sales and sunburn cases have r=0.9r=0.9. What can you conclude?

Using r with regression

The PMCC shows whether a linear model is sensible; rr and the regression gradient always have the same sign.

The PMCC tells you whether a linear model is sensible.

If ∣r∣|r| is close to 1, a regression line gives reasonable predictions inside the range of the data. If rr is near 0, the regression line is of little use for prediction, but a non-linear relationship may still exist.

If a question gives rr near 0 and a curved pattern, mention that the PMCC cannot detect non-linear relationships.

−4−3−2−11234−224681012xyy = x²
The points lie exactly on y = x², yet r = 0: the PMCC measures only linear correlation, so a regression line would be useless here.
  • Regression gradientb=SxySxxb=\dfrac{S_{xy}}{S_{xx}}
  • Sign of bbsame as the sign of rr

r=−0.7r=-0.7. What is the sign of the regression gradient bb?

Try an exam question

The temperature, xx °C, and the number of hot drinks sold, yy, are recorded on several days. The results give Sxx=25S_{xx}=25, Syy=64S_{yy}=64 and Sxy=−32S_{xy}=-32. (a) Calculate the product moment correlation coefficient. (b) Interpret your value in context.

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Find the value of the product moment correlation coefficient, rr.

1 mark, marked against the mark scheme

Revision notes