Correlation and regression

Maths: Applications and Interpretation · Statistics and probability. The idea in plain words, the rules to remember, the mistake to avoid and a worked example, written and checked by Mega Lecture.

Test this topic freeAll Maths: Applications and Interpretation topics

Scatter diagram in which y increases with x along a clear curve that gets steeper, not along a straight line.
Scatter diagram in which y increases with x along a clear curve that gets steeper, not along a straight line.

The idea

A scatter diagram shows pairs of values (x, y) as points. If the points lie close to a straight line the two variables have a linear correlation: positive when y rises as x rises, negative when y falls as x rises.

Pearson's r measures how strong the linear relationship is. The regression line of y on x is the line of best fit found by technology, and you use it to predict y from a given x.

Spearman's rs is Pearson's coefficient worked out on the ranks of the data instead of the values. It measures whether y always increases (or always decreases) as x increases, even along a curve, and it is affected less by outliers. Correlation does not prove that one variable causes the other.

In simpler words

A scatter diagram plots pairs of values as points. If they lie near a straight line, there is correlation. Positive means both go up together. Negative means one goes down as the other goes up. Pearson's r measures how strong it is. Spearman's uses ranks instead. Correlation does not prove that one thing causes the other.

An everyday comparison

Correlation without causation is like noticing that ice cream sales and sunburn cases rise together. Ice cream does not cause sunburn; hot sunny weather drives both. The comparison stops working because Pearson's r is a precise number from −1 to 1 that measures only how close the points are to a straight line.

Rules to remember

Common mistake

Students say that a value of r near 0 means there is no relationship. It only means no linear relationship; the points may follow a clear curve, so look at the scatter diagram.

In the exam

Give r from the calculator and describe it in words, for example strong positive linear correlation. Write the regression line y = ax + b with values to 3 significant figures. Substitute x to predict y, then comment whether it is interpolation or extrapolation and how reliable it is. For Spearman's, rank both variables and find rs. Interpret a and b in context. State that correlation does not imply causation.

Worked example

Five students revise for x = 2, 4, 5, 7, 9 hours and score y = 40, 48, 55, 71, 66 marks. Find Spearman's rank correlation coefficient.

  1. Rank x from smallest to largest: 1, 2, 3, 4, 5.
  2. Rank y in the same way: 40 → 1, 48 → 2, 55 → 3, 71 → 5, 66 → 4, giving 1, 2, 3, 5, 4.
  3. Enter the two lists of ranks in the calculator and find r: rs = 0.9.
  4. Check: the rank differences are 0, 0, 0, −1, 1, so Σd2 = 2 and rs = 1 − (6 × 2)/(5 × (52 − 1)) = 1 − 12/120 = 0.9.

Answer: rs = 0.9, a strong positive rank correlation.

Ask about this

Type what you are stuck on. The helper finds the explanation, worked examples and the notes to read, free and instant.

Read the full notes

Keep going

← Measures of central tendency and dispersionProbability: Venn diagrams, tree diagrams and conditional probability →Take a Maths: Applications and Interpretation test