Bivariate data are pairs of values $(x, y)$ measured on the same items โ the height and mass of each student, or the temperature and ice-cream sales on each day. A scatter diagram shows whether the two variables are related.
| Pattern | Description | Interpretation |
|---|---|---|
| Points close to a line sloping upwards | Strong positive correlation | As $x$ increases, $y$ tends to increase |
| Points loosely around a line sloping downwards | Weak negative correlation | As $x$ increases, $y$ tends to decrease, but not reliably |
| No pattern | No (or zero) correlation | No linear relationship between the variables |
The response (dependent) variable $y$ goes on the vertical axis.
The diagram shows the hours of revision $x$ and test score $y$ (%) for $12$ students, with the regression line of $y$ on $x$. Describe the relationship.
| Part | Meaning | In Worked Example 1 |
|---|---|---|
| Gradient $b$ | The change in $y$ for each increase of $1$ in $x$ | Each extra hour of revision is associated with about $4.16$ more marks |
| Intercept $a$ | The value of $y$ when $x = 0$ | A student who did no revision would score about $12.7\%$ |
Extrapolation: predicting outside the range of the data โ unreliable, because the relationship may not continue
Use $y = 12.7 + 4.16x$ to estimate the score of a student who revised for (a) $6$ hours, (b) $25$ hours. Comment on the reliability of each.
Over a year, the monthly number of ice creams sold at a beach and the monthly number of sunburn cases at a clinic show strong positive correlation. A newspaper claims ice cream causes sunburn. Comment.
The diagram shows height $x$ cm and mass $y$ kg for $10$ children (circles) and $10$ adults (squares). Comment on the correlation.
A data set has $Q_1 = 24$ and $Q_3 = 36$. Its smallest value is $3$ and its largest is $58$. Are either of these outliers?
A data set has mean $50$ and standard deviation $6$. Decide whether $65$ and $39$ are outliers using (a) $\bar{x} \pm 2\sigma$, (b) $\bar{x} \pm 3\sigma$.
Real data sets are messy. Cleaning means checking the data before analysing them and dealing with:
- Missing values โ blanks or codes such as "n/a". Usually exclude that item from calculations, and say so.
- Errors โ impossible values (a negative mass, a percentage over $100$) or obvious typing mistakes.
- Inconsistent units or formats โ some heights in metres, others in centimetres.
- Outliers โ investigate; remove only if they are errors.
A survey of sixth-form students records height (cm): $172,\; 165,\; 1.68,\; 181,\; \text{n/a},\; 159,\; 1680,\; 176$. Clean the data and find the mean height.
Correlation
Strength and direction of a linear relationship.
Axes
Explanatory $x$ horizontal; response $y$ vertical.
Gradient $b$
Change in $y$ per unit increase in $x$.
Intercept $a$
$y$ when $x = 0$ โ beware if outside the data.
Interpolation
Within the data range โ reliable.
Extrapolation
Outside the data range โ unreliable.
Causation
Correlation alone never proves it.
Outlier rules
$Q_1 - 1.5\,$IQR, $Q_3 + 1.5\,$IQR; or $\bar{x} \pm 2\sigma$ / $3\sigma$.
Cleaning
Missing, errors, units, outliers.
State the type of correlation you would expect between (a) the age of a car and its value; (b) shoe size and score in a maths test, for adults; (c) height and arm span.
โถ Show solution
(a) Negative โ older cars tend to be worth less.
(b) None โ no reason for a relationship.
(c) Positive โ taller people tend to have longer arm spans.
For temperatures $x\,^\circ$C between $8$ and $28$, a cafรฉ finds the regression line of daily cold-drink sales $y$ on $x$ is $y = 14 + 6.5x$. (a) Interpret $6.5$. (b) Estimate sales when $x = 20$. (c) Comment on using the line when $x = 40$.
โถ Show solution
(a) For each $1\,^\circ$C rise in temperature, about $6.5$ more cold drinks are sold per day.
(b) $14 + 6.5(20) = 144$ drinks.
(c) $40\,^\circ$C is outside the range of the data ($8$ to $28$), so this would be extrapolation and the prediction ($274$) would be unreliable.
Data for many towns show strong positive correlation between the number of doctors and the number of deaths each year. Someone concludes that doctors cause deaths. Explain the flaw.
โถ Show solution
Correlation does not imply causation. Larger towns have both more doctors and more deaths simply because they have more people: population size is a confounding variable.
A data set has $Q_1 = 15$ and $Q_3 = 27$. Using the $1.5 \times \text{IQR}$ rule, decide whether the values $2$ and $47$ are outliers.
โถ Show solution
IQR $= 12$, $1.5 \times 12 = 18$. Fences: $15 - 18 = -3$ and $27 + 18 = 45$.
$2 > -3$, so $2$ is not an outlier. $47 > 45$, so $47$ is an outlier.
The heights of a group of adults have mean $170$ cm and standard deviation $8$ cm. An outlier is defined as more than $3$ standard deviations from the mean. Are $150$ cm and $198$ cm outliers?
โถ Show solution
Limits: $170 \pm 24$, i.e. $146$ to $194$.
$150$ is within the limits โ not an outlier. $198 > 194$ โ an outlier.
For $10$ values, $\sum x = 250$ and $\sum x^2 = 6390$. The largest value is $33$. Is it an outlier using the rule "more than $2$ standard deviations from the mean"?
โถ Show solution
$\bar{x} = 25$; $\sigma^2 = 639 - 625 = 14$, so $\sigma = 3.742$.
Upper limit: $25 + 2(3.742) = 32.48$.
$33 > 32.48$, so $33$ is an outlier (only just).
Daily rainfall (mm) at a weather station for a week is recorded as $3.2,\; 0,\; -1.5,\; 12.4,\; \text{(blank)},\; 0.8,\; 124$. Identify the problems and suggest how to deal with each.
โถ Show solution
$-1.5$: rainfall cannot be negative โ an error; remove it (or check the original record).
Blank: a missing value โ exclude it from calculations and note this.
$124$: far larger than the rest โ possibly $12.4$ entered wrongly, or a genuine extreme storm. Check the source before deciding; do not simply delete a value that could be real.
A scientist records the amount of fertiliser $x$ g given to plants and their final height $y$ cm. (a) Which is the explanatory variable? (b) Explain why the scientist should be wary of predicting the height for a fertiliser amount twice as large as any used in the experiment.
โถ Show solution
(a) The amount of fertiliser $x$, which the scientist controls.
(b) This is extrapolation. The linear relationship may not continue โ for example, too much fertiliser could damage the plants.
The values $4, 5, 6, 6, 7, 8, 30$ are recorded. Find the mean and standard deviation (a) with and (b) without the value $30$. Comment.
โถ Show solution
(a) $\sum x = 66$, $\sum x^2 = 1126$, $n = 7$: $\bar{x} = 9.43$, $\sigma^2 = \tfrac{1126}{7} - 9.43^2 = 71.96$, $\sigma = 8.48$.
(b) $\sum x = 36$, $\sum x^2 = 226$, $n = 6$: $\bar{x} = 6$, $\sigma^2 = \tfrac{226}{6} - 36 = 1.667$, $\sigma = 1.29$.
The single value $30$ raises the mean by over $3$ and multiplies the standard deviation by more than $6$. The mean and standard deviation are very sensitive to outliers.
For $30$ summer days at a seaside kiosk, the daily maximum temperature $x\,^\circ$C ranged from $12$ to $26$. The regression line of ice creams sold, $y$, on $x$ is $y = -45 + 9.2x$.
(a) Interpret the gradient. (b) Estimate the sales on a day with maximum temperature $20\,^\circ$C. (c) Use the line to estimate sales at $2\,^\circ$C, and explain why the answer is not sensible. (d) On one day with $x = 24$, only $12$ ice creams were sold. Compare this with the line, suggest a possible reason, and say whether the point should be removed. (e) The owner says "hot weather causes people to buy ice creams". Do the data prove this?
โถ Show solution
(a) Each $1\,^\circ$C increase in maximum temperature is associated with about $9.2$ more ice creams sold.
(b) $-45 + 9.2(20) = 139$ ice creams.
(c) $-45 + 9.2(2) = -26.6$: negative sales are impossible. $2\,^\circ$C is far outside the data range, so this is extrapolation.
(d) The line predicts $-45 + 9.2(24) = 175.8$, so $12$ is far below โ a likely outlier. Perhaps the kiosk closed early, or there was heavy rain despite the warmth. If it is a genuine but unusual day, it should not simply be deleted; if it was caused by something unrelated to temperature (such as the kiosk being shut), there is a case for excluding it, with an explanation.
(e) No. The data show a strong association, and the claim is plausible, but correlation alone does not prove causation. Other factors that rise with temperature โ school holidays, numbers of tourists, weekends โ could also explain the sales.