Mathematics: Applications and Interpretation · Topic 4: Statistics and probability
AHL4.13 — Non-linear regression and $R^2$
Mathematics: Applications and Interpretation · SL / HL · syllabus-mapped notes
AIAHL4.13.1
Least-squares regression with non-linear models
Fitting quadratic, cubic, exponential, power and sine models on the GDC.
Full note — freeRegression is not limited to straight lines. Technology can fit a least squares regression curve of many shapes and give its equation. Models you may meet in examinations Linear $y=ax+b$, quadratic $y=ax^2+bx+c$, cubic $y=ax^3+bx^2+cx+d$. Exponential $y=ka^{x}$ (or $y=k\,e^{rx}$), power $y=ax^{b}$, and sine $y=a\sin(bx+c)+d$. Using the GDC Enter the data into two lists, choose the regression type, and read off the coefficients and the fitted equation. Choose the model shape from the scatter of the data and the context, not by trial and error alone. e.g. data that rises with a fixed percentage growth each period suggests an exponential model; data that rises then falls suggests a quadratic. A curved least-squares model against a straight line on the same data; R² measures how much better it fits.
AIAHL4.13.2
Residuals and the coefficient of determination
$\mathrm{SS_{res}}$ as a measure of fit and $R^2$ as the proportion of variability explained.
A residual is the vertical gap between a data point and the fitted curve, $y_i-\hat{y}_i$. Squaring and adding them measures how far the model misses overall. Sum of square residuals $\mathrm{SS_{res}}=\sum (y_i-\hat{y}_i)^2$. A smaller $\mathrm{SS_{res}}$ means a better fit; the least-squares curve is the one …
AIAHL4.13.3
Interpreting and comparing models
Limitations of $R^2$ and its link to Pearson's $r$ for linear models.
$R^2$ is useful but must be read with care when choosing between models. Limitations Many factors affect a model's validity, so $R^2$ on its own is not a good way to decide between models. A more flexible model (higher degree) can raise $R^2$ while fitting …
