01 / 20

Linearizing
Transformations

Learn how to apply logarithmic, power, and reciprocal transformations to turn curved relationships into straight lines for better regression analysis.

College Statistics

Why Linearize Data?

Linear regression is one of the most powerful tools in statistics, but it only works well when the relationship between \(x\) and \(y\) is approximately linear. Many real-world relationships are curved: population growth is exponential, planetary orbits follow power laws, and chemical decay is logarithmic.

Recognizing a Curved Pattern

x y Curved pattern Linear fit: poor Residual plot shows a clear pattern

What Is a Transformation?

A transformation replaces one variable with a function of that variable. Instead of plotting \(y\) vs \(x\), we plot a new variable such as \(\ln(y)\) vs \(x\), or \(y\) vs \(\sqrt{x}\). If the right transformation is chosen, the new scatterplot will appear linear.

Transform \(y\)
Plot \(\ln(y)\) vs \(x\), or \(\sqrt{y}\) vs \(x\)
Transform \(x\)
Plot \(y\) vs \(\ln(x)\), or \(y\) vs \(x^2\)
Transform Both
Plot \(\ln(y)\) vs \(\ln(x)\) for power models

Three Key Models and Their Transforms

Model Equation Transformation Linear Form
Exponential \(y = ab^x\) Take \(\ln(y)\) \(\ln(y) = \ln(a) + x\ln(b)\)
Power \(y = ax^p\) Take \(\ln\) of both \(\ln(y) = \ln(a) + p\ln(x)\)
Logarithmic \(y = a + b\ln(x)\) Take \(\ln(x)\) \(y = a + b\ln(x)\)

Exponential: \(\ln(y)\) vs \(x\)

If the original data follows \(y = ab^x\), taking the natural log of both sides gives:

Original: y vs x → take ln(y) Transformed: ln(y) vs x

Power: \(\ln(y)\) vs \(\ln(x)\)

If the data follows \(y = ax^p\), taking the natural log of both variables gives:

Original: y vs x → take ln of both Transformed: ln(y) vs ln(x)

Exponential vs Power: Which Transform?

Exponential Growth
Data increases by a constant factor for equal increments in \(x\). Try: \(\ln(y)\) vs \(x\). If linear, it is exponential.
Power Growth
Data increases by a changing factor tied to \(x\) itself. Try: \(\ln(y)\) vs \(\ln(x)\). If linear, it is a power model.

Step-by-Step Linearization

1
Examine the scatterplot. Does the data curve upward (concave up) or follow a decelerating pattern (concave down)?
2
Choose a candidate model. Exponential: try \(\ln(y)\) vs \(x\). Power: try \(\ln(y)\) vs \(\ln(x)\). Logarithmic: try \(y\) vs \(\ln(x)\).
3
Create the transformed scatterplot. Compute the transformed values and plot them.
4
Check linearity. The transformed plot should appear linear, and the residual plot should show random scatter with no pattern.
5
Fit the regression on the transformed data. Report the equation and use it for predictions (remembering to back-transform).

Example 1: Bacterial Growth

A biologist counts bacteria every hour. The data is:

Hours (\(x\)) 0 1 2 3 4 5
Count (\(y\)) 50 120 280 700 1650 4000
\(\ln(y)\) 3.91 4.79 5.63 6.55 7.41 8.29

Example 1: Transformed Plot

Hours (x) ln(y) 3.5 5.0 6.5 8.0 0 1 2 3 4
\(\widehat{\ln(y)} = 3.89 + 0.876x\)

The Back-Transform Step

After fitting a regression on transformed data, you must undo the transformation to make predictions in the original units. This is called back-transforming.

1
If you took \(\ln(y)\): exponentiate both sides. If \(\widehat{\ln(y)} = a + bx\), then \(\hat{y} = e^{a + bx}\).
2
If you took \(\ln(x)\): no back-transform needed for \(y\). Just plug in \(\ln(x)\) when predicting.
3
If you took \(\ln\) of both: exponentiate: \(\hat{y} = e^{a + b\ln(x)} = e^a \cdot x^b\).

Example 2: Planet Orbital Data

Kepler's third law relates a planet's distance from the sun (\(x\), in AU) to its orbital period (\(y\), in Earth years). The relationship is a power model.

Planet Distance (AU) Period (yr) \(\ln(x)\) \(\ln(y)\)
Mercury0.390.24-0.94-1.43
Venus0.720.62-0.33-0.48
Earth1.001.000.000.00
Mars1.521.880.420.63
Jupiter5.2011.861.652.47

Example 2: \(\ln(y)\) vs \(\ln(x)\) Plot

ln(distance) ln(period) -1.8 0.0 2.0 -1.2 0 1.2
slope \(\approx 1.5\) (Kepler's Law!)

Checking with Residual Plots

A good transformation produces a residual plot with no discernible pattern. If the residuals still curve, the transformation was not the right one.

✕ Patterned Residuals ✓ Random Residuals

Common Mistakes

✕ Forgetting to Back-Transform
You fit the model on \(\ln(y)\), but report predictions in \(\ln\) units instead of exponentiating back to the original scale.
✕ Wrong Variable Transformed
Taking \(\ln(x)\) when the data is exponential (should transform \(y\)), or taking \(\ln(y)\) when only \(x\) needs transformation.
✕ Ignoring Residual Plots
Assuming the transformation worked without checking that the transformed residuals show random scatter.

Summary of Transformations

If the Original Pattern Is... Try This Plot Model Form Back-Transform
Exponential growth/decay \(\ln(y)\) vs \(x\) \(y = ab^x\) \(\hat{y} = e^{a+bx}\)
Power relationship \(\ln(y)\) vs \(\ln(x)\) \(y = ax^p\) \(\hat{y} = e^a \cdot x^b\)
Logarithmic growth \(y\) vs \(\ln(x)\) \(y = a + b\ln(x)\) None needed

Question 1 of 5

If a scatterplot of \(\ln(y)\) vs \(x\) appears linear, which model best describes the original data?

Question 2 of 5

A regression on transformed data yields \(\widehat{\ln(y)} = 2.1 + 0.45x\). What is the predicted value of \(y\) when \(x = 4\)?

Question 3 of 5

To linearize a power model \(y = ax^p\), you should plot:

Question 4 of 5

After applying a \(\ln(y)\) transformation and fitting a regression, the residual plot of the transformed data shows a clear U-shaped pattern. What should you conclude?

Question 5 of 5

A regression on \(\ln(y)\) vs \(\ln(x)\) produces the equation \(\widehat{\ln(y)} = 1.2 + 0.75\ln(x)\). Which equation describes the original relationship?