A levels Mathematics · Statistics
Correlation and regression
1Scatter diagrams and correlation
Bivariate data has two variables for each item. A scatter diagram shows the relationship.
Correlation describes how close the points are to a straight line:
- positive: as one variable increases, so does the other;
- negative: as one increases, the other decreases;
- none: no linear pattern.
The explanatory (independent) variable goes on the $x$-axis; the response (dependent) variable goes on the $y$-axis.
Correlation does not imply causation: two variables can be linked because both depend on a third factor. Ice cream sales and sunburn cases rise together because of sunny weather, not because one causes the other.
Check yourself
Why does correlation not prove causation?
Show the answer
A third factor may affect both variables
Hot weather drives both ice cream sales and sunburn.
2The product moment correlation coefficient
The product moment correlation coefficient (PMCC), $r$, measures the strength of linear correlation:
$$-1 \leq r \leq 1$$
- $r = 1$: perfect positive linear correlation;
- $r = -1$: perfect negative linear correlation;
- $r$ near 0: little or no linear correlation.
You calculate $r$ using a calculator's statistics mode.
A value near 0 does not mean there is no relationship: the points could follow a curve.
Check yourself
What does r = −0.95 show?
Show the answer
Strong negative linear correlation
Close to −1.
3The regression line
The least squares regression line of $y$ on $x$ is
$$y = a + bx$$
It minimises the sum of the squares of the vertical distances from the points to the line. Calculators give $a$ and $b$ directly.
Strong positive correlation. The regression line is safe for predictions between 2 and 12 hours, but not beyond.
Interpreting the coefficients:
- $b$ is the change in $y$ for each one-unit increase in $x$;
- $a$ is the value of $y$ when $x = 0$ (only meaningful if $x = 0$ makes sense).
Interpreting
- The regression line of exam mark $y$ on hours revised $x$ is $y = 31.2 + 4.5x$.
- Each extra hour of revision is linked with about 4.5 more marks.
- A student who revised 0 hours would be predicted 31.2 marks.
Check yourself
In y = 12 + 0.8x, what does 0.8 represent?
Show the answer
The increase in y for each unit increase in x
It is the gradient.
4Interpolation and extrapolation
Using the regression line for predictions:
- interpolation: predicting within the range of the data is usually reliable, especially when $r$ is close to $\pm 1$;
- extrapolation: predicting outside the range is unreliable, because the relationship may not continue.
Only use the line of $y$ on $x$ to predict $y$ from $x$.
Reliability
- Data on hours revised ranges from 2 to 12 hours; $r = 0.91$.
- Predicting for 8 hours: $31.2 + 36 = 67.2$, reliable (interpolation, strong correlation).
- Predicting for 25 hours: $143.7$ marks, impossible if the paper is out of 100. This is extrapolation.
Check yourself
Why is extrapolation unreliable?
Show the answer
The relationship may not continue outside the data range
The 25-hour prediction exceeds the maximum mark.
5Exponential models and logs
Some data fit non-linear models. Taking logs can turn them into straight lines:
- $y = ab^x$ gives $\log y = \log a + x\log b$ (plot $\log y$ against $x$);
- $y = ax^n$ gives $\log y = \log a + n\log x$ (plot $\log y$ against $\log x$).
Recovering a model
- A regression line of $\log y$ on $x$ is $\log y = 0.6 + 0.15x$.
- $\log a = 0.6$, so $a = 10^{0.6} \approx 3.98$.
- $\log b = 0.15$, so $b = 10^{0.15} \approx 1.41$.
- Model: $y = 3.98 \times 1.41^x$.
Check yourself
If log y against x is linear, which model fits?
Show the answer
y = abˣ
log y = log a + x log b.
6Testing for correlation
You can test whether there is evidence of correlation in the population, using the population coefficient $\rho$.
- $H_0: \rho = 0$; $H_1: \rho > 0$ (or $\rho < 0$, one-tailed) or $\rho \neq 0$ (two-tailed).
- Compare the sample value $r$ with the critical value from tables for the sample size $n$ and significance level.
- If $|r|$ is beyond the critical value, reject $H_0$.
A one-tailed test
- For $n = 10$, $r = 0.62$. Test at 5% for positive correlation.
- $H_0: \rho = 0$, $H_1: \rho > 0$. Critical value (one-tailed, 5%, $n = 10$): 0.5494.
- $0.62 > 0.5494$, so reject $H_0$: there is evidence of positive correlation.
The conclusion should be stated in context and not too definitely: "evidence suggests", not "proves".
Check yourself
In a test for positive correlation, what is H₁?
Show the answer
ρ > 0
Hypotheses are about the population, ρ.
Now test yourself
This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.
Practise in Impera