Skip to content
IB Diploma ProgrammeSL & HL

Correlation and regression

Mathematics: Analysis and Approaches SL & HL Chapter Notes

Last updated November 2026

ShareWhatsAppPost

Correlation and regression notes as a printable PDF.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Correlation and regression notes as text: skim, search, and jump between subtopics.

~15 min read

1. Scatter diagrams and types of correlation

A scatter diagram plots each pair of values of two variables as one point. The pattern of the points shows the correlation between the variables.

Correlation is positive when y rises as x rises, negative when y falls as x rises, and zero when there is no pattern. It is strong when the points lie close to a straight line and weak when they are widely spread.

A full description gives the direction and the strength, for example "strong negative correlation". "Describe" asks for both.

Worked example 12 marks

The points on a scatter diagram of the value of a car against its age lie widely spread about a straight line sloping downwards from left to right. Describe the correlation.

  1. 1

    The line slopes downwards, so the correlation is negative (A1) [1]

  2. 2

    The points are widely spread about the line, so the correlation is weak (A1) [1]

2. Correlation does not imply causation

Two variables can change together without one causing the other. Strong correlation shows that they move together. It does not show why.

The syllabus states it directly: correlation does not imply causation. Before claiming that a change in x causes a change in y, look for another explanation, such as a third variable that affects both.

"Suggest" asks for a possible reason. It does not have to be proved.

Worked example 12 marks

A shop finds a strong positive correlation, r = 0.85, between the number of umbrellas it sells each day and the number of buses that run late that day. A newspaper claims that selling umbrellas causes buses to run late. Suggest why this claim is not justified.

  1. 1

    Correlation does not imply causation, so the correlation alone does not show that one variable causes the other (R1) [1]

  2. 2

    A third variable, such as heavy rain on that day, could cause both more umbrella sales and more late buses (R1) [1]

3. Pearson's product-moment correlation coefficient

Pearson's product-moment correlation coefficient, r, measures the strength of linear correlation between two variables. Use technology to calculate it. Critical values of r are given where they are needed.

The sign of r gives the direction: positive r for positive correlation, negative r for negative. The closer r is to 0, the weaker the correlation. The closer |r| is to 1, the stronger it is.

r is only meaningful for a linear relationship. Do not use it to describe a relationship that is not linear.

-1 ≤ r ≤ 1

Worked example 11 mark

Eight students run a 400-metre race. Their race time, T, and the length, L, of their legs are given in the table.(b) Write down the value of the Pearson's product-moment correlation coefficient, r.

Leg length (L cm)8582789176848088
Race time (T seconds)65.267.370.060.872.566.168.962.4
  1. 1

    Enter the two lists and read r from the calculator's linear regression output.

  2. 2

    r = -0.996 (-0.996248…) A1 [1]

  3. 3

    The negative sign shows negative correlation, and r is close to -1: the correlation is strong.

4. Line of best fit and the mean point

A line of best fit is drawn by eye through the points. It must pass through the mean point (barx, bary), found by taking the mean of each variable.

A regression line also passes through the mean point. So when two regression lines are given, the mean point is where the two lines intersect.

Solve the two equations together to find the coordinates of the mean point.

mean point = (barx, bary)

Worked example 13 marks

In a study, measurements for arm span, A cm, and foot length, F cm, are taken from a large group of adults. For this group, the regression line of F on A is found to be F = 0.335A - 32.6, and the regression line of A on F is found to be A = 2.89F + 99.3. Each regression line passes through the mean point.(b) For this group of adults, find the mean arm span and the mean foot length.

  1. 1

    recognition that the lines intersect at the mean point, so 2.89F + 99.3 = (F + 32.6)/0.335 (M1) [1]

  2. 2

    F = 20.8948… and A = 159.686…

  3. 3

    the mean arm span = 160 cm A1 [1]

  4. 4

    the mean foot length = 20.9 cm A1 [1]

5. The regression line of y on x

The regression line of y on x is the line y = ax + b fitted to the data. Technology should be used to find it: enter the two lists and read off a and b.

The markscheme gives a = -0.767, with its negative sign, and b = 130, each to three significant figures, from the full calculator values -0.767415… and 130.345….

