Skip to main content
\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)
Mathematics LibreTexts

4.7 Fitting Exponentials to Data

In the previous section, we saw number lines using logarithmic scales. It is also common to see two dimensional graphs with one or both axes using a logarithmic scale.

One common use of a logarithmic scale on the vertical axis is to graph quantities that are changing exponentially, since it helps reveal relative differences. This is commonly used in stock charts, since values historically have grown exponentially over time. Both stock charts below show the Dow Jones Industrial Average, from 1928 to 2010.

1.jpg

2.jpg

Both charts have a linear horizontal scale, but the first graph has a linear vertical scale, while the second has a logarithmic vertical scale. The first scale is the one we are more familiar with, and shows what appears to be a strong exponential trend, at least up until the year 2000. 

Example 1

There were stock market drops in 1929 and 2008.  Which was larger?

SOLUTION

In the first graph, the stock market drop around 2008 looks very large, and in terms of dollar values, it was indeed a large drop.  However the second graph shows relative changes, and the drop in 2009 seems less major on this graph, and in fact the drop starting in 1929 was, percentage-wise, much more significant. 

Specifically, in 2008, the Dow value dropped from about 14,000 to 8,000, a drop of 6,000.  This is obviously a large value drop, and amounts to about a 43% drop.  In 1929, the Dow value dropped from a high of around 380 to a low of 42 by July of 1932.  While value-wise this drop of 338 is much smaller than the 2008 drop, it corresponds to a 89% drop, a much larger relative drop than in 2008.  The logarithmic scale shows these relative changes.

The second graph above, in which one axis uses a linear scale and the other axis uses a logarithmic scale, is an example of a semi-log graph. 

Definition: Semi-log and Log-log Graphs
  • A semi-log graph is a graph with one axis using a linear scale and one axis using a logarithmic scale.
  • A log-log graph is a graph with both axes using logarithmic scales.
Example 2

Plot 5 points on the graph of \(f(x)=3(2)^x\) on a semi-log graph with a logarithmic scale on the vertical axis.

SOLUTION

To do this, we need to find 5 points on the graph, then calculate the logarithm of the output value. Arbitrarily choosing 5 input values,9

\[x\] \[f(x)\] \[\log(f(x))\]
-3 \[3(2)^{-3}=\dfrac{3}{9}\] 0.426
-1 \[3(2)^{-1}=\dfrac{3}{2}\] 0.176
0 \[3(2)^{0}=3\] 0.477
2 \[3(2)^{2}=12\] 1.079
5 \[3(2)^{5}=96\] 1.982

Plotting these values on a semi-log graph,

Notice that on this semi-log scale, values from the exponential function appear linear.  We can show this behavior is expected by utilizing logarithmic properties. For the function \(f(x)=ab^x\), finding \(\log(f(x))\) gives

\[\log(f(x))=\log(ab^x)\]

Utilizing the sum property of logs,

\[\log(f(x))=\log(a) + \log(b^x)\]  

Now utilizing the exponent property,

\[\log(f(x))=\log(a) + x\log(b)\]

This relationship is linear, with \(\log(a)\) as the vertical intercept, and \(\log(b)\) as the slope. This relationship can also be utilized in reverse.

Example 3

An exponential graph is plotted on a semi-log graph below. Find a formula for the exponential function \(g(x)\) that generated this graph.

SOLUTION

The graph is linear, with vertical intercept at (0, 1). Looking at the change between the points (0, 1) and (4, 4), we can determine the slope of the line is \(\dfrac{3}{4}\). Since the output is \(\log(g(x))\), this leads to the equation:

\[\log(g(x))=1+\dfrac{3}{4}x \]

We can solve this formula for \(g(x)\) by rewriting in exponential form and simplifying:

\[g(x)= 10^{1+\frac{3}{4}x} \]

Breaking this apart using exponent rules,

\[g(x)= 10^{1} \times 10^{\frac{3}{4}x} \]

Using exponent rules to group the second factor,

\[g(x)= 10^{1} \times \left(10^{\frac{3}{4}}\right)^x\]

Evaluating the powers of 10,

\[g(x) = 10(5.623)^x\]

 

Try it Now

  1. An exponential graph is plotted on a semi-log graph below. Find a formula for the exponential function \(g(x)\) that generated this graph.

Fitting Exponential Functions to Data

Some technology options provide dedicated functions for finding exponential functions that fit data, but many only provide functions for fitting linear functions to data. The semi-log scale provides us with a method to fit an exponential function to data by building upon the techniques we have for fitting linear functions to data. 

To fit an exponential function to a set of data using linearization

  1. Find the log of the data output values
  2. Find the linear equation that fits the (input, log(output)) pairs. This equation will be of the form \(\log(f(x)) = b + mx\)
  3. Solve this equation for the exponential function \(f(x)\)

 

Example 4

The table below shows the cost in dollars per megabyte of storage space on computer hard drives from 1980 to 2004[1], and the data is shown on a standard graph to the right, with the input changed to years after 1980

 

Year Cost per MB
1980 192.31
1984 87.86
1988 15.98
1992 4
1996 0.173
2000 0.006849
2004 0.001149

This data appears to be decreasing exponentially. To find a function that models this decay, we would start by finding the log of the costs.

Year Cost per MB \[\log(\text{Cost})\]
1980 192.31 2.284001
1984 87.86 1.943791
1988 15.98 1.203577
1992 4 0.60206
1996 0.173 -0.76195
2000 0.006849 -2.16437
2004 0.001149 -2.93953

SOLUTION

