Correlation and regression

Correlation and regression

IB MYP Maths Extended: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • Correlation can be positive, negative or none; it never proves causation.
  • The correlation coefficient rr is between −1-1 and 11: the sign gives direction, ∣r∣|r| gives strength.
  • Use technology to find the line of best fit y=mx+cy=mx+c; the gradient mm is the change in yy for each 11 in xx.
  • Interpolation is usually reliable; extrapolation is usually not.
  • Comment on strength, range, whether the answer is sensible, and the amount of data.

Types of correlation

Positive, negative or none, depending on how the points rise or fall from left to right.

A scatter graph plots two variables for the same items, with one point for each item. Correlation describes the relationship between the variables.

Correlation describes a pattern; it does not prove that one variable causes the other.

12345672468xytrend
Positive correlation (example data): points rise from left to right
12345672468xytrend
Negative correlation (example data): points fall from left to right
12345672468xyno trend
No correlation (example data): no clear pattern

The points on a scatter graph fall from left to right. What type of correlation is this?

The correlation coefficient r

The sign of rr gives the direction and its size gives the strength.

The correlation coefficient rr is found with technology. It is always between −1-1 and 11.

The size ∣r∣|r| gives the strength: close to 11 is strong, around 0.50.5 is moderate, close to 00 is weak or none. r=1r=1 or r=−1r=-1 means all points lie exactly on a straight line.

The strength depends on how close the points are to a line, not on how steep the line is.

−1−0.8−0.6−0.4−0.200.20.40.60.81-1 perfect negative-0.82 strong negative0.1 very weak0.5 moderate0.8 strong positive1 perfect positive
The value of r from −1 to 1

What does r=−0.82r=-0.82 tell you?

Line of best fit using technology

Enter the data in two lists and ask for linear regression: it gives y=mx+cy=mx+c and rr.

Using technology (a graphic display calculator or spreadsheet) enter the data in two lists and ask for linear regression. For temperature TT and drinks sold nn the result is n=3.02T−43.2n=3.02T-43.2 with r=0.990r=0.990.

Interpret the numbers in context. The gradient is about 3 more drinks for every extra degree. The intercept −43.2-43.2 is the value when T=0T=0, which may have no meaning in practice.

20253035404520406080100TnT = 24T = 30T = 36n = 3.02T − 43.2
Line of best fit n = 3.02T − 43.2 for drinks sold at temperature T

What does the gradient 3.023.02 mean in n=3.02T−43.2n=3.02T-43.2?

Interpolation and extrapolation

Predictions inside the range of the data are usually reliable; outside it they are not.

Interpolation is predicting a value inside the range of the data you collected. This is usually reliable, especially when the correlation is strong.

Extrapolation is predicting outside the range, which is usually unreliable because the pattern may not continue.

Data for TT from 2424 to 3636: at T=30T=30 the equation gives 47.447.4 (reliable); at T=45T=45 it gives 92.792.7 (unreliable, outside the data).

20253035404520406080100TnT = 30: reliableT = 45: unreliablen = 3.02T − 43.2
Shaded: the data range (T from 24 to 36). Beyond it is extrapolation

The data covers TT from 2424 to 3636. Is a prediction at T=40T=40 interpolation or extrapolation?

Commenting on reliability

Mention the strength of the correlation, interpolation or extrapolation, whether the value is possible and how much data you have.

When you comment on a prediction, give a reason with every comment.

Check for impossible values too: a predicted car price of −4.6-4.6 thousand AED shows that the model has failed.

Write a short conclusion, for example: "The prediction for 30 °C is reliable because it is within the data and r=0.990r=0.990."

  1. 1

    Strength

    how close is r to 1 or −1?

  2. 2

    Range

    interpolation or extrapolation?

  3. 3

    Sensible

    is the value possible?

  4. 4

    Amount of data

    more points make a better line

Commenting on a prediction

A prediction at T=45T=45 is outside the data and r=0.990r=0.990. What is the best comment?

Try an exam question

The correlation coefficient between the age of a car and its value is r=−0.9r=-0.9. The line of best fit is V=−2.5A+30V=-2.5A+30, where VV is the value in thousands of AED and AA is the age in years, from data for cars aged 1 to 8 years. (a) Describe the correlation. (b) Predict VV when A=6A=6. (c) Comment on a prediction at A=15A=15.

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Which description of the correlation is correct?

1 mark, marked against the mark scheme

Revision notes