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.

ModelTake logsPlotSlopeIntercept
exponential, y=abxy = ab^xln⁡y=ln⁡a+xln⁡b\ln y = \ln a + x\ln bln⁡y\ln y vs. xxln⁡b\ln bln⁡a\ln a
power, y=axby = ax^bln⁡y=ln⁡a+bln⁡x\ln y = \ln a + b\ln xln⁡y\ln y vs. ln⁡x\ln xbbln⁡a\ln a

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 yy by the same factor bb at each step in xx. A logarithm turns multiplication into addition: ln⁡(by)=ln⁡y+ln⁡b\ln(by) = \ln y + \ln b. So each step in xx adds the same amount ln⁡b\ln b to ln⁡y\ln y, and a constant step is exactly what a straight line shows. For a power law, multiplying xx by a factor multiplies yy by a fixed power of that factor, so equal steps in ln⁡x\ln x give equal steps in ln⁡y\ln y.

ln y against x for the data in Example 1 Five points (0, 1.609), (1, 2.001), (2, 2.407), (3, 2.809) and (4, 3.215), the natural logs of y = 5.0, 7.4, 11.1, 16.6 and 24.9. They lie almost exactly on the fitted line ln ŷ = 1.605 + 0.402x. 1234123xln(y)
  • ln ŷ = 1.605 + 0.402x
ln y against x for the data in Example 1

Worked examples

Common mistakes

Practice problems

  1. A fit gives ln⁡y^=2+0.3x\ln\hat{y} = 2 + 0.3x. Write the model for yy.

    Answer

    y^=e2(e0.3)x≈7.39(1.35)x\hat{y} = e^2(e^{0.3})^x \approx 7.39(1.35)^x

    Full solution

    Exponentiate both sides.

  2. A fit gives ln⁡y^=1.1+2ln⁡x\ln\hat{y} = 1.1 + 2\ln x. Write the model.

    Answer

    y^=e1.1x2≈3.0x2\hat{y} = e^{1.1}x^2 \approx 3.0x^2

    Full solution

    y^=e1.1e2ln⁡x=e1.1x2\hat{y} = e^{1.1}e^{2\ln x} = e^{1.1}x^2.

  3. In Example 1, predict yy at x=5x = 5.

    Answer

    About 37.237.2

    Full solution

    e1.605+0.402⋅5=e3.615e^{1.605 + 0.402 \cdot 5} = e^{3.615}.

  4. In Example 2, predict the count at 1010 hours.

    Answer

    About 1,2801{,}280

    Full solution

    e4.782+2.37=e7.152e^{4.782 + 2.37} = e^{7.152}.

  5. A plot of ln⁡y\ln y against xx curves, but ln⁡y\ln y against ln⁡x\ln x is straight. Which model fits?

    Answer

    A power model, y=axby = ax^b

    Full solution

    A straight log-log plot is the signature of a power law.

  6. In an exponential fit the slope of ln⁡y\ln y against tt is 0.10.1. Find the doubling time.

    Answer

    About 6.936.93

    Full solution

    ln⁡20.1\tfrac{\ln 2}{0.1}.

  7. Using Kepler’s law T=a1.5T = a^{1.5}, find the period of a planet with a=4a = 4.

    Answer

    88 years

    Full solution

    41.5=(4)3=84^{1.5} = \left(\sqrt{4}\right)^3 = 8.

  8. A student reports the prediction at x=6x = 6 in Example 1 as 4.0174.017. What went wrong?

    Answer

    4.0174.017 is ln⁡y^\ln\hat{y}; the prediction is e4.017≈55.5e^{4.017} \approx 55.5.

    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.