As expected, the graph of the log of costs appears fairly linear, suggesting an exponential function will fit the original data reasonably well. Using technology, we can find a linear equation to fit the \(\log(\text{Cost})\) values. Using \(t\) as years after 1980, linear regression gives the equation:

\[ \log (C(t)) = 2.794 - 0.231 t\]

Solving for \(C(t)\),

\[ (C(t)) = 10^{2.794 - 0.231 \,t}\]

\[ (C(t)) = 10^{2.794} \times 10^{ 0.231 \,t}\]

\[ (C(t)) = 10^{2.794} \times \left(10^{ 0.231} \right)^t\]

\[ (C(t)) = 622 (0.5877)^t\]          

This equation suggests that the cost per megabyte for storage on computer hard drives is decreasing by about 41% each year. Using this function, we could predict the cost of storage in the future. Predicting the cost in the year 2020 (\(t = 40\)):

\(C(40)=622 (0.5877)^{40} \approx 0.000000364 \) dollars per megabyte, a really small number. That is equivalent to $0.36 per terabyte of hard drive storage.

Comparing the values predicted by this model to the actual data, we see the model matches the original data in order of magnitude, but the specific values appear quite different. This is, unfortunately, the best exponential model that can fit the data. It is possible that a non-exponential model would fit the data better, or there could just be wide enough variability in the data that no relatively simple model would fit the data any better.

 

1980
1984
1988
1992
1996
2000
2004
1980
1984
1988
1992
1996
2000
2004

Try it Now

  1. The table below shows the value V, in billions of dollars, of US imports from China t years after 2000. 

Text Box: year	2000	2001	2002	2003	2004	2005
t	0	1	2	3	4	5
V	100	102.3	125.2	152.4	196.7	243.5

This data appears to be growing exponentially. Linearize this data and build a model to predict how many billions of dollars of imports were expected in 2011.

Important Topics of this Section

  • Semi-log graph
  • Log-log graph
  • Linearizing exponential functions
  • Fitting an exponential equation to data

 

Try it Now Answers

1. File:/C:\Users\JIMHOR~1\AppData\Local\Temp\msohtmlclip1\01\clip_image060.gif

2. File:/C:\Users\JIMHOR~1\AppData\Local\Temp\msohtmlclip1\01\clip_image062.gif.  Predicting in 2011, File:/C:\Users\JIMHOR~1\AppData\Local\Temp\msohtmlclip1\01\clip_image064.gifbillion dollars

Section 4.7 Exercises

Graph each function on a semi-log scale, then find a formula for the linearized function in the form File:/C:\Users\JIMHOR~1\AppData\Local\Temp\msohtmlclip1\01\clip_image066.gif.

1. File:/C:\Users\JIMHOR~1\AppData\Local\Temp\msohtmlclip1\01\clip_image068.gif                                           2. File:/C:\Users\JIMHOR~1\AppData\Local\Temp\msohtmlclip1\01\clip_image070.gif                  

3. File:/C:\Users\JIMHOR~1\AppData\Local\Temp\msohtmlclip1\01\clip_image072.gif                                         4. File:/C:\Users\JIMHOR~1\AppData\Local\Temp\msohtmlclip1\01\clip_image074.gif

The graph below is on a semi-log scale, as indicated.  Find a formula for the exponential function File:/C:\Users\JIMHOR~1\AppData\Local\Temp\msohtmlclip1\01\clip_image076.gif.

5.File:/C:\Users\JIMHOR~1\AppData\Local\Temp\msohtmlclip1\01\clip_image078.jpg                   6.File:/C:\Users\JIMHOR~1\AppData\Local\Temp\msohtmlclip1\01\clip_image080.jpg

 

 7. File:/C:\Users\JIMHOR~1\AppData\Local\Temp\msohtmlclip1\01\clip_image082.jpg                 8. File:/C:\Users\JIMHOR~1\AppData\Local\Temp\msohtmlclip1\01\clip_image084.jpg

 

Use regression to find an exponential function that best fits the data given.

9.

x

1

2

3

4

5

6

y

1125

1495

2310

3294

4650

6361

10.

x

1

2

3

4

5

6

y

643

829

920

1073

1330

1631

11.

x

1

2

3

4

5

6

y

555

383

307

210

158

122

12.

x

1

2

3

4

5

6

y

699

701

695

668

683

712

  1. Total expenditures (in billions of dollars) in the US for nursing home care are shown below.  Use regression to find an exponential function that models the data.  What does the model predict expenditures will be in 2015?

Year

1990

1995

2000

2003

2005

2008

Expenditure

53

74

95

110

121

138

  1. Light intensity as it passes through water decreases exponentially with depth.  The data below shows the light intensity (in lumens) at various depths.  Use regression to find an function that models the data.  What does the model predict the intensity will be at 25 feet?

Depth (ft)

3

6

9

12

15

18

Lumen

11.5

8.6

6.7

5.2

3.8

2.9

  1. The average price of electricity (in cents per kilowatt hour) from 1990 through 2008 is given below.  Determine if a linear or exponential model better fits the data, and use the better model to predict the price of electricity in 2014.

Year

1990

1992

1994

1996

1998

2000

2002

2004

2006

2008

Cost

7.83

8.21

8.38

8.36

8.26

8.24

8.44

8.95

10.40

11.26

  1. The average cost of a loaf of white bread from 1986 through 2008 is given below. Determine if a linear or exponential model better fits the data, and use the better model to predict the price of a loaf of bread in 2016.

Year

1986

1988

1990

1995

1997

2000

2002

2004

2006

2008

Cost

0.57

0.66

0.70

0.84

0.88

0.99

1.03

0.97

1.14

1.42

Contributors

  • David Lippman (Pierce College)
  • Melonie Rasmussen (Pierce College)