Free Pearson Edexcel International A-level Mathematics · S1

Correlation and linear regression

What you’ll learn

  • Calculate and interpret product moment correlation.
  • Use the regression of y on x for prediction.
  • Distinguish interpolation from extrapolation and association from causation.

Understand the idea

A scatter diagram shows the form and strength of association and can reveal an outlier before any calculation. The product moment correlation coefficient rr measures linear association and lies between −1-1 and 11. A value near zero need not rule out a strong curved relationship.

The least-squares regression of yy on xx predicts yy from a specified xx and minimises the squared vertical residuals. Its line passes through (xˉ,yˉ)(\bar x,\bar y). The regression of xx on yy is a different fit, so do not simply rearrange a regression equation to predict the other variable.

A prediction within the observed range is interpolation. Extrapolation requires the relationship to continue outside the available evidence and can be unreliable. Correlation alone does not establish cause: a third variable, selection effects or chance may explain the association.

Key formulae

Sxy=∑xy−(∑x)(∑y)nS_{xy}=\sum xy-\frac{(\sum x)(\sum y)}{n}

r=SxySxxSyyr=\frac{S_{xy}}{\sqrt{S_{xx}S_{yy}}}

y^=a+bx,b=SxySxx\hat y=a+bx,\qquad b=\frac{S_{xy}}{S_{xx}}

a=yˉ−bxˉa=\bar y-b\bar x

A fitted line predicts the mean response, not every observation

Conditions. Illustrative line ŷ=1+2x with a single observed value y=8 at x=3. The vertical segment marks the residual 8−7=1; this is an illustration, not a fitted empirical dataset.

Explanatory x / model units; Response y / model units.

At x=3 the prediction is 7 and the observation is 8, so the residual is+1 in y units. Least squares minimises squared vertical residuals across the data; it does not force every residual to zero.

Open the interactive lesson to view plotted curves and coordinate tables.

Worked example

A dataset has xˉ=4\bar x=4, yˉ=9\bar y=9, Sxx=20S_{xx}=20, Syy=80S_{yy}=80 and Sxy=30S_{xy}=30. Find the regression of yy on xx and the correlation coefficient.

  1. The gradient is b=30/20=1.5b=30/20=1.5.
  2. The intercept is a=9−1.5(4)=3a=9-1.5(4)=3.
  3. The correlation is rr =30/20×80=30/\sqrt{20\times80} =30/40=30/40 =0.75=0.75.

Answer: y^=3+1.5x\hat y=3+1.5x and r=0.75r=0.75.

Open the interactive lesson to try original questions and recall. Build a revision plan.