Transformations for Linearity

Use power, logarithmic, and exponential transformations to achieve linearity.

🎯⭐ INTERACTIVE LESSON

Try the Interactive Version!

Learn step-by-step with practice exercises built right in.

Start Interactive Lesson →

Transformations to Achieve Linearity

Why Transform?

When the relationship between xx and yy is not linear, we can transform one or both variables to make the relationship linear. This allows us to use linear regression methods.

Common Nonlinear Patterns

Exponential Growth: y=abxy = ab^x

Take the logarithm of y: ln(y)=ln(a)+xln(b)\ln(y) = \ln(a) + x \cdot \ln(b)

This is linear in xx vs. ln(y)\ln(y).

Power Model: y=axby = ax^b

Take the logarithm of both x and y: ln(y)=ln(a)+bln(x)\ln(y) = \ln(a) + b \cdot \ln(x)

This is linear in ln(x)\ln(x) vs. ln(y)\ln(y).

Steps for Transformation

  1. Examine the scatterplot: Identify the type of curve
  2. Apply the appropriate transformation
  3. Check the residual plot: Should show random scatter
  4. Check r2r^2: Should be high
  5. Write the model: In transformed and original form

Logarithmic Transformation Summary

| Original Model | Transform | Linear Form | |----------------|-----------|-------------| | y=abxy = ab^x (exponential) | ln(y)\ln(y) | ln(y)=ln(a)+(lnb)x\ln(y) = \ln(a) + (\ln b)x | | y=axby = ax^b (power) | ln(x)\ln(x) and ln(y)\ln(y) | ln(y)=ln(a)+bln(x)\ln(y) = \ln(a) + b \cdot \ln(x) |

Making Predictions with Transformed Models

After fitting a model to ln(y)\ln(y):

  1. Find ln(y)^\widehat{\ln(y)} using the regression equation
  2. Back-transform: y^=eln(y)^\hat{y} = e^{\widehat{\ln(y)}}

Example: Exponential Model

Data suggests exponential growth. After plotting xx vs. ln(y)\ln(y):

Regression: ln(y)^=1.2+0.5x\widehat{\ln(y)} = 1.2 + 0.5x

To predict yy when x=3x = 3:

  1. ln(y)^=1.2+0.5(3)=2.7\widehat{\ln(y)} = 1.2 + 0.5(3) = 2.7
  2. y^=e2.714.88\hat{y} = e^{2.7} \approx 14.88

Evaluating the Transformation

A good transformation produces:

  • A linear scatterplot (in the transformed variables)
  • A random residual plot
  • A high r2r^2 value
  • A reasonable model in context

Square Root Transformation

Sometimes y\sqrt{y} vs. xx works well for count data or data where variability increases with the mean.

AP Tip: On the AP exam, you may be given transformed data and asked to interpret the regression. Be comfortable going back and forth between ln(y)\ln(y) and yy using the exponential function.

📚 Practice Problems

No example problems available yet.