Skip to content

Transformations for Linearity

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

Written and reviewed by the Study Mondo Education TeamLast updated
🎯⭐ INTERACTIVE LESSON

Try the Interactive Version!

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

Start Interactive Lesson →

🔄 Transformations to Achieve Linearity

When and Why Transform

Problem: Scatterplot or residual plot shows curved (non-linear) pattern.

Solution: Transform one or both variables to "straighten" the relationship.

Common growth patterns:

  • Exponential: y=a⋅bxy = a \cdot b^x (rapid growth)
  • Power: y=a⋅xpy = a \cdot x^p (slower, curved growth)
  • Logarithmic: y=a+bln⁡(x)y = a + b \ln(x) (rapid growth at first, then levels off)

Log Transformation of y (for Exponential Growth)

When: Scatterplot shows exponential shape; residuals curve upward.

Transform: Let y′=log⁡(y)y' = \log(y) or y′=ln⁡(y)y' = \ln(y)

Now: y′=a+bxy' = a + bx is approximately linear

Regression: Fit y′=a+bxy' = a + bx

Back-transformation (for predictions): y=10a+bxory=ea+bxy = 10^{a+bx} \quad \text{or} \quad y = e^{a+bx}

Log-Log Transformation (for Power Relationships)

When: Both variables show exponential/power growth; need y=a⋅xpy = a \cdot x^p

Transform: Let x′=log⁡(x)x' = \log(x) and y′=log⁡(y)y' = \log(y)

Now: y′=log⁡(a)+p⋅x′y' = \log(a) + p \cdot x' is linear

Back-transformation: y=10log⁡(a)⋅xpy = 10^{\log(a)} \cdot x^p

Worked Example: Exponential Transformation

Data: Bacteria population vs. time (hours)

HoursCount
0100
1150
2225
3340

Scatterplot shows rapid growth (exponential).

Transform: y′=ln⁡(Count)y' = \ln(\text{Count})

Hoursy′y'
04.61
15.01
25.42
35.83

Linear regression on y′y' vs. Hours: y′=4.61+0.407⋅Hoursy' = 4.61 + 0.407 \cdot \text{Hours}

Prediction: At hour 4: y′=4.61+0.407(4)=6.238y' = 4.61 + 0.407(4) = 6.238

Back-transform: y=e6.238≈508y = e^{6.238} \approx 508 bacteria

Common Mistakes

❌ Transforming without checking scatterplot first ❌ Forgetting to back-transform predictions ❌ Using log base 10 and natural log inconsistently ❌ Log(negative number) — ensure all values positive!

AP Exam Tip

Show the original scatterplot. State "The relationship appears exponential, so I used ln(y)." Show the transformed scatterplot. Report R2R^2 for the transformed data. Always back-transform final predictions.

📚 Practice Problems

1Problem 1medium

❓ Question:

A scatterplot of x vs y shows a curved exponential pattern. The residual plot for ŷ = a + bx is curved. Try plotting log(y) vs x. What pattern should you see if this transformation works?

💡 Show Solution

Step 1: Understand the original problem

  • Scatterplot shows exponential curve (y = ae^(bx))
  • Linear model residuals are curved
  • Need to linearize the relationship

Step 2: Why try log(y) vs x? Exponential relationship: y = ae^(bx) Take log of both sides: log(y) = log(a) + bx

This is LINEAR in x!

Step 3: What to look for after transformation If log transformation is appropriate: ✓ Scatterplot of log(y) vs x should be LINEAR ✓ Residual plot should show RANDOM scatter ✓ No curved pattern in residuals

Step 4: How to check

  1. Create new variable: y' = log(y)
  2. Plot y' vs x (should be linear)
  3. Fit regression: ŷ' = b₀ + b₁x
  4. Check residual plot (should be random)

Step 5: Interpretation After transformation:

  • Can use linear regression on log(y) vs x
  • To predict y: ŷ = e^(b₀ + b₁x)
  • Or: ŷ = e^(b₀) × e^(b₁x)

Answer: After log transformation, the plot of log(y) vs x should show a LINEAR pattern, and residuals should be randomly scattered with no curve.

2Problem 2hard

❓ Question:

Data shows a power relationship: y = ax^b. What transformation will linearize this relationship?

💡 Show Solution

Step 1: Identify the relationship Power model: y = ax^b (Example: area = πr², where b = 2)

Step 2: Apply log transformation to BOTH variables Take log of both sides: log(y) = log(a × x^b) log(y) = log(a) + log(x^b) log(y) = log(a) + b·log(x)

Step 3: Recognize linear form Let: Y = log(y), X = log(x), A = log(a) Then: Y = A + bX

This is LINEAR!

Step 4: How to transform

  1. Create Y = log(y)
  2. Create X = log(x)
  3. Plot Y vs X (should be linear)
  4. Fit regression: Ŷ = b₀ + b₁X

Step 5: Interpret coefficients After regression:

  • b₁ = power (exponent b)
  • b₀ = log(a), so a = e^(b₀) or a = 10^(b₀)

To predict original y: ŷ = e^(b₀) × x^(b₁) [if using natural log] ŷ = 10^(b₀) × x^(b₁) [if using log base 10]

