When a residual plot shows a curve, a line is the wrong model. For two common curves, exponential growth and power laws, the properties of logarithms turn the curve into a straight line, and then everything you know about lines applies.
Key idea
Exponential $y = a \cdot b^x$ becomes $\log y = \log a + (\log b)x$: plot $\log y$ against $x$. Power $y = a \cdot x^p$ becomes $\log y = \log a + p \log x$: plot $\log y$ against $\log x$. Fit a least-squares line to the straightened data, then undo the logs.
Why it works
Logs turn products into sums and powers into multiples: $\log(a \cdot b^x) = \log a + x \log b$. Exponential growth multiplies y by the same factor $b$ for each step in x; after taking logs, that becomes adding the same amount $\log b$ each step, which is exactly what a straight line does.
Worked example: Straightening exponential data
Bacteria counts (thousands) are 3, 6, 12, 24, 48 at hours 0 to 4. Show that $(x, \log y)$ is linear and find the model.
- The logs are $0.477, 0.778, 1.079, 1.380, 1.681$; they go up by $0.301$ each hour, so $(x, \log y)$ is a line.
- The line: $\log \hat{y} = 0.477 + 0.301x$.
- Undo the log: $\hat{y} = 10^{0.477} \cdot (10^{0.301})^x = 3 \cdot 2^x$.
Answer: $\hat{y} = 3 \cdot 2^x$ (thousands of bacteria).
Worked example: Predicting from a log model
A fitted line is $\log \hat{y} = 0.5 + 0.25x$. Predict y at $x = 6$.
- $\log \hat{y} = 0.5 + 0.25(6) = 2$.
- $\hat{y} = 10^2 = 100$.
Answer: 100
Worked example: A power model
For animals, a log-log fit gives $\log \hat{y} = 0.301 + 2\log x$. Write the model.
- Undo the log: $\hat{y} = 10^{0.301} \cdot 10^{2 \log x} = 2 \cdot x^2$.
- Check: $10^{0.301} \approx 2$ because $\log 2 \approx 0.301$.
Answer: $\hat{y} = 2x^2$
After straightening, check the residual plot of the transformed data. If it is random scatter, the model fits; if it still curves, try the other transformation.
Common mistake
Forgetting to undo the log. The line predicts $\log y$, not $y$: if $\log \hat{y} = 2$, the prediction is $10^2 = 100$, not 2. Check that your prediction is in the original units.