Meaning of the parameters: a is the gradient: the predicted change in y for each increase of 1 in x. b is the y-intercept: the predicted value of y when x = 0.

y = ax + b

Worked example 12 marks

Eight students run a 400-metre race. Their race time, T, and the length, L, of their legs are given in the table. The equation of the regression line of T on L for this data can be written in the form T = aL + b.(a) Find the value of a and the value of b.

Leg length (L cm)8582789176848088
Race time (T seconds)65.267.370.060.872.566.168.962.4
  1. 1

    Enter L as the x list and T as the y list, then choose linear regression.

  2. 2

    a = -0.767 (-0.767415…) A1 [1]

  3. 3

    b = 130 (130.345…) A1 [1]

  4. 4

    Here a means the time falls by about 0.767 s for each extra centimetre of leg length.

6. Using the line to make predictions

To predict y, substitute the given value of x into the regression line. The markscheme credits correct substitution of the value into their regression equation, so a slightly different line from an earlier part still earns the method mark.

Using the line for a value of x outside the range of the data is extrapolation. The syllabus warns of its dangers: the pattern may not continue outside that range.

Give the answer to three significant figures, with its unit.

Worked example 12 marks

Eight students run a 400-metre race. Their race time, T, and the length, L, of their legs are given in the table. The equation of the regression line of T on L for this data can be written in the form T = aL + b.(c) Use the equation of the regression line of T on L to predict the time of a student with a leg length of 79 cm.

Leg length (L cm)8582789176848088
Race time (T seconds)65.267.370.060.872.566.168.962.4
  1. 1

    correct substitution of 79 into their regression equation: T = -0.767415… × 79 + 130.345… (M1) [1]

  2. 2

    T = 69.7 (69.7196…) seconds A1 [1]

  3. 3

    79 lies between 76 and 91, the range of leg lengths in the table, so this is not extrapolation.

7. Predicting x from a value of y

The regression line of y on x is fitted to predict y from x. It cannot always be used reliably to predict x from a value of y.

When both regression lines are given, choose the line whose subject is the quantity you want to estimate. To estimate arm span from foot length, use the line of A on F and put the foot length into it.

The markscheme gives M0A0 for choosing the wrong regression line, even if the arithmetic is right.

Worked example 12 marks

In a study, measurements for arm span, A cm, and foot length, F cm, are taken from a large group of adults. For this group, the regression line of F on A is found to be F = 0.335A - 32.6, and the regression line of A on F is found to be A = 2.89F + 99.3. Each regression line passes through the mean point.(a) By using an appropriate regression line, find an estimate of the arm span for an adult with a foot length of 19.8 cm.

  1. 1

    attempt to substitute F = 19.8 into the regression line for A on F: A = 2.89(19.8) + 99.3 (M1) [1]

  2. 2

    A = 156.522, so the arm span is 157 cm A1 [1]

  3. 3

    Rearranging F = 0.335A - 32.6 instead gives 156.417…, so 156: M0A0.

