Transformation to achieve linearity
By Jude Wallis · Updated
A transformation to achieve linearity applies a function such as a logarithm or square root to x or y so a curved pattern straightens out.
When a scatterplot curves, you re-express one or both variables and fit the line to the new pairs. The fit then belongs to the transformed variable, so the equation predicts a transformed value and you undo the function to get back to the original units. Multiplicative growth is the standard case, and a logarithm is the standard tool for it.
A culture is counted every hour for five hours: 12, 25, 48, 103, 195 and 402. A line fitted straight to those counts gives and a residual plot with a clear arc in it. Take and the six values become 1.0792, 1.3979, 1.6812, 2.0128, 2.2900 and 2.6042, rising by close to a constant amount each hour. Least squares on those gives with . Undoing the logarithm, , so the count is doubling about every hour. At the model predicts 99 against an observed 103.
The claim to resist is " went from 0.904 to 0.9998, so the second model predicts the counts better." Those two numbers are about different response variables. The first describes variation in counts, the second variation in the logarithm of counts, and or cannot rank models whose response has changed underneath them. Judge the two on their residual plots and on predictions returned to the original units.
What a typical error means changes too. Here the standard deviation of the residuals on the log scale is 0.0124, and , so a typical miss is about 3 percent of the predicted count rather than a fixed number of cells.
On the AP course, be precise: the Fall 2026 framework has no topic on transforming data to achieve linearity, since re-expressing data to straighten a curve was the old topic 2.9 that the College Board removed. Detecting a departure from linearity is a different skill and is still assessed, under topic 5.4, Residuals, where curvature in a residual plot is the evidence against a linear model.
More regression and correlation terms, or browse the full statistics glossary.