In Year 1 you described correlation by eye from a scatter diagram (see Correlation and Outliers). In Year 2 you attach a number to it: the product moment correlation coefficient, written $r$. You find it with the statistics mode of your calculator โ you are not expected to compute it by hand.
| Value of $r$ | Description | Scatter diagram |
|---|---|---|
| $r = 1$ | Perfect positive linear correlation | Points exactly on a line with positive gradient |
| $0.7 \lesssim r < 1$ | Strong positive correlation | Points close to an upward line |
| $0.3 \lesssim r \lesssim 0.7$ | Moderate / weak positive correlation | An upward trend with a lot of scatter |
| $r \approx 0$ | No linear correlation | No straight-line pattern (there may be a curved one) |
| $-1 < r \lesssim -0.7$ | Strong negative correlation | Points close to a downward line |
| $r = -1$ | Perfect negative linear correlation | Points exactly on a line with negative gradient |
The least squares regression line of $y$ on $x$ is the straight line that makes the sum of the squared vertical distances from the points to the line as small as possible. Your calculator gives the values of $a$ and $b$ directly.
$b$ = gradient · $a$ = $y$-intercept · the line always passes through $(\bar{x},\,\bar{y})$
| Coefficient | Meaning in context | Typical wording |
|---|---|---|
| $b$ | The change in $y$ for each increase of $1$ unit in $x$ | "For each extra hour of revision the score increases by about $3.8$ marks." |
| $a$ | The value of $y$ when $x = 0$ | "A student who does no revision is predicted to score about $31$ marks." |
Eight students recorded the number of hours of revision, $x$, and their test score out of $100$, $y$.
| $x$ | 2 | 4 | 5 | 7 | 8 | 10 | 11 | 13 |
|---|---|---|---|---|---|---|---|---|
| $y$ | 38 | 45 | 52 | 55 | 63 | 66 | 74 | 80 |
Find $r$ and the equation of the regression line of $y$ on $x$, and interpret the coefficients.
Extrapolation means predicting outside the range of the data. It is unreliable, because there is no evidence that the linear pattern continues.
Using $y = 30.69 + 3.791x$ from Worked Example 1, estimate the score of a student who revises for (a) $9$ hours, (b) $20$ hours, and comment on the reliability of each estimate.
For $12$ towns, the regression line of the mean daily heating cost, $c$ pence, on the mean outdoor temperature, $T$ ยฐC, is $c = 248 - 9.6T$, for $2 \leqslant T \leqslant 14$. Interpret the gradient, and explain why the model should not be used to estimate the cost when $T = 30$.
Many relationships are not linear โ population growth, radioactive decay, depreciation. The trick is to change the variable so the relationship becomes linear, and then use a regression line. This links directly to the logarithm work in DfE content area F.
Plot $\log y$ against $x$: gradient $= \log b$, intercept $= \log k$
The number of bacteria, $N$, in a culture was counted every hour.
| $t$ (hours) | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| $N$ | 52 | 79 | 118 | 180 | 265 | 401 |
| $\log_{10} N$ | 1.7160 | 1.8976 | 2.0719 | 2.2553 | 2.4232 | 2.6031 |
Find a model of the form $N = kb^t$.
The temperature excess, $\theta$ ยฐC, of a cooling liquid satisfies $\ln\theta = 2.1 - 0.35t$, where $t$ is in minutes. Write the model in the form $\theta = Ab^t$.
Plot $\log y$ against $\log x$: gradient $= n$, intercept $= \log a$
| Model | Plot | Gradient | Intercept |
|---|---|---|---|
| $y = kb^x$ | $\log y$ against $x$ | $\log b$ | $\log k$ |
| $y = ax^n$ | $\log y$ against $\log x$ | $n$ | $\log a$ |
The period, $T$ seconds, of a pendulum of length $L$ cm was measured.
| $L$ | 10 | 20 | 40 | 60 | 80 | 100 |
|---|---|---|---|---|---|---|
| $T$ | 0.64 | 0.89 | 1.27 | 1.55 | 1.80 | 2.01 |
Show that a model $T = aL^n$ is appropriate and find $a$ and $n$.
A line of best fit for $\log_{10} y$ against $\log_{10} x$ has gradient $1.6$ and passes through $(0,\,0.48)$. Find $y$ in the form $ax^n$ and estimate $y$ when $x = 5$.
PMCC $r$
$-1 \leqslant r \leqslant 1$; measures linear association only.
Regression line
$y = a + bx$ predicts $y$ from $x$; passes through $(\bar{x},\bar{y})$.
Gradient $b$
Change in $y$ per unit increase in $x$.
Intercept $a$
Value of $y$ when $x = 0$ โ may be meaningless.
Interpolation
Within the data range: reliable if $r$ is strong.
Extrapolation
Outside the data range: unreliable.
$y = kb^x$
$\log y$ vs $x$; $k = 10^{\text{intercept}}$, $b = 10^{\text{gradient}}$.
$y = ax^n$
$\log y$ vs $\log x$; $n$ = gradient, $a = 10^{\text{intercept}}$.
Causation
Correlation alone never proves cause and effect.
Ten questions, from routine to exam-style. Work each one through before opening the solution.
For $20$ households, the correlation coefficient between outdoor temperature and gas used is $r = -0.87$. Describe the correlation and interpret it in context.
โถ Show solution
Strong negative linear correlation.
Households tend to use less gas on warmer days. (This is an association; the coefficient alone does not prove cause.)
The regression line of daily ice-cream sales, $s$, on maximum temperature, $t$ ยฐC, is $s = 45 + 12.5t$. Interpret the values $12.5$ and $45$.
โถ Show solution
$12.5$: for each $1$ ยฐC rise in maximum temperature, about $12.5$ more ice creams are sold per day.
$45$: on a day with maximum temperature $0$ ยฐC the model predicts $45$ sales โ but $0$ ยฐC is probably outside the data, so this may not be reliable.
The data used in Question 2 had $10 \leqslant t \leqslant 28$. Estimate the sales when $t = 20$ and when $t = 35$, commenting on the reliability of each.
โถ Show solution
$t = 20$: $s = 45 + 250 = 295$. Interpolation โ reliable if the correlation is strong.
$t = 35$: $s = 45 + 437.5 = 482.5$, about $483$. Extrapolation โ unreliable; e.g. the shop may sell out, or people may avoid extreme heat.
The regression line of $\log_{10} y$ on $x$ is $\log_{10} y = 0.6 + 0.2x$. Express $y$ in the form $kb^x$.
โถ Show solution
$y = 10^{0.6 + 0.2x} = 10^{0.6} \times \left(10^{0.2}\right)^x$
$k = 10^{0.6} = 3.98$, $b = 10^{0.2} = 1.58$ (3 s.f.)
$y = 3.98 \times 1.58^{x}$
The regression line of $\log_{10} y$ on $\log_{10} x$ is $\log_{10} y = 0.48 + 1.6\log_{10} x$. Find $a$ and $n$ such that $y = ax^n$.
โถ Show solution
$\log_{10} y = \log_{10}\left(10^{0.48}\right) + \log_{10}\left(x^{1.6}\right) = \log_{10}\left(10^{0.48}x^{1.6}\right)$
$a = 10^{0.48} = 3.02$ and $n = 1.6$.
A population of a rare plant is modelled by $\ln P = 4.2 - 0.08t$, where $t$ is in years. (a) Write the model as $P = Ab^t$. (b) Estimate $P$ when $t = 10$.
โถ Show solution
(a) $P = \mathrm{e}^{4.2}\left(\mathrm{e}^{-0.08}\right)^t = 66.7 \times 0.923^{t}$
(b) $P = \mathrm{e}^{4.2 - 0.8} = \mathrm{e}^{3.4} = 29.96$, so about $30$ plants.
Explain why, if $y = kb^x$, a graph of $\log y$ against $x$ is a straight line. State what graph you would plot to test whether $y = ax^n$.
โถ Show solution
Taking logs: $\log y = \log k + \log\left(b^x\right) = \log k + x\log b$.
This has the form $Y = c + mx$ with $Y = \log y$, constant intercept $c = \log k$ and constant gradient $m = \log b$, so it is a straight line.
For $y = ax^n$, $\log y = \log a + n\log x$, so plot $\log y$ against $\log x$ and look for a straight line.
A cafรฉ records the hours of sunshine, $x$, and the number of cold drinks sold (in tens), $y$, on six days.
| $x$ | 3 | 5 | 6 | 8 | 9 | 11 |
|---|---|---|---|---|---|---|
| $y$ | 14 | 19 | 21 | 26 | 27 | 33 |
(a) Find $r$. (b) Find the regression line of $y$ on $x$. (c) Estimate $y$ when $x = 10$.
โถ Show solution
(a) Calculator: $r = 0.997$ โ very strong positive correlation.
(b) $a = 7.17$, $b = 2.31$, so $y = 7.17 + 2.31x$.
Check: $\bar{x} = 7$, $\bar{y} = 23.33$, and $7.167 + 2.3095 \times 7 = 23.33$ โ
(c) $y = 7.167 + 2.3095 \times 10 = 30.26$, i.e. about $303$ drinks. Interpolation, with $r$ close to $1$, so reliable.
A graph of $\log_{10} y$ against $x$ is a straight line passing through $(0,\,1.25)$ and $(8,\,2.85)$. Find $y$ in the form $kb^x$.
โถ Show solution
Gradient $= \dfrac{2.85 - 1.25}{8 - 0} = 0.2$; intercept $= 1.25$.
$\log_{10} y = 1.25 + 0.2x$
$k = 10^{1.25} = 17.8$, $b = 10^{0.2} = 1.58$, so $y = 17.8 \times 1.58^{x}$.
The value, ยฃ$V$, of a model of car is recorded for cars aged $t$ years, $1 \leqslant t \leqslant 8$. The regression line of $\log_{10} V$ on $t$ is $\log_{10} V = 4.32 - 0.065t$, and the correlation coefficient between $\log_{10} V$ and $t$ is $-0.993$.
(a) Explain what the value $-0.993$ suggests about a model $V = kb^t$. (b) Find $k$ and $b$. (c) Interpret $k$ and $b$ in context. (d) Estimate the value of a $5$-year-old car. (e) Comment on using the model for a $20$-year-old car.
โถ Show solution
(a) $\log_{10} V$ and $t$ have very strong negative linear correlation, so $\log_{10} V$ is close to linear in $t$ โ an exponential model $V = kb^t$ is appropriate.
(b) $k = 10^{4.32} = 20\,900$ (3 s.f.), $b = 10^{-0.065} = 0.861$ (3 s.f.).
(c) $k$: the model's value of a new car ($t = 0$) is about ยฃ$20\,900$ โ slightly outside the data, so approximate. $b$: each year the car keeps $86.1\%$ of its value, i.e. it loses about $13.9\%$ per year.
(d) $\log_{10} V = 4.32 - 0.325 = 3.995$, so $V = 10^{3.995} = 9886$, about ยฃ$9900$.
(e) $t = 20$ is well outside $1 \leqslant t \leqslant 8$: extrapolation. Older cars may hold their value (or become worthless/classic), so the estimate of about ยฃ$1050$ is unreliable.