Statistics & Probability · Grades 11, 12
Fitting Exponential and Power Models with Logarithms
Quick answer
When a scatterplot curves, a line is the wrong model, but logarithms can straighten it. If y grows exponentially, y = abˣ, then ln y = ln a + x ln b is linear in x. If y follows a power law, y = axᵇ, then ln y = ln a + b ln x is linear in ln x. Fit a least-squares line to the transformed data, check its residuals, and undo the logarithm to get the model. A straight plot of ln y against x signals exponential growth; a straight plot of ln y against ln x signals a power law.
What you'll learn
- Recognize curved patterns that call for a transformation
- Fit an exponential model by regressing ln y on x
- Fit a power model by regressing ln y on ln x
- Transform a fitted line back into a model and make predictions
Straightening a curve
A least-squares line fits linear patterns. Many real relationships curve instead: populations, investments, the orbits of planets. Logarithms can turn those curves into lines.
| Model | Take logs | Plot | Slope | Intercept |
|---|---|---|---|---|
| exponential, | vs. | |||
| power, | vs. |
The steps: transform, fit a line to the transformed data, check the residuals, then undo the logarithm.
Why logarithms straighten exponential data
Exponential growth multiplies by the same factor at each step in . A logarithm turns multiplication into addition: . So each step in adds the same amount to , and a constant step is exactly what a straight line shows. For a power law, multiplying by a factor multiplies by a fixed power of that factor, so equal steps in give equal steps in .
- ln ŷ = 1.605 + 0.402x
Worked examples
Common mistakes
Practice problems
-
A fit gives . Write the model for .
Answer
Full solution
Exponentiate both sides.
-
A fit gives . Write the model.
Answer
Full solution
.
-
In Example 1, predict at .
Answer
About
Full solution
.
-
In Example 2, predict the count at hours.
Answer
About
Full solution
.
-
A plot of against curves, but against is straight. Which model fits?
Answer
A power model,
Full solution
A straight log-log plot is the signature of a power law.
-
In an exponential fit the slope of against is . Find the doubling time.
Answer
About
Full solution
.
-
Using Kepler’s law , find the period of a planet with .
Answer
years
Full solution
.
-
A student reports the prediction at in Example 1 as . What went wrong?
Answer
is ; the prediction is .
Full solution
The fitted line lives on the log scale. Undo the logarithm before reporting.
Frequently asked questions
How do you fit an exponential model to data?
Take ln y, fit a least-squares line ln ŷ = c + mx, then transform back: ŷ = eᶜ(eᵐ)ˣ.
How do you tell whether data are exponential?
Plot ln y against x. If the points fall close to a line with patternless residuals, an exponential model fits.
How do you fit a power model?
Regress ln y on ln x. The slope is the power b and eᶜ is the coefficient a, giving ŷ = axᵇ.
Does it matter which logarithm I use?
No, as long as you undo the same one. With base-10 logs, transform back with powers of 10.
What does the slope of ln y against x mean?
It is the continuous growth rate. eᵐ is the growth factor per unit of x, and ln 2/m is the doubling time.
Standards alignment
This lesson covers the following Common Core State Standards for Mathematics.
- CCSS.MATH.CONTENT.HSS.ID.B.6aInterpreting Categorical and Quantitative DataFit a function to the data; use functions fitted to data to solve problems in the context of the data.