Skip to content
IB Diploma ProgrammeSL & HL

Correlation and regression

Mathematics: Applications and Interpretation 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.

~16 min read

1. Scatter diagrams and linear correlation

A scatter diagram plots bivariate data: one point for each pair of values. Linear correlation describes how closely the points follow a straight line. It is positive when y increases as x increases and negative when y decreases as x increases. With no pattern there is no correlation. It is strong when the points lie close to a line and weak when they are spread out.

A line of best fit drawn by eye passes through the mean point (barx, bary). Work out the mean of the x-values and the mean of the y-values, plot that point, and draw the line through it.

Correlation does not imply causation: two variables can rise together without one causing the other. A "describe" question needs the type and the strength. An "explain" question needs the reason.

mean point = (barx, bary), barx = (sum x)/n, bary = (sum y)/n

Worked example 13 marks

A student records, for 8 towns, the number of ice cream shops and the number of cases of sunburn treated each month. On the scatter diagram the points lie close to a straight line that rises from left to right.

(a) Describe the correlation. [2]

(b) The student concludes that more ice cream shops cause more sunburn. Explain why this conclusion is not valid. [1]

  1. 1

    A1: the correlation is positive: sunburn cases increase as the number of shops increases [1]

  2. 2

    A1: the correlation is strong: the points lie close to a straight line [1]

  3. 3

    R1: correlation does not imply causation: the two variables rise together, but one rising does not mean it causes the other [1]

2. Pearson's product-moment correlation coefficient

Pearson's product-moment correlation coefficient, r, measures linear correlation. Find it with the GDC: enter the x-values in one list and the y-values in the other, run linear regression, and read r. The sign of r gives the direction and its size gives the strength.

r is only meaningful for linear relationships.

Where a critical value of r is given, compare it with r. The markscheme credits r > 0.576 (here 0.876 > 0.576) and then an interpretation in context: significant evidence of correlation between entry exam and final exam results.

Worked example 12 marks

Hot air balloons are available in many sizes for different numbers of passengers. The following table shows the recommended minimum volume of a hot air balloon, in cubic metres, for a specific number of passengers.

(a) Use your graphic display calculator to find the Pearson's product-moment correlation coefficient, r, for these values.

Number of Passengers (x)1245715
Recommended Minimum Volume (y)100013502225250031505800
  1. 1

    A2: enter the data in two lists and run linear regression: r = 0.999 (0.998886…) [2]

  2. 2

    r is close to 1, so the correlation is strong and positive

3. The regression line of y on x and prediction

The regression line of y on x is the line y = ax + b found by technology. Write it as an equation, not as two bare numbers: the markscheme requires y = 340x + 742 written in that form.

To predict y for a given x, substitute the value into the equation. The markscheme gives a method mark for an indication of x = 10 in the regression equation, then an accuracy mark for the value.

Use the line to predict y from x, not the other way round, and only within the range of the data (see the last block).

y = ax + b

prediction: put the given x into y = ax + b

Worked example 13 marks

Hot air balloons are available in many sizes for different numbers of passengers. The following table shows the recommended minimum volume of a hot air balloon, in cubic metres, for a specific number of passengers.

(b)(i) Find the equation of the regression line y on x for this data in the form y = ax + b.

(c) Use your regression equation from part (b)(i) to find the recommended minimum volume of a balloon for 10 passengers.

Number of Passengers (x)1245715
Recommended Minimum Volume (y)100013502225250031505800
  1. 1

    (b)(i) A1: y = 340x + 742 (y = 340.379x + 742.015), written as an equation [1]

  2. 2

    (c) M1: indication of x = 10 in the regression equation: y = 340.379(10) + 742.015 [1]

  3. 3

    A1: y = 4150 m³ (4145.81… m³) [1]

4. Interpreting a and b in context

In y = ax + b, the gradient a is the change in y for each increase of 1 in x. The intercept b is the predicted value of y when x = 0. If x = 0 lies outside the range of the data, reading b as a prediction is extrapolation.

An interpretation must be in context: name the variables and give the units. The markscheme credits the volume increasing for each additional passenger, and the final exam result going up by 0.37 as the entry exam result goes up by one. It does not credit anything vague about the gradient.

