IB Maths Help logoIB Maths Help

Statistics

Linear regression (line of best fit) and r

Core AI skill - gives the regression line and the correlation coefficient in one step.

In short: Linear regression finds the line of best fit y = ax + b through paired data, along with the correlation coefficient r. You enter the x and y values in two lists and run the linear regression function. Use the line to predict values within the data range, and use r to judge how strong the linear relationship is.

When you'd use this

TI-84 Plus CECasio fx-CG50 and fx-CG100TI-Nspire CX

At a glance: TI-84 Plus CE, Casio fx-CG50 and TI-Nspire CX compared

 TI-84 Plus CECasio fx-CG50 and fx-CG100TI-Nspire CX
Key sequenceTurn on DiagnosticOn once (2nd → CATALOG) so r appears; then STAT → CALC → 4:LinReg(ax+b), set Xlist and Ylist, Calculate.Statistics menu → CALC (F2) → REG (F3) → X (linear); r shows automatically.Calculator page → menu → Statistics → Stat Calculations → Linear Regression (mx+b).

On a TI-84 Plus CE

  1. Enter x-values in one list and y-values in another.
  2. Turn on DiagnosticOn once (2nd → CATALOG) so r appears; then STAT → CALC → 4:LinReg(ax+b), set Xlist and Ylist, Calculate.
  3. Read a (gradient), b (intercept), r (correlation) and r² (coefficient of determination).
  4. Use the equation to predict - but only within the data range (interpolation).

Tip: r near ±1 means a strong linear fit; near 0 means weak. r² is the proportion of variation explained.

On a Casio fx-CG50 and fx-CG100

  1. Enter x-values in one list and y-values in another.
  2. Statistics menu → CALC (F2) → REG (F3) → X (linear); r shows automatically.
  3. Read a (gradient), b (intercept), r (correlation) and r² (coefficient of determination).
  4. Use the equation to predict - but only within the data range (interpolation).

Tip: r near ±1 means a strong linear fit; near 0 means weak. r² is the proportion of variation explained.

On a TI-Nspire CX

  1. Enter x-values in one list and y-values in another.
  2. Calculator page → menu → Statistics → Stat Calculations → Linear Regression (mx+b).
  3. Read a (gradient), b (intercept), r (correlation) and r² (coefficient of determination).
  4. Use the equation to predict - but only within the data range (interpolation).

Tip: r near ±1 means a strong linear fit; near 0 means weak. r² is the proportion of variation explained.

Related guides

Try it yourself

Here's a real IB-style question that uses exactly this technique.

Medium Calculator Paper 2 [3 marks]

For the data pairs (1, 3), (2, 5), (3, 4), (4, 6), (5, 8), find the equation of the regression line y = ax + b and the value of r, each to 3 significant figures.

y = 1.1x + 1.9, r = 0.904
Mark it
Correct 3 / 3 marks
Worked solution & mark scheme:
M1 Enter the data as two linked lists and run linear regression
A1 y = 1.1x + 1.9
A1 r = 0.904

Common questions

When would I need to find a line of best fit and the correlation coefficient r in IB Maths?

Core AI skill - gives the regression line and the correlation coefficient in one step. A question gives paired data and asks for the equation of the regression line. You need the correlation coefficient r to comment on the strength of a linear relationship.

How do I find a line of best fit and the correlation coefficient r on a TI-84 Plus CE?

1. Enter x-values in one list and y-values in another. 2. Turn on DiagnosticOn once (2nd → CATALOG) so r appears; then STAT → CALC → 4:LinReg(ax+b), set Xlist and Ylist, Calculate. 3. Read a (gradient), b (intercept), r (correlation) and r² (coefficient of determination). 4. Use the equation to predict - but only within the data range (interpolation).

How do I find a line of best fit and the correlation coefficient r on a Casio fx-CG50 and fx-CG100?

1. Enter x-values in one list and y-values in another. 2. Statistics menu → CALC (F2) → REG (F3) → X (linear); r shows automatically. 3. Read a (gradient), b (intercept), r (correlation) and r² (coefficient of determination). 4. Use the equation to predict - but only within the data range (interpolation).

How do I find a line of best fit and the correlation coefficient r on a TI-Nspire CX?

1. Enter x-values in one list and y-values in another. 2. Calculator page → menu → Statistics → Stat Calculations → Linear Regression (mx+b). 3. Read a (gradient), b (intercept), r (correlation) and r² (coefficient of determination). 4. Use the equation to predict - but only within the data range (interpolation).

What should I watch out for when I find a line of best fit and the correlation coefficient r?

r near ±1 means a strong linear fit; near 0 means weak. r² is the proportion of variation explained.

How are marks awarded when I find a line of best fit and the correlation coefficient r in an IB exam?

In the worked example on this page (3 marks, Paper 2), the marks are: M1: Enter the data as two linked lists and run linear regression; A1: y = 1.1x + 1.9; A1: r = 0.904.

Practise with your calculator

Questions that need this technique link back to this guide. Try one in practice mode, or see every GDC guide.