Edexcel IAL Maths
The full notes page in 14 sections · live simulations · practice questions
Press F for full screen · → or click to move on
ExaminerPrep is an independent tutoring service. It has been developed independently from and is not endorsed by the International Baccalaureate Organization. "International Baccalaureate", "IB" and "IB Diploma Programme" are registered trademarks of the IBO, used here for descriptive purposes only.
Pearson Edexcel and Cambridge are trademarks of their owners; ExaminerPrep is not affiliated with any exam board.
Scatter diagrams and the language of correlation: positive, negative, strong, weak, none
Calculating Sₓₓ, S_yy and S_xy from raw data or from summary statistics
The product moment correlation coefficient r: calculating it, interpreting it in context, and its limitations
The least-squares regression line y=a+bx: what "least squares" means and how to find a and b
Explanatory and response variables, and interpreting a and b in context
Interpolation and extrapolation, and how reliable an estimate is
Coding: the effect on r, on the summary statistics and on the regression line
1. Correlation and regression measure and use a straight-line relationship between two variables, and three summary numbers, Sₓₓ, S_yy and S_xy, carry the whole topic.
2. Sₓₓ=Σx²-(Σx)²/n, S_yy=Σy²-(Σy)²/n, S_xy=Σxy-(Σx)(Σy)/n.
3. r=S_xy/√(SₓₓS_yy), always between −1 and 1. It measures linear association only, and correlation does not prove cause.
4. Regression line of y on x: b=S_xy/Sₓₓ, a=ȳ-bx̄. It passes through (x̄,ȳ) and minimises the sum of the squared vertical distances.
5. b is the change in y for each extra unit of x; a is the value of y when x=0 (often outside the data, so treat it with care).
6. Interpolation is reliable when r is close to ±1; extrapolation is not. Coding u=(x-p)/q does not change r (for q>0).
Bivariate data. Pairs of values of two variables measured on each member of a sample, for example the height and the arm span of each student. A scatter diagram plots each pair as one point (x,y).
With positive correlation, as x increases y tends to increase: the points rise from left to right. With negative correlation they fall from left to right. With no correlation there is no straight-line pattern. The closer the points lie to a straight line, the stronger the (linear) correlation. In context, say what happens to one variable as the other increases: "days with more sunshine tend to generate more energy".
Common error
Writing just "positive correlation" when asked to interpret a diagram in context. Name the variables: "as the hours of sunshine increase, the energy generated tends to increase".
Summary statistics for paired data
(n = number of pairs): Sₓₓ=Σ(x-x̄)²=Σx²-(Σx)²/n, S_yy=Σ(y-ȳ)²=Σy²-(Σy)²/n S_xy=Σ(x-x̄)(y-ȳ)=Σxy-(Σx)(Σy)/n
Sₓₓ and S_yy are never negative. S_xy is positive for positive correlation and negative for negative correlation; it carries the sign of everything that follows. Why? For a point above-right of the mean point, both (x-x̄) and (y-ȳ) are positive, so its product is positive; points below-left also give positive products. A rising pattern therefore makes S_xy positive.
In most questions you are given Σx, Σy, Σx², Σy² and Σxy: substitute into the right-hand forms. From raw data, use your calculator's statistics mode, but still write the formula with the numbers in it, and keep full calculator values of Sₓₓ, S_yy and S_xy: rounding early can change the third significant figure of r.
The solar-panel data used in the next three sections: hours of sunshine on 8 days and the energy a domestic solar panel generated on each of those days.
| hours of sunshine, x | 2.5 | 3.0 | 4.5 | 5.0 | 6.5 | 7.0 | 8.5 | 9.5 |
| energy, y (kWh) | 3.1 | 4.4 | 5.2 | 6.9 | 7.8 | 9.6 | 10.3 | 12.1 |
WORKED EXAMPLE · QUESTION
For the solar-panel data, Σx=46.5, Σy=59.4, Σx²=314.25, Σy²=509.12 and Σxy=399.25. Calculate Sₓₓ, S_yy and S_xy.
SOLUTION
Sₓₓ=314.25-46.5²/8=314.25-270.28125= 43.96875
S_yy=509.12-59.4²/8=509.12-441.045= 68.075
S_xy=399.25-(46.5×59.4)/8=399.25-345.2625= 53.9875, positive, matching the rising pattern of the points.
Product moment correlation coefficient.
A measure of the strength and direction of the linear relationship between two variables: r=S_xy/√(SₓₓS_yy), -1≤r≤1. r has no units, and swapping x and y gives the same value. A value outside -1≤r≤1 means an arithmetic error.
| Value of r | Meaning |
|---|---|
| r=1 | perfect positive linear correlation: every point on a rising straight line |
| close to 1 (e.g. 0.9) | strong positive linear correlation |
| around 0.4 to 0.6 | moderate / weak positive linear correlation |
| close to 0 | little or no linear correlation (there may still be a curved relationship) |
| close to −1 | strong negative linear correlation |
| Value of r | Meaning |
|---|---|
| r=-1 | perfect negative linear correlation: every point on a falling straight line |
WORKED EXAMPLE · QUESTION
Using the results of Worked example 1, calculate the product moment correlation coefficient between hours of sunshine and energy generated, and interpret it in context.
SOLUTION
r=53.9875/(√(43.96875×68.075))=0.98680…= 0.987
Strong positive linear correlation: days with more hours of sunshine tend to generate more energy.
Exam tip — three parts to an interpretation
An interpretation of r needs the direction (positive/negative), the strength (strong/weak) and the context (both variables named). "Strong" on its own, or a bare number, is not an interpretation.
For each point, the residual is its vertical distance from the line: observed y − value of y on the line. The least-squares regression line of y on x is the straight line that makes the sum of the squares of the residuals as small as possible. The distances are measured parallel to the y-axis because y is the variable being predicted.
Regression line of y on x.
y=a+bx, b=S_xy/Sₓₓ, a=ȳ-bx̄ Because a=ȳ-bx̄, the line always passes through the mean point (x̄,ȳ), a quick check on a sketch.
WORKED EXAMPLE · QUESTION
Using the results of Worked example 1, find the equation of the regression line of y on x for the solar-panel data, giving a and b to 3 significant figures.
SOLUTION
Gradient: b=(53.9875/43.96875)=1.2279…
Means: x̄=(46.5/8)=5.8125, ȳ=(59.4/8)=7.425.
Intercept, using the unrounded b: a=7.425-1.2279…×5.8125=0.2881
y=0.288+1.23x
Common error
Rounding b to 1.23 before finding a: 7.425-1.23×5.8125=0.276, not 0.288. Keep the full value of b in your calculator for the next step.
Explanatory (independent) variable: the variable that is set, controlled or changes on its own; it goes on the horizontal axis as x. Response (dependent) variable: the variable whose value depends on, or is predicted from, the explanatory variable; it goes on the vertical axis as y.
Ask which variable could affect the other: hours of sunshine can affect the energy generated, not the other way round. The regression line of y on x is used to estimate y for a given x; it is not the right line for estimating x from y.
Interpreting b: "for each extra (unit of x), (the response) increases/decreases by about b (units of y)".
Interpreting a: the value of y when x=0, meaningful only if x=0 makes sense and is not far outside the data.
The phone data: hours of screen-on time x since a full charge, and battery left y (%), for one phone on 8 occasions.
| x (hours) | 1 | 1.5 | 2.5 | 3 | 4 | 4.5 | 5.5 | 6 |
| y (%) | 89 | 82 | 74 | 63 | 58 | 49 | 41 | 32 |
WORKED EXAMPLE · QUESTION
For the phone data, n=8, Σx=28, Σy=488, Σx²=121, Σy²=32 560 and Σxy=1456. (a) State, with a reason, which is the explanatory variable. (b) Find the regression line of y on x. (c) Interpret the gradient and the intercept in context.
SOLUTION
(a) Screen-on time: using the screen drains the battery, so the battery level depends on the time, not the reverse.
(b) Sₓₓ=121-28²/8=23, S_xy=1456-(28×488)/8=-252. b=(-252)/23=-10.957…, a=61-(-10.957…)(3.5)=99.35: y=99.3-11.0x.
(c) b: the battery level falls by about 11 percentage points for each hour of screen-on time. a: with no screen-on time the battery is at about 99%, close to the full charge it starts from.
Interpolation: estimating y for an x inside the range of the data. Extrapolation: estimating y for an x outside the range of the data.
An interpolated estimate is reliable when the correlation is strong (r close to ±1). An extrapolated estimate is unreliable: nothing in the data shows that the straight-line pattern carries on beyond it. A weak correlation makes every estimate unreliable, inside the range or not.
WORKED EXAMPLE · QUESTION
Use the regression line from Worked example 4 to estimate the battery left after (a) 2 hours and (b) 10 hours of screen-on time. Comment on the reliability of each estimate.
SOLUTION
(a) y=99.348-10.957×2= 77.4%. Reliable: 2 hours is inside the data (interpolation), and r=-0.994 (using S_yy=2792 from the sums in Worked example 4) shows strong negative linear correlation.
(b) y=99.348-10.957×10= −10.2%. Unreliable: 10 hours is outside the data (extrapolation), and a negative battery level is impossible.
Common error
Rearranging y=a+bx to estimate x from a given y. The line of y on x minimises vertical distances only; to estimate x you would need the regression line of x on y, a different line unless r=±1.
Data are often coded to make the numbers smaller: u=(x-p)/q and v=(y-s)/t. Adding or subtracting a constant shifts the points; dividing by a positive constant rescales an axis. Neither changes the shape of the scatter diagram, so r is unchanged. Dividing by a negative constant reflects the diagram: r changes sign but keeps its size. To turn a coded regression line into one for x and y, substitute the coding into it and rearrange.
Coding and the summary statistics
(q,t>0): Sᵤᵤ=Sₓₓ/q², Sᵥᵥ=S_yy/t², Sᵤᵥ=S_xy/qt, rᵤᵥ=r_xy The constants p and s that are subtracted have no effect on any of the S values.
WORKED EXAMPLE · QUESTION
A batch of 8 steel bolts is heat-treated at different furnace temperatures x °C and the hardness y of each is measured. The data are coded using u=(x-800)/5 and v=y-200, giving Σu=93, Σv=236, Σu²=1383, Σv²=7964, Σuv=3290. (a) Find the product moment correlation coefficient between x and y. (b) Find the regression line of v on u. (c) Hence find the regression line of y on x. (d) Estimate the hardness of a bolt treated at 860 °C.
SOLUTION
(a) Sᵤᵤ=1383-93²/8=301.875, Sᵥᵥ=7964-236²/8=1002, Sᵤᵥ=3290-(93×236)/8=546.5. r=546.5/(√(301.875×1002))=0.994; coding does not change r, so r=0.994.
(b) Gradient =(546.5/301.875)=1.8104…; ū=11.625, v̄=29.5; intercept =29.5-1.8104…×11.625=8.4547: v=8.45+1.81u.
(c) Substitute: y-200=8.4547+1.8104×(x-800)/5, so y=208.45+0.36207x-289.66: y=-81.2+0.362x.
(d) y=-81.202+0.36207×860= 230.
Check: Sₓₓ=5²×Sᵤᵤ=7546.875 and S_xy=5×Sᵤᵥ=2732.5, so b=2732.5÷7546.875=0.362. The intercept −81.2 would be the hardness at 0 °C, far outside the data, so it has no practical meaning.
Linear only. r measures how close the points are to a straight line. A strong curved relationship can have r near 0, so always look at the scatter diagram.
Correlation is not causation. Both variables may depend on a third: ice-cream sales and sunburn cases rise together because both increase in hot, sunny weather.
Outliers. One unusual point, often a recording error, can change r a lot, in either direction.
Small samples. With only a few points, a large r can happen by chance (testing for this is beyond S1).
The range of the data. r describes the relationship only within the values measured.
WORKED EXAMPLE · QUESTION
The arm span x cm and height y cm of 10 students give Σx=1708, Σy=1654, Σx²=292 876, Σy²=277 202, Σxy=283 512, and r=0.494. One student's pair was recorded as (172, 117); it should be removed. (a) Find the new summary statistics for the remaining 9 students. (b) Find the new value of r and comment.
SOLUTION
(a) Subtract the incorrect pair from every sum: Σx=1536, Σy=1537, Σx²=292 876-172²=263 292, Σy²=277 202-117²=263 513, Σxy=283 512-172×117=263 388.
(b) With n=9: Sₓₓ=263 292-1536²/9=1148, S_yy=263 513-1537²/9=1027.56, S_xy=263 388-(1536×1537)/9=1073.33. r=1073.33/(√(1148×1027.56))= 0.988. The correlation is now strong and positive: taller students tend to have longer arm spans; the single error had hidden this.
Common error
Removing a point by subtracting its values from Σx and Σy but leaving Σx², Σy², Σxy and n unchanged. Every sum loses that point's contribution, and n goes down by 1.
A full question usually runs: summary statistics → r and its meaning → regression line → interpret the gradient → estimate and judge reliability → coding or a change of units. Keep full calculator values throughout.
WORKED EXAMPLE · QUESTION
The table gives the altitude x (hundreds of metres) and the mean July temperature y (°C) for 8 weather stations in one mountain region.
| x | 2 | 5 | 7 | 9 | 12 | 14 | 16 | 19 |
| y | 24.6 | 23.5 | 21.9 | 21.4 | 19.1 | 18.6 | 16.8 | 15.7 |
You may use Σx=84, Σy=161.6, Σx²=1116, Σy²=3334.48, Σxy=1569.3. (a) Find Sₓₓ, S_yy and S_xy. (b) Calculate r and interpret it in context. (c) Find the regression line of y on x. (d) Interpret the gradient in context. (e) Estimate the mean July temperature at a station 600 m above sea level, and comment on its reliability. (f) Explain why the line should not be used for a summit at 3500 m. (g) The altitudes are re-recorded in metres, w=100x. State the correlation coefficient between w and y, and the gradient of the regression line of y on w.
SOLUTION
(a) Sₓₓ=1116-84²/8= 234; S_yy=3334.48-161.6²/8= 70.16; S_xy=1569.3-(84×161.6)/8= −127.5.
(b) r=(-127.5)/(√(234×70.16))= −0.995: strong negative linear correlation; higher stations tend to have lower mean July temperatures.
(c) b=(-127.5)/234=-0.54487…; x̄=10.5, ȳ=20.2; a=20.2-(-0.54487…)(10.5)=25.921: y=25.9-0.545x.
(d) For each extra 100 m of altitude, the mean July temperature falls by about 0.545 °C.
(e) 600 m means x=6: y=25.921-0.54487×6= 22.7 °C; reliable, because x=6 is inside the data (interpolation) and the correlation is strong.
(f) 3500 m is x=35, far outside the range 2 to 19: extrapolation, so the linear pattern may not continue.
(g) Multiplying x by a positive constant does not change r; it divides the gradient by 100: r=-0.995, gradient −0.00545 °C per metre.
Exam tip 1 — write the formula with the numbers in
Show S_xy=1569.3-(84×161.6)/8 before the answer. If a calculator slip gives a wrong value, the method is still visible and later parts can follow through from it.
Exam tip 2 — keep unrounded values
Store Sₓₓ, S_yy, S_xy and b in your calculator memory. Give r, a and b to 3 significant figures at the end, unless the question asks otherwise.
Exam tip 3 — context in every interpretation
"For each extra hour of sunshine, about 1.23 kWh more energy is generated" is an interpretation; "b is the gradient" is not. Use the names and units of both variables.
Exam tip 4 — check sign and size
r, S_xy and b must all have the same sign as the trend in the scatter diagram, and -1≤r≤1. The line must pass through (x̄,ȳ).
Exam tip 5 — reliability needs two reasons
To judge an estimate, say whether it is interpolation or extrapolation and what the value of r shows about the strength of the correlation.
| Misconception | Why it is wrong | Correct idea |
|---|---|---|
| r=0 means the variables are unrelated. | r only measures linear association; a curve can give r=0. | r=0 means no linear correlation; look at the scatter diagram. |
| A strong correlation proves that x causes y. | Both may depend on a third variable, or it may be coincidence. | Correlation describes association, not cause. |
| r=-0.9 is weaker than r=0.5. | The sign gives the direction, the size gives the strength. | −0.9 is a strong (negative) correlation. |
| Coding changes the correlation coefficient. | Shifting and positive rescaling do not change the shape of the scatter diagram. | r is unchanged by u=(x-p)/q with q>0. |
| The regression line of y on x can be rearranged to predict x. | It minimises vertical distances only. | Use it only to estimate y from x. |
| An estimate is reliable as long as r is close to 1. | The pattern is only known inside the data. | Extrapolated estimates are unreliable however strong r is. |
S1.2 Measures of location and dispersion
Sₓₓ/n is the variance of x, so the coding rules here are the same ones used for means and standard deviations.
P1 Straight-line graphs
The regression line y=a+bx is a straight line: gradient and intercept are read and interpreted exactly as for y=mx+c.
P2/P3 Exponentials and logarithms
A curved relationship such as y=kxⁿ becomes linear when you plot log y against log x; correlation and regression then apply to the logged data.
| Formula | Use | In the formulae list? |
|---|---|---|
| Sₓₓ=Σx²-(Σx)²/n | spread of x; also S_yy for y | Yes |
| S_xy=Σxy-(Σx)(Σy)/n | how x and y vary together | Yes |
| r=S_xy/√(SₓₓS_yy) | product moment correlation coefficient | Yes |
| b=S_xy/Sₓₓ, a=ȳ-bx̄ | regression line of y on x: y=a+bx | Yes |
| ȳ=a+bx̄ | the line passes through the mean point | No – derive it |
| Sᵤᵤ=Sₓₓ/q², Sᵤᵥ=S_xy/(qt), rᵤᵥ=r_xy | coding u=(x-p)/q, v=(y-s)/t | No – learn it |
1. For a set of data, Sₓₓ=40, S_yy=90 and S_xy=-48. Find r.
2. The regression line of y on x is y=12.4+0.75x, and x̄=20. Find ȳ.
3. Two variables have r=0.03. Does this show they are not related?
4. Data are coded with u=(x-50)/10 and v=(y-3)/2. The coded data have r=0.62. Find r for x and y.
5. Phone sales in a country and the number of people over 80 have both risen steadily, with r=0.97. Does selling phones make people live longer?
1. r=-48÷√(40×90)=-48÷60=-0.8: fairly strong negative linear correlation.
2. The line passes through (x̄,ȳ), so ȳ=12.4+0.75×20=27.4.
3. No. It shows there is almost no linear correlation. The variables could still have a strong curved relationship, which a scatter diagram would show.
4. 0.62. Subtracting constants and dividing by positive constants does not change the correlation coefficient.
5. No. Correlation does not imply causation: both quantities increase over time (time, wealth and population growth are third variables), so they are correlated without one causing the other.
Check understanding
The answer and each step appear one click at a time.
An engineer records the wind speed x m s⁻¹ and the power output y kW of a wind turbine at 20 different times. The wind speeds recorded range from 4 m s⁻¹ to 12 m s⁻¹. The product moment correlation coefficient is 0.962 and the regression line of y on x is y = −62.4 + 31.5x.
(a) State, with a reason, which variable is the explanatory variable. [1]
(b) Interpret the value 31.5 in context. [1]
(c) Estimate the power output when the wind speed is 9 m s⁻¹, and comment on the reliability of your estimate. [2]
(d) Use the line to find the power output predicted for a wind speed of 1 m s⁻¹, and explain why this value should not be trusted. [1]
Mark scheme click to reveal each step
the wind speed, because the wind drives the turbine: the power output depends on the wind speed, not the reverse
for each increase of 1 m s⁻¹ in wind speed, the power output increases by about 31.5 kW
−62.4 + 31.5 × 9 = 221.1 kW
reliable: 9 is within the range of the data (interpolation) and r = 0.962 shows strong positive correlation
−30.9 kW, which is impossible (negative power); 1 m s⁻¹ is outside the data, so this is extrapolation
For 15 farms in one region, a researcher records the rainfall x mm during the growing season and the wheat yield y tonnes per hectare. The rainfall ranged from 38 mm to 91 mm. Sₓₓ = 1600, S_(yy) = 4.84, x̄ = 62.5, ȳ = 4.2, and the product moment correlation coefficient is exactly 0.6.
(a) Show that S_(xy) = 52.8. [2]
(b) Find the equation of the regression line of y on x. [3]
(c) Use your line to estimate the yield for a farm with 70 mm of rainfall, and comment on the reliability of the estimate. [2]
Mark scheme click to reveal each step
0.6 = ^(Sxy)⁄_(√(1600 × 4.84))
√(1600 × 4.84) = 40 × 2.2 = 88, so S_(xy) = 0.6 × 88 = 52.8
b = ^(52.8)⁄₁₆₀₀ = 0.033
a = 4.2 − 0.033 × 62.5 = 2.1375
y = 2.14 + 0.033x
2.1375 + 0.033 × 70 = 4.45 tonnes per hectare
70 mm is inside the data (interpolation), but r = 0.6 is only moderate correlation, so the estimate is not very reliable
Keep practising
Full notes, every simulation and hundreds of questions with mark schemes, free:
ExaminerPrep is an independent tutoring service. It has been developed independently from and is not endorsed by the International Baccalaureate Organization. "International Baccalaureate", "IB" and "IB Diploma Programme" are registered trademarks of the IBO, used here for descriptive purposes only.
Pearson Edexcel and Cambridge are trademarks of their owners; ExaminerPrep is not affiliated with any exam board.