IB Maths AI HL Non-linear Regression Paper 1 & 2 ~8 min read

Linearising using Logarithms

Logs don’t just straighten curves on a graph — they let you find the curve’s equation using ordinary linear regression. Take logs of an exponential (y = abx) or a power (y = axb) model and it rearranges into Y = mX + c. Fit that straight line on your GDC, then equate coefficients to recover a and b. The four-step routine is always the same; the one thing to watch is that the GDC’s “a” and “b” from its line are not the a and b of your model.

📘 What you need to know

The two linearisations

Taking logs and splitting the powers turns each model into a straight line. Compare them side by side — the difference is what you put on the X-axis.

how each model rearranges into Y = mX + c
EXPONENTIAL y = abˣ take ln of both sides ↓ ln y = ln a + x ln b Y = mX + c Y = ln y X = x m = ln b c = ln a semi-log POWER y = axᵇ take ln of both sides ↓ ln y = ln a + b ln x Y = mX + c Y = ln y X = ln x m = b c = ln a log-log
Exponential logs only the y (so X = x); power logs both (so X = ln x). In both, Y = ln y and c = ln a.
Exponential y = abxPower y = axb
Logged formln y = ln a + x ln bln y = ln a + b ln x
X =xln x
gradient m =ln bb
intercept c =ln aln a
recovera = ec, b = ema = ec, b = m

🧠 Memory aid — “a is always e^c; only b changes”

In both models the intercept gives a = ec. The only difference is b: for a power model b is the gradient itself (b = m); for an exponential model the gradient is ln b, so b = em. Power = plain gradient, exponential = e of the gradient.

The four-step method

🧭 Recipe — finding a and b from linearised data

  1. Linearise: set Y = ln y, and X = x (exponential) or X = ln x (power).
  2. Find the regression line of Y on X: Y = mX + c (the GDC gives m as its “a“, c as its “b“).
  3. Equate coefficients with the logged model (m = ln b or b; c = ln a).
  4. Solve: a = ec; b = em (exponential) or b = m (power).

🤔 Why do the GDC’s a and b not match the model’s?

When you run a linear regression, the GDC always labels its output y = ax + b — that’s its naming, for the straight line through your logged points. But your model’s a and b live inside y = abx or axb. So the GDC’s “a” is your gradient m, and the GDC’s “b” is your intercept c. Always rename them to m and c before equating, or you’ll mix up four different constants.

Rename first: GDC’s a → your m (gradient), GDC’s b → your c (intercept). Then apply a = ec and the right rule for b.

Worked examples

WE 1

Set up the linear form (exponential)

For the model y = abx, write it in linear form and state X, m and c.

take ln of both sides ln y = ln a + x ln b match to Y = mX + c Y = ln y, X = x m = ln b, c = ln a plot ln y against x (semi-log) exponential: only y is logged, so X = x.
WE 2

Find a and b (exponential)

An exponential model h = abt is linearised with x = t, y = ln h. The regression line of y on x is y = 4.382 − 1.005x. Find a and b.

logged model: ln h = ln a + t ln b equate coefficients c = ln a = 4.382 → a = e^4.382 = 79.99… m = ln b = −1.005 → b = e^−1.005 = 0.36604… a = 80.0, b = 0.366 (3 sf) exponential: a = e^c, b = e^m.
WE 3

Set up the linear form (power)

For the model y = axb, write it in linear form and state X, m and c.

take ln of both sides ln y = ln a + b ln x match to Y = mX + c Y = ln y, X = ln x m = b, c = ln a plot ln y against ln x (log-log) power: both logged, so X = ln x and the gradient IS b.
WE 4

Find a and b (power)

A power model t = ahb is coded with x = ln h, y = ln t. The regression line of y on x is y = 0.3 − 1.2x. Find a and b.

logged model: ln t = ln a + b ln h equate coefficients c = ln a = 0.3 → a = e^0.3 = 1.3498… m = b = −1.2 a = 1.35 (3 sf), b = −1.2 power: a = e^c, but b is just the gradient (no e needed).
WE 5

Don’t confuse the GDC’s constants

A student fits a power model and the GDC reports the regression line as a = 2.5, b = 1.6. They write the model as y = 2.5x1.6. What’s their error?

the GDC’s a, b are the LINE’s gradient & intercept m = 2.5 (gradient), c = 1.6 (intercept) recover the model’s constants b = m = 2.5 a = e^c = e^1.6 = 4.95… correct model: y = 4.95 x^2.5 never plug the GDC’s a, b straight in — rename to m, c first.

💡 Top tips

⚠ Common mistakes

That completes the Non-linear Regression unit! You can now fit curves with a GDC, compare them with SSres and R2, read off log scales, and linearise power and exponential models to recover their parameters. These modelling skills are central to Paper 2 and a popular route for the IA.

Need help with Non-linear Regression?

Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.

Book Free Session →