4.13 Non-linear regressionIB Maths: Applications and Interpretation HL: Revision notes
Section 1
Fitting curves by least squares
In regression we fit a model to data so that the vertical distances between the points and the curve are as small as possible. 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 may be asked about linear, quadratic, cubic, exponential, power and sine regression, and you evaluate the curve using technology: enter the data in lists, choose the regression type and read off the parameters (to 3 significant figures unless told otherwise). Always state which type of regression you used and write the full equation.
Write the full equation with parameters and the type of regression, e.g. exponential regression gives .
Section 2
The models and their forms
- Quadratic: . Cubic: .
- Exponential: (or ). If takes equally spaced values then the values form a geometric sequence with first term and common ratio (link to SL 1.3). A value means an increase of per unit.
- Power: . A power model is natural where one quantity scales with another, such as period and distance in orbits.
- Sine: ; amplitude , period (with in radians), principal axis . Choose a model from the shape of the data and the context.
Confusing exponential with power . In exponential models the variable is in the exponent.
Section 3
Sum of squared residuals
The sum of squared residuals, , measures how closely the model fits the data. A smaller means a closer fit. It depends on the units and the size of the data, so use it to compare models fitted to the same data. The least squares curve is the one with the smallest of its type. Example: the data in the exam question has for the linear model and for the quadratic model, so the quadratic fits much more closely.
Compare values only for models fitted to the same data.
Section 4
The coefficient of determination
The coefficient of determination is evaluated using technology. It gives the proportion of the variability in the second variable () accounted for by the chosen model. For example means of the variation in braking distance is accounted for by the model. lies between and ; closer to 1 means a better fit. (Awareness that , and so is when , may help understanding but is not examined.) For a linear model, , where is Pearson's product-moment correlation coefficient. If then .
Saying means the model is likely to be correct or that predictions are accurate. It is the proportion of variability explained.
Section 5
Validity of models: why is not enough
Many factors affect the validity of a model, and alone is not a good way to decide between models. Think about:
- Context: does the model make sense? A linear model for braking distance gives m at km/h, which is impossible.
- Range: using the model outside the data range is extrapolation, which is less reliable than interpolation.
- Complexity: a model with more parameters (a cubic compared with a quadratic) often has a higher without being better.
- Residual pattern and sample size: small samples can fit by chance. In a comment, give a reason that refers to the context or the data, not just " is high".
In a "comment" question, give a reason and relate it to the context, e.g. "the model is used outside the range of the data, so it may not hold".
Section 6
Worked example: choosing and using a model
Data: to hours, thousand. The ratios of successive values are about , so an exponential model is suitable.
- Exponential regression on the GDC: .
- Predict at : thousand (extrapolation, so treat with care).
- Interpret: the culture grows by about each hour, and the hourly values form a geometric sequence. For a periodic tide, use sine regression: with the amplitude is , the period is hours and the mean depth is .
Round only the final answer; keep full GDC values in your working.
That's the notes covered.
Carry on to the next subtopic.
Exam questions on 4.13 Non-linear regression
- The number of bacteria (in thousands) in a culture is counted every hour for six hours. At times hours the counts are . Use your GDC.Interpret the value in the model , and state the link between this model and a geometric sequence.2 marks
- The braking distance metres of a car was measured at speeds km/h. The results for were , , , , , , . Using your GDC, linear regression gives , and quadratic regression gives with sum of squared residuals and .A student says: "The quadratic model has a larger than the linear model (), so it will give a reliable braking distance at km/h." Give two reasons why this conclusion is not justified.2 marks
- Astronomers record the mean distance of each planet from the Sun, in astronomical units (AU), and its orbital period in years: Mercury , Venus , Earth , Mars , Jupiter , Saturn . A power model is to be fitted. Use your GDC.Use your GDC to find the power regression model , giving and to 3 significant figures.3 marks
Written by the Exaim team, led by Shaun Daswani (Head of Upper Secondary, Improve ME Institute; MSc Financial Mathematics, Imperial College London; BSc, UCL) and Jason Daswani (operational lead, Improve ME Institute; LSE).