a = (change in y)/(change in x)

Worked example 11 mark

The examination board uses a model to make a prediction of a student's final exam result (haty) based on their entry exam result (x).

The model used is:

haty = 0.37x + 37.6

Give, in context, an interpretation of the gradient 0.37 in the model.

  1. 1

    A1: as the entry exam result goes up by one, the final exam result goes up by 0.37 [1]

  2. 2

    Not credited: a statement such as "the gradient is 0.37" that is not in context

5. Extrapolation and predicting x from y

A prediction for an x-value outside the range of the data is extrapolation, and extrapolation is dangerous. You cannot always reliably make a prediction of x from a value of y when using a y on x line.

Asked why a prediction may not be accurate, the markscheme credits extrapolation or that the correlation is strong but not close to 1.

Worked example 15 marks

Mysha conducts further analysis on the active lifestyle participants. She asks them to run for 10 minutes on a treadmill at a set speed to determine if there is a relationship between age, x, in years, and heart rate, y, in beats per minute. The data is in the following table.

Mysha uses linear regression to obtain a model for the data.

(f)(i) Find the equation of the regression line of y on x.

Mysha classifies herself as an active 45-year-old.

(g)(i) Use your regression line to calculate a prediction for Mysha's heart rate after running for 10 minutes on the treadmill at the same set speed.

(ii) State a mathematical reason why this may not be an accurate prediction for Mysha's heart rate.

Age (x years)2821252919183133
Heart rate (y beats per minute)121115130128110112135127
  1. 1

    (f)(i) A1A1: y = 1.38x + 87.2 (y = 1.375x + 87.1875) [2]

  2. 2

    (g)(i) M1: substitution of 45 into their regression equation: y = 1.375(45) + 87.1875 [1]

  3. 3

    A1: y = 149 beats per minute (149.0625) [1]

  4. 4

    (ii) A1: extrapolation: Mysha's age is outside of the data range (18 to 33). Or: correlation is strong but not close to 1 [1]

Recap

  • Scatter diagram: positive, negative or no correlation; strong or weak. The line of best fit by eye passes through the mean point (barx, bary). Correlation does not imply causation.
  • Pearson's r comes from the GDC and is only meaningful for linear relationships. Compare r with a critical value when one is given.
  • The regression line of y on x is y = ax + b: write it as an equation, and substitute x to predict y.
  • a is the change in y for each increase of 1 in x. b is the predicted y when x = 0. Always answer in context.
  • Extrapolation, outside the data range, is unreliable. A y on x line cannot always reliably predict x from a value of y.

