Regression and the PMCC
Regression and the product moment correlation coefficient (PMCC) are Higher-tier tools for analysing bivariate (paired) data. The PMCC is a number between -1 and 1 that measures the strength and direction of a linear relationship between two variables, while a regression line is the equation of the line of best fit, used to predict the value of one variable from a given value of the other.
Before you start
Make sure you're comfortable with these topics first:
Method
- From the question, identify or calculate the summary totals needed: n (the number of pairs), the sum of x, the sum of y, the sum of x^2, the sum of y^2, and the sum of xy.
- Substitute these into Sxy = sum(xy) - (sum x)(sum y)/n, Sxx = sum(x^2) - (sum x)^2/n, and Syy = sum(y^2) - (sum y)^2/n.
- Substitute Sxy, Sxx and Syy into r = Sxy / sqrt(Sxx x Syy) to find the PMCC, rounding as instructed by the question.
- Interpret r in context: a value close to 1 or -1 shows strong linear correlation, a value close to 0 shows weak or no linear correlation, and the sign shows the direction (positive or negative).
- For the regression line, find the gradient b = Sxy/Sxx, then find the intercept using a = ybar - b x xbar, where xbar and ybar are the means of x and y, and write the line as y = a + bx.
- Use the regression equation to predict y for a given x, but check that x lies within (interpolation) rather than far outside (extrapolation) the range of the original data before trusting the prediction.
Common mistakes
MistakeSwapping the variables, using the y-values as x, when the question asks to predict y from x.
InsteadDecide which variable you are given (x) and which you want to predict (y) before you start. The line of y on x is not the same as the line of x on y, so swapping them gives a different equation.
MistakeFinding the intercept as a = ybar + b x xbar, or using ybar as the intercept.
InsteadThe intercept is a = ybar - b x xbar. Check the finished line by putting in x = xbar: it should give ybar, because the regression line passes through the point (xbar, ybar).
MistakeDropping the minus sign when Sxy is negative, so a scatter that falls from left to right gets a positive r and gradient.
InsteadThe sign of r and of the gradient is the sign of Sxy, since Sxx and Syy are never negative. If the points fall from left to right, r and b must both be negative.
Worked examples
Example 1
For 6 pairs of data, x: 2, 4, 6, 8, 10, 12 and y: 3, 5, 6, 8, 9, 11. Calculate the product moment correlation coefficient, giving your answer to 3 significant figures.
- n = 6, sum x = 42, sum y = 42, sum x^2 = 364, sum y^2 = 336, sum xy = 348.
- Sxy = 348 - (42 x 42)/6 = 348 - 294 = 54.
- Sxx = 364 - (42)^2/6 = 364 - 294 = 70.
- Syy = 336 - (42)^2/6 = 336 - 294 = 42.
- r = 54 / sqrt(70 x 42) = 54 / sqrt(2940) = 54 / 54.2 = 0.996 (3 sf).
- Final answer: r = 0.996, showing a very strong positive correlation.
Example 2
The midday temperature, x degrees Celsius, and the number of hot drinks, y, sold by a cafe on six days were: x = 10, 12, 15, 18, 21, 24 and y = 60, 58, 44, 45, 32, 30. (a) Find the regression line y = a + bx, with a and b to 3 significant figures, and check the strength of the correlation. (b) Predict y when x = 16 and when x = 40, and comment on each prediction.
- The totals for the 6 pairs are: sum x = 100, sum y = 269, sum x^2 = 1810, sum y^2 = 12849 and sum xy = 4158.
- Sxy = 4158 - (100 x 269)/6 = -325.33... and Sxx = 1810 - 100^2/6 = 143.33... The gradient is b = Sxy / Sxx = -2.27 (3 s.f.).
- The means are xbar = 100/6 = 16.67 and ybar = 269/6 = 44.83, so a = ybar - b x xbar = 44.83 + 2.2698 x 16.667 = 82.7 (3 s.f.). The line is y = 82.7 - 2.27x.
- As a check, Syy = 12849 - 269^2/6 = 788.83..., so r = -325.33... / sqrt(143.33... x 788.83...) = -0.968 (3 s.f.). This is a strong negative correlation, so the line is worth using for prediction.
- x = 16 lies inside the range of the data (10 to 24), so this is interpolation: y = 82.7 - 2.27 x 16 = 46.4, which is about 46 drinks.
- Final answer: y = 82.7 - 2.27x. The prediction of about 46 drinks at 16 degrees is reasonably reliable, but x = 40 is far outside the data and gives y = -8.1, an impossible number of drinks, so the line should not be used there.
Example 3
In a fictional investigation, four trial settings have paired values x = 17, 23, 29, 37 and y = 14, 22, 31, 53. Find the regression line of y on x and the regression line of x on y, each to 3 significant figures. Explain why rearranging the first line does not give the second.
- For this fictional data, n = 4, sum x = 106, sum y = 120, sum x^2 = 3028, sum y^2 = 4450 and sum xy = 3604.
- Sxx = 3028 - 106^2/4 = 219 and Sxy = 3604 - (106 x 120)/4 = 424. Therefore the y-on-x gradient is Sxy/Sxx = 1.94 (3 s.f.). Using the unrounded gradient, its intercept is 30 - (424/219) x 26.5 = -21.3 (3 s.f.).
- So the regression line of y on x is y = -21.3 + 1.94x. Rearranging this displayed rounded line gives x = (y + 21.3)/1.94, or approximately x = 11.0 + 0.515y (3 s.f.).
- For x on y, use Syy = 4450 - 120^2/4 = 850 instead: its gradient is Sxy/Syy = 424/850 = 0.499 (3 s.f.). Using the unrounded gradient, its intercept is 26.5 - (424/850) x 30 = 11.5 (3 s.f.).
- The separately fitted x-on-y line is x = 11.5 + 0.499y, not the rearranged line. The two regressions minimise deviations in different directions, so the first line cannot be rearranged to obtain the second.
- Final answer: y = -21.3 + 1.94x and x = 11.5 + 0.499y; rearranging the y-on-x regression does not produce the x-on-y regression.
Practice questions
Q1[2 marks]A PMCC value of r = 0.85 is calculated for two variables. Describe the strength and direction of the correlation.Show answer
Answer: Strong positive correlation
Q2[2 marks]A PMCC value of r = -0.2 is calculated. Describe the correlation.Show answer
Answer: Weak negative correlation
Q3[1 mark]The equation of a regression line is y = 3 + 2x. Find y when x = 5.Show answer
Answer: y = 13 (3 + 2 x 5)
Q4[2 marks]For a data set, Sxy = 30, Sxx = 50, Syy = 40. Calculate the PMCC to 3 significant figures.Show answer
Answer: r = 0.671 (30/sqrt(50 x 40) = 30/44.72)
Q5[1 mark]For a data set, Sxy = 45 and Sxx = 60. Find the gradient b of the regression line.Show answer
Answer: b = 0.75 (45/60)
Q6[2 marks]A regression line y = 12 + 1.5x is used to predict y when x = 200, even though the original x-values ranged only from 5 to 20. Explain why this prediction may be unreliable.Show answer
Answer: x = 200 is far outside the range of the original data (extrapolation), so the linear relationship found may not still hold there
Exam-style questions
Written in the style of a GCSE Statistics exam paper, with a full mark scheme.
Exam tips
- Set out a table with columns x, y, x^2, y^2 and xy and a totals row before using the formulas, so all the summary values come from one place.
- Describe the gradient in context with cautious wording: 'each extra unit of x is associated with b more (or fewer) units of y, on average', not 'causes'.
Q1[3 marks]For 5 pairs of data, Sxy = 18, Sxx = 24 and Syy = 20. (a) Calculate the product moment correlation coefficient, giving your answer to 3 significant figures. (b) State what this value indicates about the correlation between the two variables.Show mark scheme
Tick each line you got.
Nothing ticked yet - 3 available
Q2[4 marks]A researcher collects data on the age, x years, and reaction time, y hundredths of a second, of 7 people. She finds n = 7, sum x = 210, sum y = 490, sum x^2 = 6510, sum y^2 = 35700, sum xy = 15030. (a) Show that Sxy = 330. (b) Find Sxx and Syy. (c) Hence calculate the product moment correlation coefficient, giving your answer to 3 significant figures.Show mark scheme
Tick each line you got.
Nothing ticked yet - 4 available
Q3[3 marks]The regression line for predicting exam score, y, from hours of revision, x, is y = 42 + 3.5x, valid for 2 <= x <= 15. (a) Predict the exam score for a student who revises for 8 hours. (b) State, giving a reason, whether this prediction is reliable.Show mark scheme
Tick each line you got.
Nothing ticked yet - 3 available
See real GCSE Statistics past-paper questions, with official mark schemes
This topic in real past papers
We have tagged some boards' past papers question by question (not every board or year yet). This topic comes up in:
- AQA GCSE Statistics past papers: 2 questions across 2 papers, latest tagged November 2021
- Edexcel GCSE Statistics past papers: 2 questions across 2 papers, latest tagged November 2021
Free printable worksheet
Want more practice on paper? Download the Regression and the PMCC worksheet pack - 27 pages of exam-style questions with a full mark scheme. Free to download, no card or account. Print it for personal and classroom use.
This topic is chapter 13 of GCSE Statistics Higher Essentials 2, the whole course as one free printable PDF. Its worksheet is also chapter 5 of GCSE Statistics Higher Topic Workbook 6 and chapter 2 of GCSE Statistics Higher 10-Minute Tests 3, free printable practice books.
Other versions of this worksheet: