Correlation and regression

S1 Topic 4, spec point by spec point (Correlation and regression). Each spec point has the method, worked examples written the way the mark scheme wants them, how the marks go and the mistakes that cost the most marks.

Spec4.1Scatter diagrams and the least squares regression line

Draw and interpret scatter diagrams, and calculate the equation of a linear regression line by least squares.

The summary statistics

\[S_{xx} = \sum x^2 - \frac{(\sum x)^2}{n} \qquad S_{yy} = \sum y^2 - \frac{(\sum y)^2}{n} \qquad S_{xy} = \sum xy - \frac{\sum x\sum y}{n}\]

The regression line of \(y\) on \(x\)

\[y = a + bx \qquad b = \frac{S_{xy}}{S_{xx}} \qquad a = \bar{y} - b\bar{x}\]

Why "least squares": it is the line that makes the sum of the squared vertical distances from the points to the line as small as possible. It always passes through \((\bar{x}, \bar{y})\).

Coded data

If the line is found for coded variables, substitute the codes back in and rearrange. E.g. with \(s = \frac{y}{1000}\) and \(v = \frac{x + 50}{200}\), replace \(s\) and \(v\) in \(s = \alpha + \beta v\) and make \(y\) the subject.

a regression line

For 10 months, \(m\) = advertising (£100s) and \(p\) = profit (£1000s): \(\sum m = 1124\), \(\sum p = 281\), \(\sum mp = 32\,958\), \(\sum m^2 = 132\,388\). Find the regression line of \(p\) on \(m\).

\(S_{mp} = 32\,958 - \frac{1124 \times 281}{10} = 1373.6\). \(S_{mm} = 132\,388 - \frac{1124^2}{10} = 6050.4\).

\(b = \frac{1373.6}{6050.4} = 0.227\). \(a = 28.1 - 0.227 \times 112.4 = 2.58\).

\(p = 2.58 + 0.227m\).

  • B1 (cso) for a printed \(S_{xy}\) with all the numbers shown (WST01 Jan 2020 Q3a); M1 A1 A1 for calculated \(S\) values (WST01 Jun 2023 Q2a).
  • Line: M1 for \(b = \frac{S_{xy}}{S_{xx}}\), M1 for \(a = \bar{y} - b\bar{x}\), A1 A1 for the values, in an equation with the right letters (WST01 Jun 2017 Q5e).
  • Uncoding: M1 for substituting the codes into the line, A1 A1 for the new coefficients (WST01A Jan 2026 Q3d).

Often asked as: calculate \(S\) values from sums, then the line, then interpret it (4.2) and \(r\) (4.3).

\(b = \frac{S_{xy}}{S_{yy}}\).

Rounding \(b\) too early before finding \(a\).

Writing the line in \(x\) and \(y\) when the variables are \(m\) and \(p\).

Spec4.2Explanatory and response variables; using and interpreting the line

Identify explanatory (independent) and response (dependent) variables, use the regression line for predictions within the data range, know the dangers of extrapolation, and interpret the line in context.

The idea

interpreting and predicting

With \(p = 2.58 + 0.227m\) (\(m\) in £100s, \(p\) in £1000s), interpret \(b\) and comment on predicting \(p\) for \(m = 120\) and \(m = 400\) (the data range is 85 to 140).

\(b\): each extra £100 spent on advertising is linked to about £227 more profit.

\(m = 120\): \(p = 2.58 + 0.227(120) = 29.8\), i.e. about £29 800. Reliable: inside the data range.

\(m = 400\): extrapolation, far outside the range, so unreliable.

  • Interpretation: B1 for a statement of what \(b\) means in context with a number and units (WST01 Jan 2021 Q5f).
  • Predictions: M1 for substituting, A1; then B1 for a comment on reliability (interpolation or extrapolation) (WST01 Jan 2018 Q5e).
  • Comparing two lines: B1ft for comparing gradients, dB1ft for a consistent recommendation (WST01A Jan 2026 Q3f).

Often asked as: interpret \(a\) or \(b\); predict; say which variable is explanatory; find \(x\) for a given change in \(y\) (WST01 May 2024 Q4).

Interpretations with no context or units.

Using a line of \(y\) on \(x\) to predict \(x\) from \(y\) without comment.

Spec4.3The product moment correlation coefficient

Calculate and interpret the product moment correlation coefficient, knowing its uses and limitations.

The formula

\[r = \frac{S_{xy}}{\sqrt{S_{xx}S_{yy}}}, \qquad -1 \leqslant r \leqslant 1\]

\(r\) Meaning
close to 1 strong positive linear correlation
close to \(-1\) strong negative linear correlation
close to 0 little or no linear correlation

Limitations

calculating r

For the data in 4.1, also \(\sum p^2 = 8250\). Find \(r\) and comment.

\(S_{pp} = 8250 - \frac{281^2}{10} = 353.9\). \(r = \dfrac{1373.6}{\sqrt{6050.4 \times 353.9}} = 0.939\).

Strong positive linear correlation: months with more advertising tended to have higher profit, so a linear regression model is reasonable.

  • M1 A1 A1 for the \(S\) values (WST01A Jan 2026 Q3a), then M1 A1 for \(r\).
  • Interpretation: B1 for a statement about strength and direction in context, dB1 for a conclusion about a claim. "\(r\) is far from 1" alone isn't enough (WST01 Jun 2017 Q2e, WST01 Oct 2024 Q2).

Often asked as: calculate \(r\); comment on a claim; explain why coding doesn't affect \(r\).

\(|r| > 1\) from an arithmetic slip: check!

Calling it "correlation" without "linear".