End-of-chapter exercise

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

  1. The age, in years, and the value, in thousands of dollars, of 30 cars of one model are plotted on a scatter diagram. The points lie close to a straight line that slopes downwards from left to right. Which of the following describes the correlation? A. strong positive; B. weak positive; C. strong negative; D. weak negative1 mark
    Answer
    1. C: strong negative.
    2. The line slopes down, so the correlation is negative (not A or B). The points lie close to the line, so it is strong (not D).

    Trap: Reading a downward slope as "weak" or "positive": the slope gives the sign, and how close the points lie to the line gives the strength.

  2. A survey of 200 children aged 5 to 11 finds a strong positive correlation between shoe size and reading score. A teacher writes: "Bigger feet make children better readers." Explain why the teacher's conclusion is not valid.2 marks
    Answer
    1. Correlation does not imply causation.
    2. Both variables may increase for another reason, such as age: older children have bigger feet and read better.

    Trap: Treating a strong correlation as proof that one variable causes the other.

  3. Do not use a calculator. A student plots four points (2, 5), (4, 9), (6, 10) and (8, 16) and draws a line of best fit by eye. Find the mean point, through which the line passes.2 marks
    Answer
    1. barx = (2 + 4 + 6 + 8)/4 = 20/4 = 5.
    2. bary = (5 + 9 + 10 + 16)/4 = 40/4 = 10.
    3. The mean point is (5, 10).

    Trap: Giving the middle data point, or the total of each list, instead of the mean of each list.

  4. A teacher records the week number, x, and the number of students, y, who are late for the first lesson, over six weeks. Use your graphic display calculator to find r, then describe the correlation. | Week (x) | 1 | 2 | 3 | 4 | 5 | 6 | | --- | --- | --- | --- | --- | --- | --- | | Students late (y) | 9 | 8 | 6 | 6 | 3 | 2 |3 marks
    Answer
    1. r = -0.978 (-0.97807…).
    2. r is negative, so the correlation is negative.
    3. r is close to -1, so the correlation is strong.

    Trap: Writing 0.978 and dropping the minus sign, which changes a negative correlation into a positive one.

  5. A student records the hours, x, spent revising and the test score, y, for six students. (a) Find the equation of the regression line of y on x. (b) Use your equation to predict the score of a student who revises for 4.5 hours. | Hours revising (x) | 1 | 2 | 3 | 4 | 5 | 6 | | --- | --- | --- | --- | --- | --- | --- | | Test score (y) | 42 | 48 | 53 | 61 | 64 | 72 |4 marks
    Answer
    1. (a)
    2. GDC linear regression: a = 5.8857… and b = 36.0667….
    3. y = 5.89x + 36.1.
    4. (b)
    5. y = 5.8857(4.5) + 36.0667 = 62.55….
    6. The predicted score is 62.6.

    Trap: Entering the lists the wrong way round (scores as x) gives a different line, so the prediction is wrong.

  6. A taxi company finds that, for journeys of between 1 and 20 km, the regression line of the fare, F dollars, on the distance, d km, is F = 2.4d + 3.5. (a) Interpret the value 2.4. (b) Interpret the value 3.5.2 marks
    Answer
    1. (a)
    2. For each additional kilometre, the predicted fare increases by 2.4 dollars.
    3. (b)
    4. 3.5 dollars is the predicted fare for a journey of 0 km.
    5. 0 km is outside the data range of 1 to 20 km, so this is extrapolation: 3.5 dollars may not be a real charge.

    Trap: Swapping the two roles, writing "the gradient is 2.4" with no reference to fare and distance, or treating b as reliable when x = 0 is outside the data.

  7. The battery charge, P percent, of a phone is recorded while it streams video for up to 5 hours. The regression line of P on the time, h hours, for 0 ≤ h ≤ 5, is P = -12.5h + 98.1. (a) Predict the charge after 3 hours. (b) A student uses the line to predict the charge after 9 hours. Find this prediction and explain why it should not be trusted.4 marks
    Answer
    1. (a)
    2. P = -12.5(3) + 98.1 = 60.6 percent.
    3. (b)
    4. P = -12.5(9) + 98.1 = -14.4 percent.
    5. 9 hours is outside the data range of 0 to 5 hours, so this is extrapolation.
    6. A charge cannot be negative, so the prediction is impossible.

    Trap: Quoting -14.4 percent as a valid prediction without noticing that 9 hours is outside the data.

  8. Do not use a calculator. For 20 students, the regression line of the percentage mark, y, on the hours revised, x, is y = 4.2x + 31. A student scored 73 and a classmate rearranges the equation to estimate the hours revised. (a) Find the value the classmate gets. (b) State why this estimate may not be reliable.3 marks
    Answer
    1. (a)
    2. 73 = 4.2x + 31, so 4.2x = 42.
    3. x = 42 ÷ 4.2 = 10 hours.
    4. (b)
    5. The line of y on x is for predicting y from x: it cannot always reliably be used to predict x from a value of y.

    Trap: Rearranging a y on x line to predict x from a value of y and trusting the answer.

  9. A marine biologist measures the length, x cm, and the mass, y g, of eight fish of one species. (a) Find the equation of the regression line of y on x. (b) Interpret, in context, the gradient of the line. (c) Interpret the value of b and comment on whether it is meaningful. (d) A fish of mass 500 g is caught but not measured. A student rearranges the equation to estimate its length. Find the student's estimate and state why it may not be reliable. | Length (x cm) | 20 | 22 | 24 | 26 | 28 | 30 | 32 | 34 | | --- | --- | --- | --- | --- | --- | --- | --- | --- | | Mass (y g) | 210 | 265 | 320 | 410 | 470 | 540 | 600 | 690 |7 marks
    Answer
    1. (a)
    2. GDC linear regression: a = 34.2559… and b = -486.785….
    3. y = 34.3x - 487, written as an equation.
    4. (b)
    5. For each additional 1 cm of length, the predicted mass increases by about 34.3 g.
    6. (c)
    7. b = -487 is the predicted mass, in grams, of a fish of length 0 cm.
    8. A mass cannot be negative, and 0 cm is far outside the data range of 20 to 34 cm: this is extrapolation, so b has no meaning in context.
    9. (d)
    10. 500 = 34.2559x - 486.785, so x = 986.785/34.2559 = 28.8 cm.
    11. The line of y on x cannot always reliably be used to predict x from a value of y.

    Trap: Reading b as a real mass without noticing that 0 cm is outside the data, and trusting a y on x line rearranged to predict x.

  10. A company records its monthly advertising spend, x thousand dollars, and its monthly sales, y units, for six months. (a) Find the value of r and the equation of the regression line of y on x. (b) The critical value of r at the 5% significance level for six pairs of data is 0.811. State, with a reason, whether there is significant evidence of correlation. (c) Calculate the sales predicted when x = 40, to the nearest 10 units. The manager says: "The correlation is very strong, so spending 40 thousand dollars will give sales of about 600 units." (d) Evaluate the manager's claim. | Spend (x thousand dollars) | 5 | 8 | 10 | 12 | 15 | 18 | | --- | --- | --- | --- | --- | --- | --- | | Sales (y units) | 120 | 165 | 190 | 215 | 260 | 300 |9 marks
    Answer
    1. (a)
    2. r = 0.9996 (0.99963…).
    3. a = 13.7724… and b = 52.2455…, so y = 13.8x + 52.2.
    4. (b)
    5. 0.9996 > 0.811, so there is significant evidence of correlation between advertising spend and sales.
    6. (c)
    7. y = 13.7724(40) + 52.2455 = 603.1….
    8. The predicted sales are 600 units to the nearest 10.
    9. (d)
    10. The spend of 40 is far outside the data range of 5 to 18: this is extrapolation, so the prediction may not be reliable.
    11. A strong correlation describes the data given and does not show that more spending causes more sales, so the claim is not supported.

    Trap: Accepting a prediction because r is close to 1, without checking that x = 40 lies inside the data range.

