Linear Regression (AA HL)
The regression line of on is the straight line that models how changes with , and it passes through the mean point . Find and using technology, then substitute an -value to predict . It also covers interpreting and in context and the limits of prediction. It's part of the broader Bivariate Statistics topic.
19 questions on this sub-topic.
Syllabus
| Code | Syllabus content |
|---|---|
| SL4.4 | Linear correlation of bivariate data; Pearson's product-moment correlation coefficient , found using technology. Scatter diagrams; lines of best fit by eye, through the mean point. Distinction between correlation and causation. Equation of the regression line of on , and use for prediction, including the dangers of extrapolation. Interpreting the parameters and in . |
Official IB source: Mathematics: analysis and approaches subject brief (PDF, ibo.org).
Skills practised on this page:
- Calculate the Pearson's product-moment correlation coefficient using technology, and interpret its strength and direction.
- Find the equation of the regression line of y on x using technology.
- Use the regression line of y on x for prediction, interpret its parameters a and b in context, and explain the danger of extrapolation.
The regression line
Regression line of y on x
Given on the formula booklet, but on paper you normally read and straight off your GDC's linear regression output rather than computing and by hand.
Using it for prediction
Substitute the -value into .
Only reliable for -values inside the range of the original data - predicting outside that range is extrapolation, and the trend may not hold there.
Need the full syllabus wording and the wider statistics formula table? See Bivariate Statistics. For calculator steps, see the parent topic's GDC guidance.
Key terms
What does the gradient mean?
In , the gradient is the predicted change in for each increase of one unit in . Its sign matches the direction of the correlation.
e.g. In , each extra unit of increases the predicted by .
What does the intercept mean?
is the predicted value of when . It may have no sensible meaning in context if lies far outside the data.
e.g. In , the intercept is the predicted when .
What is the difference between interpolation and extrapolation?
Interpolation predicts for an -value inside the range of the data, and is more reliable when the correlation is strong. Extrapolation predicts outside that range, where the linear pattern may not continue.
e.g. If the data cover from to , predicting at is interpolation but predicting at is extrapolation.
What is the mean point?
The mean point is , whose coordinates are the mean of the -values and the mean of the -values. The regression line of on always passes through it.
e.g. If and , the line passes through , since .
Worked examples
A regression line is Estimate when
Worked solution
M1
A1
A data set gives and regression line .
(a) Describe the correlation.
(b) Estimate when .
Worked solution
(a) is close to , giving a strong positive linear correlation. A1
(b) Estimate. M1
A1On the GDC. Estimate y when x = 10. The calculator shows about 17. The calculator steps below are for (b).
The regression line of on is A new variable is used (a shift).
(a) Express the regression line of on
(b) State the effect of the shift on the correlation coefficient.
Worked solution
(a) , so M1
A1
A1
(b) A shift (adding a constant) does not change M1
- correlation is invariant under translation. A1
Common mistakes
- Extrapolating beyond the data range. Using the regression line to predict far outside the -values that were actually collected is unreliable, since there's no evidence the linear trend continues.
- Using the y on x line to predict x from y. The two regression lines are generally different - predicting from a given needs the on line, not a rearrangement of the on line.
- Rounding and too early. If you round the gradient and intercept before substituting, small errors compound - carry extra decimal places (or use exact GDC values) until the final answer.
Using your GDC
Every step below is a real button sequence, not a vague "use your calculator" hint - covering the TI-84 Plus, TI-Nspire, and Casio fx-9860/fx-CG50. Pick your model to filter down to just the steps that apply to you.
Gives the regression line and the correlation coefficient in one step - the core skill for this whole topic.
- Enter x-values in one list and y-values in another.
- Turn on DiagnosticOn once (2nd → CATALOG) so appears; then STAT → CALC → 4:LinReg(ax+b), set Xlist and Ylist, Calculate.TI-84
- Calculator page → menu → Statistics → Stat Calculations → Linear Regression (mx+b).Nspire
- Statistics menu → CALC (F2) → REG (F3) → X (linear); shows automatically.Casio
- Read (gradient), (intercept), (correlation) and (coefficient of determination).
- Use the equation to predict - but only within the data range (interpolation).
Tip: near means a strong linear fit; near means weak. is the proportion of variation explained.
Lists let you store paired data sets without re-entering values - essential for setting up and columns before running a regression.
- Enter data manually: go to the list editor and type -values and -values into two separate lists.
- 2nd → STAT (LIST) → OPS lets you sort or clear a list. Use L1 for , L2 for , and reference both together in LinReg.TI-84
- In a Lists & Spreadsheet page, use two named columns for and so both are available together for regression.Nspire
- In Statistics list editor, enter -values in List 1 and -values in List 2 before running REG.Casio
- Keep the and lists the same length and in matching pairs - a mismatched row shifts every pair after it.
Tip: Double-check the lists are paired correctly before running a regression - a single mistyped value can shift noticeably.
See the full GDC guide for more calculator models and topics.
Quick questions
What is the equation of the regression line of y on x?
, where and . In practice you read and directly off your GDC's linear regression output.
Why shouldn't I use the regression line to extrapolate?
The line only models the trend across the -values actually collected. Outside that range there's no evidence the linear pattern continues, so a prediction there can be unreliable or meaningless.
How do I know if a prediction from the regression line is reliable?
It is more reliable when is close to and the -value lies within the range of the data. A weak correlation, or an -value outside the data range, makes the prediction unreliable.
Can I use the line of y on x to predict x from a given y?
No. The line is built to predict from , so substituting a -value to find is not valid.
How do I calculate a prediction for a given x-value?
Substitute the -value into the equation of the line. For and , .
Ready to practise properly?
19 linear-regression questions, marked instantly like the real exam.