Skip to main content

Transforming data to linearity in WACE Mathematics Applications Unit 3

Syllabus dot point

“Apply squared, logarithmic and reciprocal transformations to linearise data, fit a least-squares line to the transformed data and use it to predict.”

WACEMathematics ApplicationsUnit 38 min read

Quick answer

When a scatterplot is curved, a straight line is the wrong model, so transform one variable to straighten it first. The squared transformation (x2x^2 or y2y^2) and the reciprocal (1/x1/x or 1/y1/y) and the logarithm (log⁡10\log_{10}) each straighten a particular curve shape. Fit the least-squares line to the transformed variable, then back-substitute to predict in the original units.

Jump to a section
  1. What this dot point is asking
  2. Why transform
  3. Choosing the transformation from the shape
  4. Fitting and predicting
  5. Back-transforming a log model
  6. Exam-style questions

What this dot point is asking

You must choose a transformation from the curve shape, fit a line to the transformed data, predict by substituting, and convert predictions back to original units.

Why transform

The least-squares line and the correlation coefficient rr only describe linear association. If the scatterplot is clearly curved, fitting a straight line gives poor predictions and a misleading rr. A transformation changes the scale of one variable so the relationship becomes linear, after which all the linear tools work.

Straighten, then fit

Never fit a line to a curve. Transform first so the transformed scatterplot is approximately linear, then apply least-squares. Residual plots from the original fit will show a clear curved pattern, which is the signal that a transformation is needed.

Choosing the transformation from the shape

The three transformations in the course each suit a particular curve.

The three transformations
  • Squared (x2x^2 or y2y^2): straightens a curve that increases at an increasing rate (concave up). Squaring xx stretches the right of the plot; squaring yy stretches the top.
  • Reciprocal (1/x1/x or 1/y1/y): straightens a curve that decreases steeply then levels off, or rises towards a horizontal asymptote.
  • Logarithm (log⁡10x\log_{10} x or log⁡10y\log_{10} y): straightens exponential-type growth or decay, where the variable multiplies by a roughly constant factor.

A practical method is the "circle of transformations": decide whether the curve bulges up or down and left or right, then pick the transformation that stretches the crowded part of the plot. In an exam, try the transformation suggested by the question and confirm the transformed plot or rr improves.

Fitting and predicting

After transforming, the least-squares line is written in terms of the transformed variable, for example y=a+b(x2)y = a + b(x^2) or log⁡10y=a+bx\log_{10} y = a + bx. To predict:

  1. Substitute the given value, transforming it the same way as the data.
  2. If the response variable was transformed, back-transform the result (square root, reciprocal, or 10value10^{\text{value}}).
Worked example

Linearising a reciprocal relationship

The time TT (minutes) to fill a tank falls as the pump rate rr (litres per minute) rises, in a curve that drops steeply then levels. A least-squares line of TT against 1r\dfrac{1}{r} gives T=0.5+240(1r)T = 0.5 + 240\left(\dfrac{1}{r}\right).

Confirm the transformation

A falling, levelling curve suits the reciprocal 1r\dfrac{1}{r}, which stretches the small-rr end where the curve is steep, straightening it.

Predict the time at r = 8

Substitute 1r=18=0.125\dfrac{1}{r} = \dfrac{1}{8} = 0.125: T=0.5+240(0.125)=0.5+30=30.5T = 0.5 + 240(0.125) = 0.5 + 30 = 30.5 minutes.

Predict the rate for a target time

For T=5T = 5 minutes: 5=0.5+240(1r)5 = 0.5 + 240\left(\dfrac{1}{r}\right), so 240(1r)=4.5240\left(\dfrac{1}{r}\right) = 4.5, giving 1r=0.01875\dfrac{1}{r} = 0.01875 and r=53.3r = 53.3 litres per minute.

Interpret

The model predicts that filling in 55 minutes needs a pump rate of about 5353 litres per minute. Because this rate is well beyond the data range, treat it as an extrapolation and report it with caution.

Back-transforming a log model

When log⁡10y\log_{10} y is the response, predictions come out as a log value that must be undone with a power of ten. If log⁡10y=2.0+0.3x\log_{10} y = 2.0 + 0.3x gives log⁡10y=3.5\log_{10} y = 3.5, then y=103.5=3162y = 10^{3.5} = 3162. Forgetting this final step is the single most common error in log questions.

Common errors
Forgetting to back-transform
If the response variable was transformed, undo it (square root, reciprocal or 10value10^{\text{value}}) to return to original units.
Transforming the prediction value differently from the data
Apply the same transformation to the input as was applied to build the model.
Fitting a line to obviously curved data
A transformation is needed first; a high rr on a curve does not justify a straight line.
Choosing the wrong transformation
Match the transformation to the curve shape, then check the transformed plot or r2r^2 improves before trusting it.

Exam-style questions

Questions in the style of SCSA 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.

WACE 2022-style6 marks
A scatterplot of yy against xx is curved, increasing and concave up. After applying the transformation x2x^2, the least-squares line of yy on x2x^2 is y=3.0+1.5(x2)y = 3.0 + 1.5(x^2). (a) Explain why a squared transformation was suitable. (b) Predict yy when x=6x = 6. (c) Predict the value of xx (positive) when y=100y = 100.
Show worked answer →

A concave-up increasing curve is straightened by stretching the xx axis with x2x^2.

(a) The x2x^2 transformation spreads out large xx values, straightening a curve that rises ever more steeply, so the transformed plot of yy against x2x^2 is approximately linear. (2 marks)

(b) When x=6x = 6, x2=36x^2 = 36, so y=3.0+1.5(36)=3.0+54=57y = 3.0 + 1.5(36) = 3.0 + 54 = 57. (2 marks)

(c) Set 100=3.0+1.5(x2)100 = 3.0 + 1.5(x^2), so 1.5x2=971.5x^2 = 97, giving x2=64.67x^2 = 64.67 and x=8.04x = 8.04 (positive root). (2 marks)

Markers reward justifying the transformation by the curve shape, substituting x2x^2 correctly, and solving back to original units.

WACE 2024-style5 marks
Bacterial count NN grows rapidly with time tt (hours). A least-squares line fitted to log⁡10N\log_{10} N against tt gives log⁡10N=2.0+0.30t\log_{10} N = 2.0 + 0.30t. (a) Predict the count when t=5t = 5. (b) State why a log transformation suited this data.
Show worked answer →

A log transformation linearises a quantity that multiplies by a roughly constant factor each period.

(a) When t=5t = 5, log⁡10N=2.0+0.30(5)=2.0+1.5=3.5\log_{10} N = 2.0 + 0.30(5) = 2.0 + 1.5 = 3.5, so N=103.5=3162N = 10^{3.5} = 3162 bacteria. (3 marks)

(b) Bacterial growth is exponential (a roughly constant percentage increase each hour), which plots as a steep curve. Taking log⁡10N\log_{10} N converts the constant-ratio growth into a constant-difference, straight-line relationship with time. (2 marks)

Markers reward back-transforming with 10log⁡N10^{\log N} and explaining the log transformation by the exponential growth.

Practise this

Sources & how we know this

ExamExplained