Recap

  • A scatter diagram shows correlation: positive, negative or zero; strong, weak or none.
  • Describe correlation with both its direction and its strength.
  • Correlation does not imply causation.
  • r measures linear correlation only. Use technology to find it. Its sign gives the direction.
  • A line of best fit by eye, and a regression line, pass through the mean point (barx, bary).
  • The regression line of y on x is y = ax + b: a is the gradient, b the y-intercept.
  • To predict, substitute into the line. Beware extrapolation. Use the line whose subject is the quantity to estimate.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. State the type and strength of the correlation when the points on a scatter diagram lie very close to a straight line sloping upwards from left to right.1 mark
    Answer
    1. Strong positive correlation.

    Trap: One word such as "strong" gives the strength but not the direction. A full answer gives both.

  2. Do not use a calculator. Four pairs of variables have these values of Pearson's product-moment correlation coefficient, r. State which pair has the strongest linear correlation? A. r = 0.8   B. r = -0.9   C. r = 0.1   D. r = -0.31 mark
    Answer
    1. B. -0.9 is the closest to -1.
    2. A is a weaker correlation, C is almost zero and D is weak.

    Trap: Choosing A because 0.8 is the larger number. The sign gives the direction. The strength depends on how close r is to -1 or 1.

  3. The regression line of daily sales, S dollars, on temperature, t °C, for a cafe is S = 18.5t + 120. State what the values 18.5 and 120 represent.2 marks
    Answer
    1. a = 18.5: the predicted sales increase by 18.5 dollars for each increase of 1 °C.
    2. b = 120: the predicted sales are 120 dollars when the temperature is 0 °C.

    Trap: Saying that sales "are 18.5 dollars". a is a rate of change per unit of t, not a value of S.

  4. Do not use a calculator. The regression line of the height of a plant, h cm, on the time, d days, is h = 1.5d + 4. It was found from data collected for 1 ≤ d ≤ 20. Use the regression line to predict the height of the plant after 2 weeks.2 marks
    Answer
    1. 2 weeks = 14 days.
    2. h = 1.5 × 14 + 4 = 25 cm.

    Trap: Substituting d = 2 gives 7 cm. The line needs days, so convert the weeks first.

  5. Do not use a calculator. Five pairs of values of x and y are (2, 7), (4, 9), (6, 12), (8, 14) and (10, 18). (a) Find the mean point. [2] (b) A line of best fit passes through the mean point and has gradient 1.3. Find its equation in the form y = ax + b. [2]4 marks
    Answer
    1. (a)
    2. barx = (2 + 4 + 6 + 8 + 10)/5 = 6 and bary = (7 + 9 + 12 + 14 + 18)/5 = 12.
    3. The mean point is (6, 12).
    4. (b)
    5. y - 12 = 1.3(x - 6).
    6. y = 1.3x + 4.2.

    Trap: Forcing the line through the origin, or through the first data point, gives b = 0 or another wrong value. The line must pass through the mean point.

  6. A school finds a strong positive correlation between the shoe size and the reading score of its pupils aged 5 to 15. A parent concludes that larger feet make children read better. Suggest why this conclusion is not justified.2 marks
    Answer
    1. Correlation does not imply causation.
    2. Age could cause both: older children have larger feet and read better.

    Trap: Attacking the data, for example "the sample is too small", answers a different question. The flaw is in the claim of cause.

  7. Six students record the hours of revision, h, and their test mark, m. Hours h = 1, 2, 3, 4, 5, 6 give marks m = 41, 48, 55, 57, 66, 71. (a) Find the equation of the regression line of m on h, in the form m = ah + b. [2] (b) Use your equation to estimate the mark of a student who revises for 4.5 hours. [2]4 marks
    Answer
    1. (a)
    2. Enter h as the x list and m as the y list: a = 5.89 (5.8857…) and b = 35.7 (35.733…).
    3. m = 5.89h + 35.7.
    4. (b)
    5. m = 5.8857… × 4.5 + 35.733…
    6. m = 62.2 (62.219…).

    Trap: Rounding a to 6 before predicting gives 6 × 4.5 + 35.7 = 62.7. Keep the full values and round at the end.

  8. A stall owner models the number of customers per hour, n, by n = 3.2t + 15, where t °C is the outside temperature. The line was found from data with 12 ≤ t ≤ 30. (a) Use the line to predict n when t = 25. [2] (b) A student uses the line to predict n when t = -20. Show that this gives n = -49, and explain why the prediction should not be trusted. [2]4 marks
    Answer
    1. (a)
    2. n = 3.2 × 25 + 15.
    3. n = 95 customers per hour.
    4. (b)
    5. n = 3.2 × (-20) + 15 = -64 + 15 = -49.
    6. t = -20 lies outside the range 12 to 30 of the data, so this is extrapolation. Also, -49 customers is impossible.

    Trap: Saying only that a negative answer is impossible misses the cause: the pattern may not continue outside the range of the data.

  9. Do not use a calculator. The scores of a class in mathematics, M, and science, S, have regression lines M = 0.5S + 30 and S = 1.2M - 12. Each line passes through the mean point. (a) Estimate the mathematics score of a student who scored 70 in science. [2] (b) Find the mean mathematics score and the mean science score. [3]5 marks
    Answer
    1. (a)
    2. Use the line with M as its subject: M = 0.5(70) + 30.
    3. M = 65.
    4. (b)
    5. The mean point lies on both lines: M = 0.5(1.2M - 12) + 30.
    6. M = 0.6M + 24, so 0.4M = 24 and M = 60.
    7. S = 1.2(60) - 12 = 60. Both means are 60.

    Trap: Using S = 1.2M - 12 for part (a) gives M = 68.3. That is the wrong line, since M is the quantity to estimate.

  10. A coach records the greatest mass, m kg, that a lifter can lift after w weeks of training. Weeks w = 2, 4, 6, 8, 10, 12, 14 give masses m = 45, 52, 58, 61, 70, 74, 81. (a) Write down the value of r and describe the correlation. [2] (b) Find the equation of the regression line of m on w. [2] (c) State what the values of a and b represent. [2] (d) The coach solves 100 = aw + b to estimate when the lifter reaches 100 kg. Explain two reasons why this estimate is unreliable. [2]8 marks
    Answer
    1. (a)
    2. r = 0.996 (0.99615…).
    3. Strong positive correlation.
    4. (b)
    5. a = 2.93 (2.9286…) and b = 39.6 (39.571…).
    6. m = 2.93w + 39.6.
    7. (c)
    8. a: the predicted mass increases by 2.93 kg for each extra week of training.
    9. b: the predicted mass is 39.6 kg at w = 0.
    10. (d)
    11. The estimate uses the line of m on w to find w from a value of m, which cannot always be done reliably.
    12. It gives w = 20.6, outside the data range 2 to 14 weeks: extrapolation.

    Trap: Giving extrapolation as the only reason: the line of m on w predicts m from w, and the markscheme gives M0A0 for using the wrong regression line.

