4.13 Non-linear regression
Studying this course? Keep your progress in one place.
Key facts
- Least squares regression chooses the model with the smallest sum of squared residuals.
- Exam models: linear, quadratic, cubic, exponential , power and sine; use your GDC.
- A smaller sum of squared residuals means a closer fit to the same data.
- is the proportion of the variability in accounted for by the model; for a linear model .
- alone is not enough to judge a model: think about context, range and complexity.
Fitting curves by least squares
The least squares curve is the one that makes the sum of the squared vertical distances to the data as small as possible.
In regression we fit a model so that the vertical distances between the points and the curve are small. The least squares regression curve minimises the sum of the squares of these distances.
The distance between an observed value and the model's value is the residual.
In examinations you use technology: enter the data in lists, choose the regression curve type and read off the parameters (to significant figures unless told otherwise). Always state the type and write the full equation.
- Least squaressmallest
- Residual
What does least squares regression minimise?
The models and their forms
Choose the model from the shape of the data and the context.
- Quadratic: . Cubic: .
- Exponential: (or ). At equal steps the values form a geometric sequence; means growth per unit.
- Power: .
- Sine: : amplitude , period , principal axis .
Which model has the variable in the exponent?
Sum of squared residuals
A smaller sum of squared residuals means a closer fit to the same data.
The sum of squared residuals, , measures how closely the model fits the data.
It depends on the units and size of the data, so use it to compare models fitted to the same data. The least squares curve has the smallest of its type.
For braking-distance data, for the linear model and for the quadratic, so the quadratic fits much more closely.
Model A has and model B has on the same data. Which fits better?
The coefficient of determination
is the proportion of the variability in accounted for by the model.
The coefficient of determination is found using technology. It lies between and ; closer to means a better fit.
For example means of the variation in braking distance is accounted for by the model.
For a linear model, , where is Pearson's product-moment correlation coefficient. If then .
- Data
- Quadratic model
- Linear model
- close to 1better fit
A linear model has . What is ?
Why R² is not enough
Many factors affect validity, so alone should not decide between models.
- Context: does the model make sense? A linear braking model gives m at km/h, which is impossible.
- Range: using a model outside the data range is extrapolation, less reliable than interpolation.
- Complexity: a cubic often has a higher than a quadratic without being better.
- Sample size: small samples can fit by chance.
Give a reason that refers to the context or the data, not just " is high".
- Data
- Linear model
- Quadratic model
Interpolation
- Inside the data range
- More reliable
Extrapolation
- Outside the data range
- Trend may not continue
A model is used to predict a value far outside the data range. What is this called and why is it risky?
Choosing and using a model
Pick the model from the data's shape, fit it on the GDC, then use and interpret it.
Culture data: to hours, thousand. Successive ratios are about , so an exponential model suits.
For a periodic tide use sine regression. With the amplitude is , the period is hours and the mean depth is .
Worked example
Use the culture data above to model and predict at .
- 1
Exponential regression on the GDC: .
- 2
Predict at : thousand (extrapolation, so treat with care).
- 3
Interpret: the culture grows by about each hour.
For with and in radians, what is the period?
Try an exam question
A linear model for data has Pearson's correlation coefficient . A quadratic model for the same data has a smaller sum of squared residuals. (a) Find for the linear model and interpret it. (b) Say which model fits better. (c) Give one reason why alone is not enough to choose a model.
[4 marks]
- [1].
- [1] of the variability in is accounted for by the linear model.
- [1]The quadratic fits better because it has the smaller sum of squared residuals.
- [1]A model may be unsuitable in context or used outside the data range (extrapolation), even with a high .
That's the notes covered.
Carry on to the next subtopic.
Try a question
Using exponential regression on your GDC, which model fits the data?
1 mark, marked against the mark scheme
Using exponential regression on your GDC, which model fits the data?
1 mark, marked against the mark scheme