IB Calculator Guide / Regression and correlation
GDC skill · linear regression · exponential regression
Regression on your calculator: linear, exponential and power models
IB Maths AI SL and HL above all (Paper 1 and 2, every session), AA SL and HL for linear regression and $r$. Also the Maths and Physics Internal Assessment.
Regression is where AI students spend most of their calculator time. The procedure is always the same: enter the data in two lists, choose the model, read off the coefficients and the correlation. The marks are lost on three things: typing the data wrongly (check the number of pairs), reading and in the wrong order because the calculator writes the model differently from the question, and quoting when the question wants or vice versa. For non-linear models the AI HL syllabus asks for exponential and power regression, and on two of the three machines the correlation shown is the one for the linearised data.
The example used below
The table shows the number of bacteria (thousands) after hours: . (a) Find the equation of the regression line of on and the value of . (b) Find the exponential model . (c) State which model fits better and why.
Answers
(a) , . (b) . (c) The exponential model: its (for against ) is 0.9999, the data increase faster and faster, and the residuals of the line are not random.
Choose your calculator
The page remembers your choice on the other guides.
TI-Nspire CX II
In one line. Lists & Spreadsheet page: name the columns, type the data, then menu, 4 Statistics, 1 Stat Calculations, and pick the model. r shows automatically.
- 1
Add a Lists & Spreadsheet page. Click the name cell at the top of column A and type t, then ENTER; name column B n. Type the six pairs down the columns.
ctrldoc4: Add Lists & SpreadsheetA: tB: n - 2
Press menu, choose Statistics, then Stat Calculations.
menu4: Statistics1: Stat Calculations - 3
For the line choose Linear Regression (mx+b) if the question writes , or (a+bx) if it writes . Set X List to t and Y List to n, leave the other fields, press OK.
3: Linear Regression (mx+b)X List: tY List: nOK - 4
The results appear in the next two columns: m = 4.34, b = −0.83333, r² = 0.88965, r = 0.94321. Write and .
- 5
For the exponential model repeat with Exponential Regression. The output is : a = 2.0910, b = 1.6381. Power Regression is one entry below.
menu4: Statistics1: Stat CalculationsA: Exponential RegressionOK - 6
To see the fit, add a Data & Statistics page, put t on the horizontal axis and n on the vertical, then menu, 4 Analyze, 6 Regression, and choose the same model.
menu4: Analyze6: Regression
Typed form
LinRegMx t,n and LinRegBx t,n in a Calculator pageExpReg t,n PowerReg t,nstat.results then shows every statistic
Where the TI-Nspire CX II trips people up
- If r and r² do not appear the lists contain a text cell or a blank. Check both columns have exactly six numbers.
- The r reported for Exponential and Power regression is the correlation of the linearised data (ln y against x, or ln y against ln x). Say so if you quote it.
- Column names must start with a letter and cannot be a function name: "n" is fine, "e" or "i" are not.
Casio fx-CG50
In one line. Statistics: type the data in List 1 and List 2, then F2 CALC, F3 REG, and choose the model. Linear is F1 X, exponential and power are behind F6.
- 1
Open Statistics. Type the t values down List 1 (EXE after each) and the N values down List 2.
MENUStatisticsList 1: 0 1 2 3 4 5List 2: 2.1 3.4 5.7 9.0 15.1 24.8 - 2
Open the calculation menu and the regression menu.
F2 CALCF3 REG - 3
For the line choose X, then ax+b (the question says form) or a+bx.
F1 XF1 ax+b - 4
The screen shows a = 4.34, b = −0.8333333, r = 0.9432130, r² = 0.8896507, and MSe. Write , .
- 5
For the exponential model go back with EXIT, then F3 REG, F6 for more, F1 Exp, then F2 ab^x (F1 gives ).
EXITF3 REGF6 ▷F1 ExpF2 ab^x - 6
a = 2.0909735, b = 1.6381118, r = 0.9999059. Write . Power regression is F3 Power in the same menu.
- 7
To draw the points and the curve: from the list screen F1 GRAPH, F1 GPH1, then F1 CALC and choose the model again; F6 DRAW overlays the fit.
F1 GRAPHF1 GPH1F1 CALCF6 DRAW
Typed form
After any regression, F5 COPY pastes the equation into the Graph editor as Y1F6 DRAW draws it over the scatter diagram
Where the Casio fx-CG50 trips people up
- If F2 CALC shows an error, SET (F6) must have 2Var XList as List1 and 2Var YList as List2.
- Exp has two forms: and . The IB AI syllabus uses both; match the question.
- The r shown for Exp and Power is for the linearised data, as on the TI-Nspire.
TI-84 Plus CE
In one line. STAT, 1 Edit for the lists; STAT, CALC, then 4 LinReg(ax+b), 0 ExpReg or A PwrReg. Turn STAT DIAGNOSTICS ON in MODE or r will not appear.
- 1
Once, before the exam: press MODE, scroll down to STAT DIAGNOSTICS and set it to ON. Without this r and r² are hidden.
MODESTAT DIAGNOSTICS: ON - 2
Enter the data: STAT, 1 Edit. Type t in L1 and N in L2.
STAT1: EditL1: 0 1 2 3 4 5L2: 2.1 3.4 5.7 9.0 15.1 24.8 - 3
For the line: STAT, arrow right to CALC, 4 LinReg(ax+b). Xlist L1, Ylist L2, Calculate.
STATCALC4: LinReg(ax+b)Xlist: L1Ylist: L2Calculate - 4
a = 4.34, b = −.8333333, r² = .8896507, r = .943213. Write , . (8 LinReg(a+bx) swaps the letters.)
- 5
For the exponential model: STAT, CALC, 0 ExpReg. Output with a = 2.0909735, b = 1.6381118, r = .9999059.
STATCALC0: ExpRegCalculate - 6
Power regression is A PwrReg in the same menu. To plot: 2nd Y= (STAT PLOT), turn Plot1 On with L1 and L2, then ZOOM 9 ZoomStat. Set Store RegEQ to Y1 in the regression wizard to overlay the fit.
2ndY= (STAT PLOT)Plot1: OnZOOM9: ZoomStat
Typed form
LinReg(ax+b) L1,L2,Y1ExpReg L1,L2,Y1 PwrReg L1,L2,Y1Y1 is found under VARS, Y-VARS, 1 Function
Where the TI-84 Plus CE trips people up
- STAT DIAGNOSTICS OFF is the default on a reset calculator: if r is missing on exam day, this is why. MODE fixes it in five seconds.
- LinReg(ax+b) and LinReg(a+bx) give the same line with the letters swapped. Read the question to see which letter is the gradient.
- A "DIM MISMATCH" error means L1 and L2 have different lengths: a value was skipped or typed twice.
Where the marks go, on any calculator
- Reporting the regression line of on when the question asks for on . The two lines are different: swap the lists.
- Giving when is asked. keeps the sign and tells the direction; is the proportion of variance explained.
- Using the line to extrapolate and not saying that this is unreliable. "Comment on the reliability" wants: outside the data range, so not reliable.
- Describing the correlation as "strong" without the number: the IB wants the adjective and the value, "strong positive, ".
- Not rounding the coefficients consistently: 3 s.f. each unless told otherwise.
What to write on the paper
- Write the equation in the variables of the question, not in and : .
- Write with its sign and a description: , strong positive correlation.
- When the question asks "use your model to estimate", substitute and show the substitution: .
- For exponential and power models state the form: with , .
Questions students ask
- Should I use ax+b or a+bx?
- Use the form the question uses. The IB formula booklet writes the regression line as for the AA course and in the AI booklet too, but questions sometimes define . Both are on every calculator; pick the one that makes the letters match.
- What is the r value for an exponential regression?
- On the TI-Nspire, Casio fx-CG50 and TI-84 Plus CE the r shown for exponential or power regression is the correlation of the transformed data ( against for exponential, against for power). It tells you how linear the transformed data are, which is what you want for choosing between models.
- How many pairs of data do I need?
- As many as the question gives you. The real check is that both lists have the same length as the table; count them before you press Calculate.
- Can I use the GDC for the Spearman rank correlation?
- Yes: rank each list by hand (or with the sort function), put the ranks in two new lists and run a linear regression on the ranks. The it reports is . The GDC has no direct Spearman command.
Practise it
Other calculator skills
Written by Pietro Meloni, PhD, IB Mathematics and Physics tutor. Keystrokes checked on TI-Nspire CX II OS 6, Casio fx-CG50 OS 3 and TI-84 Plus CE OS 5; older systems may number the menus differently. Not affiliated with the International Baccalaureate Organization, Texas Instruments or Casio. Found a key that has moved? Write to pietro@pietromeloni.com.
Initial assessment
Find out what is costing the marks.
Twenty minutes, one to one, online. No charge, no commitment.