Say this, not that

Wording that loses the mark, against the wording the mark scheme credits.

Loses the markGets the mark
Using the line of F on A, rearranged, to estimate A from F (giving 156 cm)attempt to substitute F = 19.8 into the regression line for A on F, giving 157 cm
Looking for the mean point on one line alonerecognition that the lines intersect at the mean point
a = 0.767, with the sign droppeda = -0.767 and b = 130, each with its sign
Putting T = 79 into the equation of T on Lcorrect substitution of 79 into their regression equation, as L = 79
Strong correlation shows that one variable causes the otherCorrelation does not imply causation

Frequently asked questions

What is the difference between positive, negative and zero correlation?
Correlation is positive when y rises as x rises, negative when y falls as x rises, and zero when there is no pattern. Strength is separate: it is strong when the points lie close to a straight line and weak when they are widely spread. A full description gives both the direction and the strength, such as strong negative correlation.
What does Pearson's product-moment correlation coefficient r tell you?
r measures the strength of linear correlation, with -1 ≤ r ≤ 1. Its sign gives the direction, and the closer |r| is to 1, the stronger the correlation. Use technology to calculate it. For the race times against leg length, r = -0.996, so the correlation is strong and negative. It is only meaningful for a linear relationship.
How do you find the equation of a regression line of y on x?
Use technology: enter the two lists and read off a and b in the form y = ax + b. Here a is the gradient, the predicted change in y for each increase of 1 in x, and b is the y-intercept. For the race times, a = -0.767 and b = 130 to three significant figures, with the sign of a kept.
How do you use a regression line to predict a value?
Substitute the given value of x into the regression line. For example, with T = -0.767415… × 79 + 130.345…, a leg length of 79 cm predicts a time of 69.7 seconds. Give the answer to three significant figures with its unit. Using the line outside the range of the data is extrapolation, and the pattern may not continue.
Does a strong correlation mean that one variable causes the other?
No. Correlation does not imply causation: strong correlation shows that two variables move together, but not why. Before claiming a cause, look for another explanation, such as a third variable that affects both. For example, heavy rain could cause both more umbrella sales and more late buses on the same day.
Why is it wrong to use the regression line of y on x to estimate x from a value of y?
The regression line of y on x is fitted to predict y from x, so it cannot always be used reliably to predict x. Choose the line whose subject is the quantity you want to estimate. The markscheme gives M0A0 for choosing the wrong regression line, even if the arithmetic is right.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters