IA modelling, step by step · comparing models
Choosing and comparing models: residuals, R², SSR and testing
A good modelling IA does not just fit a curve — it argues for one. This page fits four models to the same data, compares them in four different ways, and shows the one that fits best is not always the one to choose.
Example data, invented for this guide. The context is realistic, but the numbers were made up to show the method. Use your own measured or sourced data in your IA.
The data and four candidates
A student learning to touch-type records their speed on a 1-minute test at the end of chosen practice days. From the shape (rising, bending over) and the context (skill improves quickly, then more slowly), four candidates are reasonable: a line as the baseline, a quadratic, a logarithmic model and a power model.
| i | x: Day of practice | y: Typing speed (words per minute) |
|---|---|---|
| 1 | 1 | 18 |
| 2 | 2 | 25 |
| 3 | 3 | 27 |
| 4 | 5 | 33 |
| 5 | 7 | 35 |
| 6 | 10 | 39 |
| 7 | 14 | 41 |
| 8 | 20 | 45 |
| 9 | 28 | 48 |
1. How well does each fit? SSR, R² and RMSE
| Model | Parameters | SSR | R² | RMSE |
|---|---|---|---|---|
| Logarithmic | 2 | 2.440 | 0.9969 | 0.521 |
| Power | 2 | 17.76 | 0.9771 | 1.40 |
| Quadratic regression | 3 | 35.96 | 0.9537 | 2.00 |
| Straight line (least squares) | 2 | 130.0 | 0.8325 | 3.80 |
On these numbers alone the logarithmic fits best (lowest SSR), with the power close behind. But the table is only the start.
Why R² can mislead
- R² can only go up when you add parameters: a quadratic always has at least the R² of a line, a cubic at least that of a quadratic. Compare models with the same number of parameters, or account for the extra ones.
- For models fitted after a transformation (ln y, ln x and ln y), a calculator's r or R² describes the straight line in the transformed units, not the fit to your original data. Compute SSR in the original units (as in the table above) to compare fairly.
- For non-linear models, R² = 1 − SSR/SST is still a useful summary, but it no longer equals the square of a correlation coefficient and it can mislead for curves that do not include a constant term. Treat it as one piece of evidence.
- A high R² does not show the shape is right. The line above has R² = 0.8325 — high-looking — yet its residuals show a clear pattern.
2. Look at the residual plots
A model has captured the shape when its residuals look like random scatter about zero. A curve, a trend or a funnel shape in the residuals is information the model has missed.
In the full worked example
- 3. Test on points you did not use: fit on seven points, predict the other two
- 4. Extrapolation and the domain
- 5. Choose, and justify the choice
- What SL and HL examiners expect
- Is your comparison good enough? The checklist
Chosen a model? Next, evaluate it and check accuracy and rounding. The free Grapher's Compare models runs the same test on points you did not use, with your own data.
How this earns marks
Every step of a model maps onto the assessment criteria. What examiners look for, criterion by criterion:
- A Criterion A (Presentation): Put the data, the graph, the model, the checks and the comparison in the order you discuss them; caption every graph and table; move long tables to an appendix.
- B Criterion B (Mathematical communication): Define every variable with units and domain, write models in proper notation (x², not x^2; ≈ for rounded values), and label every graph's axes with units.
- C Criterion C (Personal engagement): Choose the model from your own context and say why before fitting it; make and explain your own decisions (which points, which asymptote, which period).
- D Criterion D (Reflection): Interpret the parameters in context, read the residual plot, compare models, test predictions on data you did not use, and state the domain and limitations.
- E Criterion E (Use of mathematics): Fit correctly and show one fit in full; explain what technology did; use residuals, SSR and R² with understanding (R² can mislead for non-linear and transformed fits). At HL, more sophistication and rigour — for example deriving least squares or refining a model with calculus.
The criterion names are the current IB criteria (exams up to 2028); the advice is our summary, not the IB's wording. The most common mark-losing mistakes in modelling IAs, by criterion: see the list.
Works with Desmos, GeoGebra and spreadsheets
Already have your data in Desmos, GeoGebra, Google Sheets or Excel? Paste it straight into Model my data for the step-by-step method with your numbers, then send the model back.
Copy the table cells (or the lists x_1=[…] and y_1=[…]) → paste into the helper → copy the data, the Desmos regression, a GeoGebra command or a CSV back. Nothing is uploaded: it goes through your clipboard. Desmos is a trademark of Desmos Studio PBC and GeoGebra a trademark of GeoGebra GmbH; IB Math Revision is not affiliated with or endorsed by either.
Frequently asked questions
Should I choose the model with the highest R²?
Not automatically. R² rises with extra parameters and can mislead for transformed or non-linear fits. Use it together with residual plots, SSR in the original units, the number of parameters, the context and a test on data you did not fit.
What is a residual plot?
A graph of the residuals (data minus model) against x. If the model has captured the shape, the points scatter randomly about zero; a curve or trend means it has missed something.
How do I test a model on data I did not use?
Hold back one or two points (or collect extra ones), fit the model to the rest, and compare its predictions with the held-back values. Report the errors, for example as a sum of squared errors.
Next steps
- Criterion E: use of mathematicsWhat “maths at the level of the course” means for a model, at SL and HL.
- Criterion D: reflectionJudging a model: residuals, comparisons, limitations and implications.
- Self-check your draftTick through the criteria for your own exploration.
- Get feedback on your write-upCriterion-by-criterion feedback on your draft, with evidence from your own text.
- Exemplar: Hanging chain (AA SL)AA SL · a complete exploration that fits this kind of model, marked criterion by criterion.
- Exemplar: Sinusoidal sea temperature (AI SL)AI SL · a complete exploration that fits this kind of model, marked criterion by criterion.
Related models: Straight line y = mx + c · Logarithmic y = a ln x + b. Or model your own data, and see what the IA package adds.
Free: the IA checklist, criterion by criterion
Every check for Criteria A–E in a 4-page PDF, the mistakes that cost the most marks and a self-assessment grid. We'll email it to you, and for three weeks your weekly email carries one IA tip, timed to your deadline if you give it. Free — no account, no payment.
While you wait for the email: read the full modelling workflow →