Data transformation and linearisation (QCE General Mathematics Unit 3 extension)
“Apply a square, logarithmic or reciprocal transformation to one variable to linearise a non-linear association, fit a least-squares line to the transformed data, use the transformed equation to predict, and choose the transformation that best straightens the scatter”
When a residual plot shows a clear pattern, a straight line does not suit the raw data. Linearise by transforming one variable with a square, logarithm or reciprocal chosen from the shape of the scatter, fit a least-squares line to the transformed data, and keep the transformation with the most random residual plot and highest . To predict, transform the input, substitute, and reverse any transformation of . In the QCAA 2025 syllabus this is extension: the required skill is using the residual plot to judge whether a linear model is appropriate.
What this dot point is asking
Some bivariate data are clearly curved. Stopping distance grows faster than speed, app downloads grow by a percentage each month, and the time to finish a job drops quickly then levels off as more workers join. A least-squares line fitted to data like these gives biased predictions, and its residual plot shows a pattern. Data transformation is the standard fix: change the scale of one variable (square it, take its logarithm, or take its reciprocal) so that the scatter becomes straight, then fit and use a least-squares line on the new scale.
Data transformation (square, log and reciprocal) is not listed in the subject matter of the QCAA General Mathematics 2025 syllabus, which is assessed from 2026. What the syllabus does require is that you use a residual plot to decide whether a linear model is appropriate (see residual analysis). Treat this page as extension: it is useful in the problem-solving and modelling task (IA1) when your own data are curved, and it deepens your understanding of residuals, but the external assessment does not require you to carry it out.
The answer
Step zero: recognise that the data are curved
You only transform when a straight line is the wrong model. The evidence comes from two places:
- The scatterplot: the points bend, rather than scattering evenly about a straight line.
- The residual plot: after fitting a least-squares line to the raw data, the residuals show a clear pattern, such as positive at both ends and negative in the middle (a U shape), or the reverse. A random scatter of residuals about zero supports a linear model; a pattern rejects it.
A high correlation coefficient does not settle the question. Curved data often have above 0.95. The stopping-distance data below have on the raw scale, yet the residual plot shows that a straight line systematically underestimates at both ends and overestimates in the middle.
The three transformations
Each transformation changes the spacing of values. Applied to either the explanatory variable or the response variable :
| Transformation | Effect on large values | Typical use |
|---|---|---|
| Squared: or | Stretches them apart | Undo a curve that bends the other way |
| Logarithmic: or | Compresses them | Growth or decay by a constant percentage; data spanning several orders of magnitude |
| Reciprocal: or | Compresses them strongly (and reverses order) | Values that fall quickly and then level off towards a limit |
Logarithms and reciprocals need positive values, and the reciprocal of a variable reverses its order (the largest has the smallest ), so the slope of the fitted line can change sign.
Choosing which transformation to try
Match the transformation to the shape of the scatter. A useful rule: stretch the side that is too short, or compress the side that is too long.
| Shape of the scatter | Try on | Try on |
|---|---|---|
| Increasing, and steeper and steeper (curving up) | or | |
| Increasing, but flattening (curving down) | or | |
| Decreasing, and flattening (curving up) | or | or |
| Decreasing, and steeper and steeper (curving down) |
Then test. Fit a least-squares line to each candidate, look at each residual plot, and choose the transformation that gives the most random residuals and the highest . Transform one variable at a time: changing both is rarely needed and makes the model harder to interpret.
Transform only when the raw residual plot shows a pattern. Choose among , and reciprocal by the shape of the scatter, then compare residual plots and . The fitted equation is in terms of the transformed variable, so substitute the transformed input, and if was transformed, reverse that transformation at the end.
Fitting and predicting on the transformed scale
Once the new variable is calculated (a spreadsheet column such as =B2^2 or =LOG10(C2)), treat it exactly like ordinary data and fit the least-squares line with technology. The equation is written in terms of the transformed variable, for example
To predict:
- Transform the input if was transformed (square it, log it or take its reciprocal).
- Substitute and evaluate.
- Back-transform if was transformed: for , for , and for .
Interpolation and extrapolation work exactly as for raw data: a prediction outside the range of the original values is an extrapolation and is less reliable, however good the transformed fit.
Case study 1: stopping distance (squaring )
| Speed (km/h) | 40 | 50 | 60 | 70 | 80 | 90 | 100 |
|---|---|---|---|---|---|---|---|
| Stopping distance (m) | 19 | 27 | 36 | 47 | 59 | 73 | 88 |
Raw fit. , , . Residuals, in order: . The pattern (positive, negative, positive) shows the association is curved, and the negative intercept makes no physical sense.
Transformed fit (). , . Residuals: , small and without a clear pattern.
The residual plot on the right has no pattern, so the squared model is appropriate. Predicting at 75 km/h: and , about 52.5 m. This matches the physics: braking distance depends on the square of speed.
Case study 2: app users (logging )
| Month | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|---|
| Users (thousands) | 12 | 17 | 25 | 36 | 51 | 74 | 106 |
Each value is roughly 1.44 times the one before: growth by a constant percentage, which is geometric growth like the sequences topic. The raw line has but residuals , a strong U shape.
Taking gives , which rise by about 0.16 each month. The least-squares line is with . The slope 0.158 means is multiplied by each month, about 44% growth per month.
Case study 3: workers and time (reciprocal of )
| Workers | 1 | 2 | 3 | 4 | 5 | 6 | 8 |
|---|---|---|---|---|---|---|---|
| Hours | 48 | 25 | 17 | 13 | 11 | 9 | 7 |
The raw line has and a strongly patterned residual plot. Using as the explanatory variable gives with . The intercept 1.37 is the time the job approaches as the team becomes very large, because approaches 0.
Example 1: squared explanatory variable
A curved scatter is straightened by squaring , and the least-squares line is . Predict when .
- Transform the input
- .
- Substitute
- .
- Back-transform
- Only was transformed, so the equation already predicts . Final answer: .
Marker's note: the most common error is substituting instead of , which gives 7.
Example 2: logarithm of the response variable
Using from case study 2, predict the number of users at .
- Substitute
- .
- Back-transform
- , so about 153 thousand users.
- Comment
- is one month beyond the data, a short extrapolation. Percentage growth rarely continues indefinitely, so longer-range predictions are unreliable.
Marker's note: leaving the answer as 2.184 answers the wrong question; the model predicts , not .
Example 3: reciprocal of the explanatory variable
Using from case study 3, predict the time for 7 workers.
- Transform the input
- .
- Substitute
- , about 8.0 hours.
- Comment
- 7 workers lies inside the data range (1 to 8), so this is an interpolation and is reliable given the random residual plot.
Marker's note: keep the unrounded value of in the calculator until the end to avoid rounding error.
Why transformation is extension, and what the syllabus does require
The QCAA syllabus stops at the diagnosis: you must fit a least-squares line, calculate and plot residuals, and use the residual plot to decide whether a linear model is appropriate. If the residual plot shows a pattern, the correct syllabus response is to say that a linear model is not appropriate and that predictions from it are unreliable. Transformations are the next step that statisticians take, which is why they are worth knowing for a modelling task. If you use one in IA1, explain your reasoning: show the raw residual plot, state the transformation you tried and why, show the new residual plot, and interpret the model in the original units.
- Forgetting to transform the input before predicting
- With you must square the value of first.
- Not reversing a transformation on
- If the response was logged, the equation predicts . Raise 10 to that power to get in its original units.
- Trusting instead of the residual plot
- Curved data can have above 0.98. The residual plot decides whether a linear model fits.
- Choosing the transformation by guesswork
- Use the shape of the scatter to shortlist candidates, then compare residual plots and .
- Taking logs or reciprocals of zero or negative values
- Both are undefined; if the data contain zeros, these transformations cannot be used directly.
- Interpreting the slope in the wrong units
- In , the slope is the change in per unit of , which means is multiplied by for each unit increase in .
- Forgetting that extrapolation is still extrapolation
- A near-perfect fit on transformed data does not make predictions far outside the data reliable.
Set out every transformed prediction in three labelled lines: "transform the input", "substitute", "back-transform". In a modelling report, place the raw and transformed residual plots side by side and write one sentence comparing them, as in the figure above. Always give your final answer in the original units and context (metres, thousands of users, hours).
Imagine trying to lay a straight ruler along a bent line of dots. It will not fit, however you tilt it. Transforming the data is like redrawing the graph paper so the bend disappears: you stretch or squash one of the axes (by squaring the numbers, taking their logs or flipping them upside down) until the dots line up, then lay the ruler along them. To make a prediction, you read off the ruler on the stretched paper and then convert back to ordinary numbers.
Exam-style questions
Questions in the style of QCAA exam questions on this dot point, each with a worked answer. They are written by ExamExplained unless tagged "Past paper"; the year shows the paper a question is modelled on.
Original4 marksA curved association between and is straightened by squaring the explanatory variable. The least-squares line fitted to the transformed data is . (a) Determine the predicted value of when . (b) State why a transformation might be chosen instead for a different data set.Show worked answer →
A 4 mark technique question: apply the transformation, substitute, evaluate, and give the reasoning.
(a) Transform the input first: . Substitute into the fitted line: . The predicted value of is .
(b) A transformation compresses large values, so it straightens data that grows by a roughly constant percentage (multiplicative growth), where the values rise faster and faster. It is also useful when the spread of grows as grows. The squared transformation of can straighten a similar upward curve, so test both and compare the residual plots.
Markers reward squaring the input before substituting, the correct prediction, and a transformation choice tied to the shape of the data.
Original6 marksResearchers model bacterial count (thousands) against time (hours). A transformation straightens the scatter, and the least-squares line is . (a) Determine the predicted count when hours, giving your answer to the nearest thousand. (b) Justify why the residual plot for the transformed data is examined before trusting this prediction.Show worked answer →
A 6 mark extended question needing back-transformation and an interpretation.
(a) Substitute : . The equation predicts , so reverse the transformation by raising to that power: . Since is in thousands, the count is about bacteria to the nearest thousand.
(b) The residual plot for the transformed data should show random scatter about zero. If it shows a remaining pattern, the chosen transformation has not fully straightened the relationship, so predictions, especially extrapolated ones, would be biased. A random residual plot and a high justify trusting the linear fit on the transformed scale.
Markers reward the substitution, raising to the power to undo the log, the rounded count, and linking the residual plot to the validity of prediction.
Practice questions
Original practice questions graded from foundation to exam level, each with a full worked solution. Try them before revealing the solution.
foundation2 marksA least-squares line fitted after squaring the explanatory variable is . Predict when .
Show worked solution →
Transform the input first (1 mark): .
Substitute and evaluate (1 mark): .
Marker's note: substituting directly gives , a common wrong answer.
foundation2 marksFor each shape of scatterplot, name one transformation that could straighten it. (a) increases, and increases more and more steeply as increases. (b) decreases steeply at first, then levels off towards a horizontal asymptote.
Show worked solution →
(a) The graph is increasing and curving upward. Stretch the top of with , or compress the top of with (or ). (1 mark)
(b) The graph is decreasing and flattening. Compress large values with (or ), or use . (1 mark)
Marker's note: any one suitable transformation earns the mark, but you should still test it by checking the residual plot.
foundation2 marksA least-squares line on transformed data is . Predict when , correct to one decimal place.
Show worked solution →
Substitute (1 mark): .
Back-transform (1 mark): , so .
Marker's note: the equation predicts , not . Stopping at 2 loses the second mark.
core3 marksThe time hours for a team of workers to finish a job is modelled with a reciprocal transformation: . (a) Predict the time for 10 workers. (b) Interpret the value 1.37 in context. (c) Explain why this prediction is an extrapolation if the data used from 1 to 8.
Show worked solution →
(a) , so , about hours. (1 mark)
(b) As becomes very large, approaches 0, so 1.37 hours is the time the model says the job approaches however many workers are added (a lower limit, the part of the job that cannot be shared). (1 mark)
(c) 10 workers lies outside the range of the data (1 to 8 workers), so the prediction relies on the pattern continuing beyond what was observed. (1 mark)
core4 marksStopping distance (m) against speed (km/h) gives the raw least-squares line with , and a residual plot that is clearly U-shaped. After squaring the speed, with and randomly scattered residuals. (a) Which model is more appropriate? Justify. (b) Use it to predict the stopping distance at 75 km/h, to one decimal place.
Show worked solution →
(a) The squared model (1 mark). The raw model's residual plot shows a U-shaped pattern, so a straight line is not appropriate for the raw data even though is high. The transformed model has random residuals and a higher (0.9998 against 0.988). (1 mark)
(b) (1 mark). , about m. (1 mark)
core3 marksA model is fitted with as the response: . Predict when , correct to two decimal places, given is positive.
Show worked solution →
Substitute (1 mark): .
Back-transform (1 mark): take the positive square root, .
Evaluate (1 mark): .
exam5 marksThe number of users (thousands) of an app months after launch was: and . A least-squares line of on gives () with residuals . A least-squares line of on gives () with residuals all within of zero and no pattern. (a) Describe the residual plot for the raw model and state what it shows. (b) Use the log model to predict the number of users at . (c) Explain why the prediction in (b) should be treated with caution.
Show worked solution →
(a) The raw residuals are positive, then negative, then positive again (a U shape), so the association is non-linear and the raw linear model is not appropriate. (2 marks: pattern described, conclusion)
(b) (1 mark). Back-transform: , so about 153 thousand users (1 mark).
(c) is outside the data ( from 0 to 6), so it is an extrapolation. It assumes growth by the same percentage each month continues, which rarely lasts: the market eventually saturates. (1 mark)
exam4 marksA student fits to curved data that increases at a decreasing rate. (a) Predict when and when (to two decimal places). (b) The student says "doubling from 50 to 100 doubles the increase in ". Evaluate this claim using your answers.
Show worked solution →
(a) : , so (1 mark). : , so (1 mark).
(b) Doubling from 50 to 100 increases by only . In a log model, every doubling of adds the same amount, , so equal multiplications of give equal additions to . The claim is wrong (2 marks: calculation of the increase, correct reasoning).