How can we straighten a curved relationship so a linear model works?
Apply squared, logarithmic and reciprocal transformations to linearise data, fit a least-squares line to the transformed data and use it to predict.
How to apply the squared, log and reciprocal transformations to straighten curved bivariate data, fit a line to the transformed variable, and back-substitute to predict in original units.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
What this dot point is asking
You must choose a transformation that straightens the data, refit, and predict, remembering that the line is now in terms of the transformed variable.
When and why to transform
A least-squares line should only be fitted to data that is linear. If the form is curved, you transform one variable so that the transformed data is linear, fit the line there, and read predictions back. The course uses three transformations.
Choosing a transformation
The shape of the curve guides the choice. A relationship that bends upward more and more steeply often straightens with a log or squared transformation; a relationship that flattens towards a limit often straightens with a reciprocal transformation. In practice you try a transformation, fit the line and check the residual plot: the transformation that gives random residuals is the right one.
Fitting and predicting
After transforming, the least-squares line is written in terms of the transformed variable, for example or . To predict, substitute carefully.
Checking the transformation worked
After transforming and refitting, look at the new residual plot and the new . A successful transformation produces random residuals about zero and a higher than the untransformed fit. If the residual plot is still curved, try a different transformation.