Correlation & regression
Scatter diagrams, Pearson’s correlation coefficient , and the regression line of on , all from the GDC. Then the parts examiners care about most: interpreting and the parameters of the line, and knowing when a prediction can be trusted.
1What you need to know
Tick these off as you go. By the end of the page you should be able to do all of them without notes.
- Describe correlation from a scatter diagram: positive, negative or none; strong or weakSL 4.4
- Find Pearson’s with the GDC and interpret it, including against a critical valueSL 4.4
- Draw a line of best fit by eye through the mean point SL 4.4
- Find the regression line with the GDC and interpret and SL 4.4
- Use the line for prediction, and explain the dangers of extrapolationSL 4.4
- Know that correlation does not imply causationSL 4.4
2Notes & worked examples
Each idea is followed by a worked example. Try the question yourself first, then reveal the solution one step at a time.
Pearson’s measures how close the points are to a straight line, from (perfect negative) through 0 (no linear correlation) to (perfect positive). The regression line is the best straight line through the data, and it lets you predict from . But a line is only as good as the data behind it: predictions outside the data, or from weak correlation, are unreliable.
2.1 Describing correlation
| Description | |
|---|---|
| strong | |
| moderate | |
| weak | |
| very weak or none |
These boundaries are a common convention, not a fixed rule. The sign gives the direction: positive (as increases, increases) or negative.
If a question gives a critical value of for the sample size, the correlation is significant when is greater than the critical value. Remember that only measures linear correlation, and that correlation does not show that one variable causes the other.
2.2 The regression line on the GDC
(gradient): the change in for each increase of 1 in . Here, each extra hour of study adds about 3.9 marks.
(intercept): the value of when . Here, a student who did not study is predicted to score about 38. Only interpret if makes sense in context.
The line always passes through the mean point .
2.3 When to trust a prediction
- Interpolation (inside the range of the data) with strong correlation: reliable.
- Extrapolation (outside the range): unreliable, because the pattern may not continue.
- Weak correlation: any prediction is unreliable.
- The line of on predicts from . Do not use it to predict from .
Put in one list and in another. menu → Statistics → Stat Calculations → Linear Regression (ax+b): choose the X List and Y List. The output gives , , and . To see the scatter diagram and line, use a Data & Statistics page: put the lists on the axes, then menu → Analyze → Regression → Show Linear (ax+b).
3Explore it
Move the last data point. Watch how one unusual point changes and pulls the regression line. The cross marks the mean point.
4Common mistakes & exam tips
Common mistakes
- Describing as "weak" because it is negative. The sign is the direction; the size is the strength.
- Saying that correlation proves one variable causes the other.
- Using the regression line far outside the data without comment.
- Predicting from using the line of on .
- Interpreting the intercept when makes no sense in context.
Exam tips
- Write to 3 s.f. and describe it in words: "strong positive linear correlation".
- When asked to interpret , use the context and the units: "each extra hour adds about 3.9 marks".
- "Is the prediction reliable?" Comment on two things: the strength of , and whether it is interpolation or extrapolation.
- If a critical value is given, compare with it and state the conclusion in context.
5Practice
Fluency questions build the basics. Problem-solving questions make you think about which method to use.
6Exam-style questions
Original questions in the style of the IB Maths AI SL exam, with full markschemes. Your GDC is allowed throughout: use it, but write down what you entered and what it gave you. Give yourself about 1 minute per mark.
The daily maximum temperature (°C) and the number of cold drinks sold at a kiosk were recorded on 9 days.
| 18 | 20 | 22 | 24 | 25 | 27 | 29 | 31 | 33 | |
| 120 | 135 | 150 | 160 | 175 | 180 | 200 | 210 | 230 |
- (a)Find Pearson’s product-moment correlation coefficient, .[2]
- (b)Find the equation of the regression line of on .[2]
- (c)Use your line to estimate the sales on a day with a maximum of 26 °C.[2]
- (d)Interpret the gradient of the line in context.[1]
| (a) | |
| A2 | |
| (b) | |
| A1A1 | |
| (c) | |
| (M1) | |
| 177 drinks | A1 |
| (d) | |
| about 7 more drinks are sold for each 1 °C rise in temperature | R1 |
For 12 students, Pearson’s correlation coefficient between hours of sleep and a reaction-time score is . The critical value at the 5% level for 12 pairs is 0.576.
- (a)Describe the correlation.[1]
- (b)Determine whether the correlation is significant at the 5% level. Justify your answer.[2]
- (c)A newspaper says "less sleep causes slower reactions". Comment on this claim.[2]
| (a) | |
| moderate negative (linear) correlation | A1 |
| (b) | |
| M1 | |
| significant | A1 |
| (c) | |
| correlation does not show causation | R1 |
| another factor may affect both (for example, stress or age) | R1 |
The age (years) and price (thousands of euros) of eight cars of the same model are: , , , , , , , .
- (a)Find the regression line of on .[2]
- (b)Interpret the value of the -intercept in context.[1]
- (c)Use the line to estimate the price of a car that is 5.5 years old.[2]
- (d)Explain why the line should not be used to estimate the price of a 15-year-old car.[2]
| (a) | |
| A1A1 | |
| (b) | |
| the estimated price of a new car (age 0) is about €25 400 | R1 |
| (c) | |
| (M1) | |
| €14 500 thousand | A1 |
| (d) | |
| 15 is outside the range of the data (extrapolation) | R1 |
| the line predicts a negative price, which is impossible | R1 |
7Check yourself
Six quick questions, marked instantly. Aim for 6/6 before moving on. Fractions like 3/2 are accepted.
8Past-paper practice
Once you're scoring well above, try these real IB Maths AI SL questions. Your school or teacher will have the papers.
| Paper | Question | Focus | Difficulty |
|---|---|---|---|
| May 2024 · TZ1 · Paper 2 | Q1 | Apartment price vs distance: r, rₛ, regression line, reliability | ★★★ |
| May 2025 · TZ1 · Paper 1 | Q1 | Balloon volume vs passengers: r, regression line, interpret the gradient | ★★☆ |
| May 2026 · TZ1 · Paper 1 | Q4 | Temperature vs children in a park: r, regression line, validity of a prediction | ★★☆ |
| Nov 2023 · TZ1 · Paper 1 | Q1 | Walking time vs gradient: regression line, describe correlation, estimate | ★★☆ |