Say this, not that

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

Loses the markGets the mark
the gradient is 0.37as the entry exam result goes up by one, the final exam result goes up by 0.37: a statement in context
the regression line is 340.379 and 742.015y = 340x + 742: the line written as an equation
reject H₀ (with no interpretation)reject H₀: there is significant evidence of correlation between entry exam and final exam results

Frequently asked questions

What is the difference between positive and negative correlation on a scatter diagram?
Correlation is positive when y increases as x increases, and negative when y decreases as x increases. With no pattern there is no correlation. Correlation is strong when the points lie close to a straight line and weak when they are spread out.
How do you draw a line of best fit by eye?
Work out the mean point (barx, bary), where barx = (sum x)/n and bary = (sum y)/n. Plot that point and draw the line through it. For the points (2, 5), (4, 9), (6, 10) and (8, 16), the mean point is (5, 10).
What does Pearson's product-moment correlation coefficient r measure?
Pearson's product-moment correlation coefficient, r, measures linear correlation. Find it with the GDC by entering the x-values and y-values in two lists and running linear regression. Its sign gives the direction and its size gives the strength, and it is only meaningful for linear relationships.
How do you interpret the gradient and intercept of a regression line in context?
The gradient a is the change in y for each increase of 1 in x, and the intercept b is the predicted y when x = 0. For the model haty = 0.37x + 37.6, say that as the entry exam result goes up by one, the final exam result goes up by 0.37. Saying only that the gradient is 0.37 is not credited.
Why is a prediction made outside the range of the data unreliable?
A prediction for an x-value outside the range of the data is extrapolation, and extrapolation is dangerous. For a battery model P = -12.5h + 98.1 over 0 to 5 hours, predicting at 9 hours gives -14.4 percent, which is impossible. A line of y on x cannot always reliably predict x from a value of y.
What mistake do students make when a correlation is strong?
They treat a strong correlation as proof that one variable causes the other. Correlation does not imply causation: two variables can rise together without one causing the other. For example, shoe size and reading score both rise with age, so age is another reason both increase.

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