Leave lesson

Statistics · Data presentation

1 / 14

Correlation and regression

Bivariate data and scatter diagrams; describing correlation by its direction (positive/negative) and strength; why correlation does not imply causation; and using a given regression line y = a + bx to make and interpret predictions — including why prediction inside the data range (interpolation) is safe but outside it (extrapolation) is not. Interpreting the PMCC is flagged as A-level.

Statistics · Data presentation

Correlation and regression

Bivariate data and scatter diagrams; describing correlation by its direction (positive/negative) and strength; why correlation does not imply causation; and using a given regression line y = a + bx to make and interpret predictions — including why prediction inside the data range (interpolation) is safe but outside it (extrapolation) is not. Interpreting the PMCC is flagged as A-level.

Why it works

So far each value stood alone. Bivariate data comes in pairs (x,y)(x, y) — a temperature and the ice-cream sales that day — and the question becomes whether the two move together. Plot each pair as a point on a scatter diagram and the shape of the cloud tells you.

Correlation describes a linear tendency in that cloud, in two parts:
  • Directionpositive correlation if yy tends to rise as xx rises (points
trend up to the right); negative if yy tends to fall as xx rises.
  • Strengthstrong if the points lie close to a straight line, weak if
they are loosely scattered. If there is no linear pattern, there is no correlation.

Here is a scatter of sales against temperature — a strong positive correlation, with the regression line drawn through it:101520253020406080100Temp (°C)SalesCorrelation is not causation. A correlation between two variables does not mean one causes the other. Ice-cream sales and drownings rise together, but neither causes the other — a third variable, hot weather, drives both. Always ask whether a lurking variable could explain the link.

The regression line. When the points show linear correlation we summarise them with the regression line of yy on xx, written

y=a+bx,y = a + bx,

where xx is the explanatory (independent) variable — the one you control or that comes first — and yy is the response (dependent) variable. The line is the "line of best fit" chosen to minimise the total squared vertical distance from the points (least squares); in AS you are given the equation or read it from a calculator, not asked to derive it.

Reading the equation in context. The two numbers carry meaning:
  • the gradient bb is the change in yy for each 11-unit increase in xx (e.g.
"33 more sales per 11\,^\circC");
  • the intercept aa is the predicted yy when x=0x = 0 — meaningful only if x=0x = 0
is realistic and within the data.

Predicting — interpolation vs extrapolation. To predict, substitute the xx-value:
  • Interpolation — predicting for an xx inside the range of the data. Reliable,
because the line is supported by nearby points.
  • Extrapolation — predicting for an xx outside the data range. Unreliable: you
have no evidence the linear trend continues, so the estimate can be far off.

A-level only — the product moment correlation coefficient (PMCC). The PMCC, rr, puts a number on linear correlation:

1r1.-1 \le r \le 1.

Its sign gives the direction and its size gives the strength: rr near +1+1 is strong positive, near 1-1 strong negative, and near 00 means no linear correlation (there could still be a non-linear relationship). rr has no units. Calculating rr is a Year-2 / A-level skill; at AS you describe correlation in words.