Example: If Ŷ = 2 + 1.5X (using log base 10) Then y = 10² × x^1.5 = 100x^1.5

Answer: Take log of BOTH variables. Plot log(y) vs log(x), which linearizes power relationships.

3Problem 3hard

❓ Question:

After fitting y vs x, the residual plot fans out (variance increases). You try log(y) vs x and get a better residual plot. Why does this help?

💡 Show Solution

Step 1: Identify the original problem Fan-shaped residuals mean:

  • Variance increases with x
  • Violates constant variance assumption
  • Often occurs when y grows exponentially

Step 2: Why log(y) helps with variance When y is exponential or multiplicative:

  • Larger y values have larger variability
  • Variance proportional to mean
  • log transformation STABILIZES variance

Mathematical reason: If y has variance proportional to y²: Var(y) ∝ y²

Then: Var(log(y)) ≈ constant (Delta method from calculus)

Step 3: Additional benefit Log transformation often: ✓ Linearizes exponential relationships ✓ Stabilizes variance (fixes fan shape) ✓ Makes distribution more symmetric ✓ Reduces impact of outliers

Step 4: When to use log transformation Use log(y) when you see:

  • Exponential growth pattern
  • Fan-shaped residuals
  • Right-skewed distribution
  • Multiplicative relationships
  • Variance increases with mean

Step 5: Check after transformation After using log(y):

  1. Residual plot should show equal spread
  2. No fan shape
  3. Random scatter
  4. Valid for inference

Answer: Log transformation stabilizes variance. When variance increases with mean (fan shape), log(y) typically has constant variance, fixing the heteroscedasticity problem.

4Problem 4medium

❓ Question:

You fit log(y) = 2 + 0.5x using natural log. Predict y when x = 10.

💡 Show Solution

Step 1: Understand the model Fitted equation: log(y) = 2 + 0.5x This uses NATURAL LOG (ln)

Step 2: Predict log(y) for x = 10 log(y) = 2 + 0.5(10) log(y) = 2 + 5 log(y) = 7

Step 3: Back-transform to get y Since we used natural log (ln): ln(y) = 7

To solve for y, use exponential: y = e^7

Step 4: Calculate y = e^7 ≈ 1,096.63

Step 5: Interpretation "When x = 10, y is predicted to be approximately 1,097."

Important notes:

  • Must back-transform using e^(predicted value)
  • If using log₁₀, would use 10^(predicted value)
  • Always specify which log was used!

Alternative form: Original model: y = e^(2 + 0.5x) = e² × e^(0.5x) y = e² × e^(0.5x) ≈ 7.39 × e^(0.5x)

When x = 10: y = 7.39 × e^5 ≈ 1,097

Answer: y = e^7 ≈ 1,097

5Problem 5hard

❓ Question:

A residual plot shows both curvature AND fan shape. What transformations might you try?

💡 Show Solution

Step 1: Identify TWO problems

  1. Curvature → nonlinear relationship
  2. Fan shape → non-constant variance

Need transformation that fixes BOTH!

Step 2: Try log(y) vs x Often works for:

  • Exponential relationships (fixes curve)
  • Multiplicative error (fixes fan)
  • Right-skewed data

Check result: ✓ Should be linear ✓ Should have constant variance

Step 3: If log(y) doesn't work completely Try other transformations:

  • √y vs x (square root)
  • 1/y vs x (reciprocal)
  • log(y) vs log(x) (both sides)

Step 4: Systematic approach

  1. Try log(y) vs x first (most common)
  2. Check residual plot
  3. If still curved, try log-log or other
  4. If variance still not constant, try different transformation

Step 5: Decision guide Pattern → Try transformation:

  • Exponential curve + fan → log(y) vs x
  • Power relationship → log(y) vs log(x)
  • Moderate curve → √y vs x
  • Strong right skew → log(y)

Step 6: After transformation Must verify: ✓ Scatterplot is linear ✓ Residuals randomly scattered ✓ Constant variance (no fan) ✓ Approximately normal residuals

Answer: Try log(y) vs x first, as it often fixes both curvature (exponential) and fan shape (non-constant variance). Check residual plot; if issues remain, try other transformations like √y or log-log.

Explain using:

⚠️ Common Mistakes: Transformations for Linearity

Avoid these 3 frequent errors

📌 Related Topics in Unit 2: Exploring Two-Variable Data

❓ Frequently Asked Questions

What is Transformations for Linearity?▾
Use power, logarithmic, and exponential transformations to achieve linearity.
How can I study Transformations for Linearity effectively?▾
Start by reading the study notes and working through the examples on this page. Then use the flashcards to test your recall. Practice with the 5 problems provided, checking solutions as you go. Regular review and active practice are key to retention.
Is this Transformations for Linearity study guide free?▾
Yes — all study notes, flashcards, and practice problems for Transformations for Linearity on Study Mondo are free to access. No account is needed.
What course covers Transformations for Linearity?▾
Transformations for Linearity is part of the AP Statistics course on Study Mondo, specifically in the Unit 2: Exploring Two-Variable Data section. You can explore the full course for more related topics and practice resources.
Are there practice problems for Transformations for Linearity?▾
Yes, this page includes 5 practice problems with detailed solutions. Each problem includes a step-by-step explanation to help you understand the approach.