IB Maths Analysis and Approaches SL
Correlation and regression: question types and practice
Correlation and regression carried 2% of the marks in the 20 recent exams, through 3 kinds of question. The one worth the most marks is Regression on the GDC.
The 3 question types
The ideas you need
Scatter diagrams and correlation
Scatter diagrams and correlation
Bivariate data are pairs of values measured on the same thing: the height and the trunk diameter of each tree, the altitude and the temperature of each weather station. A scatter diagram plots each pair as a point . Usually the variable you predict from goes on the horizontal axis () and the variable you predict on the vertical axis (). The question fixes which variable is : keep its letters even when a later part predicts from (The regression line of x on y).
Correlation describes the pattern of the points, in three words:
- direction
- Choose from
- positive / negative / none
- What you see
- positive: tends to increase as increases; negative: tends to decrease as increases
- strength
- Choose from
- strong / moderate / weak
- What you see
- strong: the points lie close to a straight line; weak: they are loosely scattered around one
- form
- Choose from
- linear / non-linear
- What you see
- the points follow a straight line, or a curve
| Describe | Choose from | What you see |
|---|---|---|
| direction | positive / negative / none | positive: tends to increase as increases; negative: tends to decrease as increases |
| strength | strong / moderate / weak | strong: the points lie close to a straight line; weak: they are loosely scattered around one |
| form | linear / non-linear | the points follow a straight line, or a curve |
- A line of best fit by eye passes through the mean point , with roughly as many points above it as below it (SL 4.4). The regression line on the GDC is the exact version of this line (The regression line of y on x).
- Describing a correlation and drawing a line by eye are syllabus content, but neither has been set on its own since 2021: the questions go straight to the GDC.
Mini-example: the points , , and rise from left to right, close to a straight line: a strong positive linear correlation. Their mean point is , so a line of best fit by eye must go through .
The points rise from left to right, close to a straight line: a strong positive linear correlation. Their mean point is , and a line of best fit by eye must pass through it, with about as many points above as below.
Pearson's product-moment correlation coefficient, r
Pearson's product-moment correlation coefficient, r
measures how close the points are to a straight line. It comes from the GDC (linear regression), always with the line.
- . The sign gives the direction; the size gives the strength. or only when every point lies exactly on a line; near means no linear correlation.
- Keep the sign. is a strong negative correlation; writing loses the mark.
- Words for sizes. The IB has no official cut-offs. A common rough guide: above is strong, to moderate, to weak, and below very weak or none.
- is the same for both regression lines, and it has no units: swapping and , or changing the units (metres to centimetres), leaves it unchanged.
- Linear only. A strong curved pattern can have close to (mini-example below). Look at the scatter diagram, not just at .
- Correlation is not causation. A strong does not show that causes : both may depend on a third variable. Know this, but write it only when it is asked about: markschemes give R0 when it is offered as the answer to a different question.
- Critical values of are given in the question when they are needed (SL 4.4): if is bigger than the critical value, the correlation is significant. This has not been set since 2021.
Mini-example: the five points , , , and all lie on , yet : there is a perfect relationship, but no linear one.
All five points lie on the parabola , yet : as increases, falls and then rises, so no straight line fits. measures closeness to a line, so look at the scatter diagram, not only at .
The regression line of y on x
The regression line of y on x
The regression line of on is the line the GDC fits to the data to predict from . It makes the sum of the squares of the vertical distances from the points to the line as small as possible (the least-squares line), which is why it is the line for predicting . The IB writes it as
with the gradient and the -intercept. Some calculator screens use the letters the other way round: copy the numbers by their meaning, not by their letters (linear regression).
- It passes through the mean point . That fact is The mean point.
- Write it with the question's variables and 3 s.f. coefficients: , not . Predict with the unrounded coefficients (keep full-accuracy values).
- in context: the change in for each one-unit increase in , on average, with units and a direction: "for each additional km, the time decreases by 0.176 minutes, on average". A change in changes the predicted by times that change: the cancels (gradient).
- in context: the predicted when . It is often meaningless, because is far outside the data.
Mini-example: for 12 flats in one town, the regression line of the monthly rent dollars on the floor area m² is , for .
- : each additional square metre adds about dollars to the monthly rent. A flat m² larger is predicted to cost dollars more.
- : the predicted rent of a flat with no floor area. Meaningless: is far outside the data.
- An m² flat: dollars.
The gradient is the extra rent for each extra square metre, so a flat m² larger costs about dollars more, and an m² flat is predicted at dollars. The intercept , the rent of a flat with no floor area, lies far outside the data, in the dashed stretch.
The regression line of x on y
The regression line of x on y
To predict from , swap the roles: the regression line of on , , makes the sum of the squares of the horizontal distances as small as possible. On the GDC, swap the two lists (linear regression).
- It is a different line. Rearranging to make the subject does not give it, unless . The weaker the correlation, the further apart the two lines are.
- Both lines pass through , so they cross there: near the mean point they give almost the same estimates, and far from it they differ most.
- The rule: the variable you want to predict must be the subject of the line. from : the line of on . from : the line of on .
- "Of … on …": in "the regression line of on ", the variable after "of" () is the one predicted, and the one after "on" () is used to predict it.
Mini-example: for the five points , , , , :
- on : . on : , that is, .
- To estimate when : the line of on gives . Rearranging the -on- line would give : a different number, and the wrong method.
- Check: both lines pass through the mean point : and ✓
- on
- on
Two different lines through the same points, both through the mean point : the line of on makes the vertical gaps smallest, the line of on the horizontal ones. To estimate when , read the second line: .
How far to trust a prediction
How far to trust a prediction
A regression prediction is only as good as the data behind it. Four reasons to distrust one:
- extrapolation
- What it means
- the value you substitute is outside the range of the data
- How to say it
- " is outside the range of the data (… to …), so this is extrapolation: the trend may not continue"
- weak correlation
- What it means
- is small, so the points are far from the line
- How to say it
- " is close to : the line does not fit the data well"
- the wrong line
- What it means
- predicted with the line of on
- How to say it
- "the line of on is for predicting ; to predict , use the line of on "
- a different population
- What it means
- the data came from a different group, place or time
- How to say it
- "the data only describe …"
| Reason | What it means | How to say it |
|---|---|---|
| extrapolation | the value you substitute is outside the range of the data | " is outside the range of the data (… to …), so this is extrapolation: the trend may not continue" |
| weak correlation | is small, so the points are far from the line | " is close to : the line does not fit the data well" |
| the wrong line | predicted with the line of on | "the line of on is for predicting ; to predict , use the line of on " |
| a different population | the data came from a different group, place or time | "the data only describe …" |
- Interpolation (a value inside the data range) with a strong is reliable. That is the usual case in a first prediction.
- The mark is for the reason, in context. Markschemes give the mark for naming extrapolation with the value that is outside the data (a year beyond the last one recorded); "the estimate is not accurate" names nothing.
Mini-example: for the rent line above (), an estimate for is an interpolation, and reliable if is close to . An estimate for is an extrapolation and unreliable. If were , even the estimate for would be unreliable.
Line, x from y, or means: which type?
- paired data in a table, or the line of on itself
- Asked for
- the line, , an estimate of , the change in for a change in , what and mean, or how far to trust an estimate
- First move
- linear regression of on on the GDC (or use the given line)
- paired data, or both regression lines
- Asked for
- an estimate of from a value of (or any estimate, when both lines are given)
- First move
- the line whose subject is the variable you estimate
- Type
- Predict x from y
- both lines, or one line and one mean, or a scatter diagram
- Asked for
- and , where the lines meet, or the line drawn
- First move
- the mean point lies on every regression line
- Type
- The mean point
- a data table with one value missing, and the regression line
- Asked for
- the missing value
- First move
- (or ) from the line, then total mean
- Type
- Work backwards from the mean or median, after The mean point for the mean
- two exact points, or a gradient and a point, and no data set
- Asked for
- the equation of a line
- First move
- from two points, then
- a model given in full, as a formula or in words (a percentage growth, an exponential)
- Asked for
- a value of the model
- First move
- substitute: no regression
| Given | Asked for | First move | Type |
|---|---|---|---|
| paired data in a table, or the line of on itself | the line, , an estimate of , the change in for a change in , what and mean, or how far to trust an estimate | linear regression of on on the GDC (or use the given line) | Regression on the GDC |
| paired data, or both regression lines | an estimate of from a value of (or any estimate, when both lines are given) | the line whose subject is the variable you estimate | Predict x from y |
| both lines, or one line and one mean, or a scatter diagram | and , where the lines meet, or the line drawn | the mean point lies on every regression line | The mean point |
| a data table with one value missing, and the regression line | the missing value | (or ) from the line, then total mean | Work backwards from the mean or median, after The mean point for the mean |
| two exact points, or a gradient and a point, and no data set | the equation of a line | from two points, then | Equation of a straight line |
| a model given in full, as a formula or in words (a percentage growth, an exponential) | a value of the model | substitute: no regression | Arithmetic or geometric in context, Exponential and log models |
Where regression hides in other topics
Where regression hides in other topics
Regression turns up next to other models, usually as the part that is fitted to data while the other model is given as a formula. The first move is to notice which model came from the data and which was given.
- A percentage-growth prediction next to recorded data (Arithmetic or geometric in context, SL 1.3)
- It becomes
- a geometric term (the first term times the common ratio to the power ) for the given model and a regression prediction for the data, then a comparison (Regression on the GDC, Example 1.4)
- Watch for
- count the steps the same way in both: nine years after 2019 is and
- A "linear model" for yearly data (Arithmetic sequences, SL 1.2)
- It becomes
- the regression line's values at form an arithmetic sequence with common difference
- Watch for
- the line need not pass through the first recorded value, so is the line's value, not the data's
- A line with a known gradient through a known point (Equation of a straight line)
- It becomes
- a regression line through the mean point: gradient through gives
- Watch for
- the mean point is the only point certain to be on a regression line
- A value missing from a data table (Work backwards from the mean or median)
- It becomes
- total mean, with the mean taken from the regression line (The mean point, Example 3.2)
- Watch for
- the line need not pass through any data point: only the mean point is certain to be on it
- A given model whose value is used later (Values of f, f∘g and f⁻¹, Exponential and log models)
- It becomes
- the model's value is the input of a regression estimate (Predict x from y, Example 2.2)
- Watch for
- keep the value unrounded; fitting an exponential curve to data is AI, not AA
| You see | It becomes | Watch for |
|---|---|---|
| A percentage-growth prediction next to recorded data (Arithmetic or geometric in context, SL 1.3) | a geometric term (the first term times the common ratio to the power ) for the given model and a regression prediction for the data, then a comparison (Regression on the GDC, Example 1.4) | count the steps the same way in both: nine years after 2019 is and |
| A "linear model" for yearly data (Arithmetic sequences, SL 1.2) | the regression line's values at form an arithmetic sequence with common difference | the line need not pass through the first recorded value, so is the line's value, not the data's |
| A line with a known gradient through a known point (Equation of a straight line) | a regression line through the mean point: gradient through gives | the mean point is the only point certain to be on a regression line |
| A value missing from a data table (Work backwards from the mean or median) | total mean, with the mean taken from the regression line (The mean point, Example 3.2) | the line need not pass through any data point: only the mean point is certain to be on it |
| A given model whose value is used later (Values of f, f∘g and f⁻¹, Exponential and log models) | the model's value is the input of a regression estimate (Predict x from y, Example 2.2) | keep the value unrounded; fitting an exponential curve to data is AI, not AA |
More in Statistics and probability
Every topic of the course
- The binomial theorem
- Exponents and logarithms
- Proof
- Sequences and series
- Exponential and logarithmic functions
- Composite and inverse functions
- Lines and graphs of functions
- Quadratics
- Reciprocal and rational functions
- Transformations of graphs
- Radians, arcs and sectors
- 3D geometry: solids and triangles in 3D
- Triangle trigonometry
- The unit circle, identities and trig equations
- Trig graphs and sinusoidal models
- Differentiation
- Integration and areas
- Kinematics
- Stationary points and optimisation