# Non-linear regression models

> IB Mathematics Applications and Interpretation HL · Statistics and probability
> Source: https://www.owlsprep.com/study/ib-math-ai-hl-u5-non-linear-regression-models/

This module covers transforming common non-linear relationships (exponential, power, logarithmic) to linear form, fitting regression models, interpreting parameters, and making predictions for real-world bivariate data.

**Prerequisites:** [Linear regression and correlation](https://www.owlsprep.com/study/ib-math-ai-hl-u5-linear-regression/); [Logarithm properties](https://www.owlsprep.com/study/ib-math-ai-hl-u2-logarithms-exponentials/)

## Learning objectives

- Transform common non-linear relationships to linear form for regression
- Fit exponential, power and logarithmic non-linear models to bivariate data
- Interpret parameters of fitted non-linear models in context
- Use non-linear regression models for prediction

## Common Non-Linear Regression Models

Many real-world bivariate relationships between an independent variable $x$ and dependent variable $y$ are not straight-line linear. Linear regression will produce a poor fit for these curved trends, so we use non-linear regression to match the pattern of the data.

**Non-linear regression** — A statistical technique that models the relationship between two variables as a non-linear function, to better describe curved trends in observed data.

*Example:* Population growth over time, radioactive decay, and the relationship between the volume and radius of a sphere are all non-linear.

- Exponential growth/decay: $y = ab^x$
- Power model: $y = ax^b$
- Logarithmic model: $y = a + b\ln x$
- Reciprocal model: $y = a + \frac{b}{x}$

**Worked example:** Identify which standard non-linear model matches the description: The stopping distance $d$ of a car after braking is proportional to the square of its speed $v$.

1. Translate the proportional relationship to a mathematical equation:
2. $$d = k v^2$$
3. Match the equation to standard non-linear model forms. Here, $y=d$, $x=v$, $a=k$, and $b=2$.
4. This matches the power model form $y = ax^b$, so this is a power non-linear relationship.

## Linearizing Non-Linear Models

To use standard linear regression to find the parameters of non-linear models, we transform the non-linear equation into the standard linear form $Y = mX + c$, where $Y$ and/or $X$ are transformations of the original $y$ and $x$ variables.

> **tip**
>
> The logarithm product rule $\log(ab) = \log a + \log b$ and power rule $\log(a^b) = b\log a$ are essential for correct linearization of exponential and power models.

| Model | Original Equation | Transformed Form | $Y$ | $X$ | Slope $m$ | Intercept $c$ |
| --- | --- | --- | --- | --- | --- | --- |
| Exponential | $y=ab^x$ | $\log y = \log a + (\log b)x$ | $\log y$ | $x$ | $\log b$ | $\log a$ |
| Power | $y=ax^b$ | $\log y = \log a + b\log x$ | $\log y$ | $\log x$ | $b$ | $\log a$ |
| Logarithmic | $y=a + b\ln x$ | $y=a + b\ln x$ | $y$ | $\ln x$ | $b$ | $a$ |

**Worked example:** Linearize the exponential decay model $A = A_0 e^{-\lambda t}$ into linear form for regression.

1. Take the natural logarithm of both sides of the equation:
2. $$\ln A = \ln\left(A_0 e^{-\lambda t}\right)$$
3. Apply logarithm product and power rules to simplify:
4. $$\ln A = \ln A_0 + \ln\left(e^{-\lambda t}\right) = \ln A_0 - \lambda t$$
5. Match to linear form $Y = mX + c$: $Y = \ln A$, $X = t$, slope $m = -\lambda$, intercept $c = \ln A_0$. This is the required linearized form.

## Interpreting Parameters and Prediction

Once we have the linear regression for the transformed data, we reverse the transformation to get the parameters of the original non-linear model. We can then interpret these parameters in context and use the model to predict $y$ values for given $x$.

> **warning**
>
> Even if you use your GDC to fit non-linear regression directly, exam questions will often require you to show the linearization method, so you must be able to do this by hand.

**Worked example:** A linear regression fitted to transformed log-log (base 10) data for a power model gives the equation $\log y = 0.6 + 1.8\log x$. Find the original power model and interpret the exponent.

1. Exponentiate both sides with base 10 to reverse the logarithm transformation:
2. $$10^{\log y} = 10^{0.6 + 1.8\log x}$$
3. Simplify using exponent rules: $10^{a+b} = 10^a \times 10^b$ and $a^{bc} = (a^c)^b$
4. $$y = 10^{0.6} \times (10^{\log x})^{1.8} = 10^{0.6} x^{1.8}$$
5. Calculate $a = 10^{0.6} \approx 3.98$, so the original power model is:
6. $$y \approx 3.98 x^{1.8}$$
7. Interpretation: $y$ is proportional to $x$ raised to the power 1.8, so a 10-fold increase in $x$ leads to a $10^{1.8} \approx 63$-fold increase in $y$.

**Check your understanding**

Check your understanding of parameter calculation:

1. For an exponential model, transformed linear equation is $\ln y = 1.5 + 0.4x$. What is the original model?

   - $y = 1.5 e^{0.4x}$
   - $y = e^{1.5} e^{0.4x}$
   - $y = 0.4 e^{1.5x}$

   *Answer:* $y = e^{1.5} e^{0.4x}$

   *Why:* Correct: The intercept $c = \ln a$, so $a = e^c = e^{1.5}$, giving $y = e^{1.5} e^{0.4x}$.

## Common pitfalls

- **Wrong:** Using the intercept of the linearized model directly as $a$ in the original model
  - Why it fails: For exponential and power models, the intercept is $\log a$, not $a$ itself, so this gives an incorrect parameter value
  - Correct: Always exponentiate the intercept to get $a$ for exponential and power models after linear regression
- **Wrong:** Mixing bases of logarithms during transformation
  - Why it fails: Using natural log for transformation but base 10 for exponentiation (or vice versa) gives wrong final parameters
  - Correct: Use the same logarithm base consistently throughout all working steps
- **Wrong:** Extrapolating predictions far outside the range of observed data
  - Why it fails: Non-linear models grow or decay very quickly outside the data range, leading to highly unreliable predictions
  - Correct: Only predict within the range of the original observed data, and explicitly note any extrapolation as unreliable
- **Wrong:** Assuming a high $r^2$ for transformed data guarantees a good fit for the original model
  - Why it fails: $r^2$ measures linear fit of transformed data, not the goodness of fit of the original non-linear curve
  - Correct: Always plot the original data and the fitted non-linear curve to visually confirm the model fits the data

## Cheatsheet

| Model Type | Original Equation | Transformed Linear Form | Original Parameters (from $Y = mX + c$) |
| --- | --- | --- | --- |
| Exponential $y=ab^x$ | $y=ab^x$ | $\log y = \log a + (\log b)x$ | $a = 10^c$, $b=10^m$ (base 10 log) |
| Exponential $y=ab^x$ | $y=ab^x$ | $\ln y = \ln a + (\ln b)x$ | $a = e^c$, $b=e^m$ (natural log) |
| Power $y=ax^b$ | $y=ax^b$ | $\log y = \log a + b\log x$ | $a = 10^c$, $b=m$ |
| Logarithmic $y=a + b\ln x$ | $y=a + b\ln x$ | $y = a + b \ln x$ | $a=c$, $b=m$ |

## What's next

Non-linear regression is one of the most useful statistical tools for IB AI HL, and you will often use it to model data in your internal assessment project. Mastering linearization techniques builds a foundation for more advanced statistical modeling, and understanding how to transform non-linear relationships connects your knowledge of logarithms from algebra to applied statistics. After this module, you can learn how to test if your non-linear model is a good fit using residual analysis, or explore time series analysis which commonly uses exponential non-linear models for growth and decay forecasting.

- [Chi-squared tests: goodness of fit and independence](https://www.owlsprep.com/study/ib-math-ai-hl-u5-chi-squared-tests-goodness-of/)
- [t-tests and confidence intervals for means](https://www.owlsprep.com/study/ib-math-ai-hl-u5-t-tests-and-confidence-intervals/)
- [Spearman's rank correlation coefficient](https://www.owlsprep.com/study/ib-math-ai-hl-u5-spearman-s-rank-correlation-coefficient/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ib-math-ai-hl-u5-non-linear-regression-models/
