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.
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, percentagewise, 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 valuewise 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 semilog graph.
Definition: Semilog and Loglog Graphs 


Example 2  

Plot 5 points on the graph of \(f(x)=3(2)^x\) on a semilog 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
Plotting these values on a semilog graph, 
Notice that on this semilog 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 semilog 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
 An exponential graph is plotted on a semilog 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 semilog 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
 Find the log of the data output values
 Find the linear equation that fits the (input, log(output)) pairs. This equation will be of the form \(\log(f(x)) = b + mx\)
 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
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.
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 nonexponential 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
 The table below shows the value V, in billions of dollars, of US imports from China t years after 2000.
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
 Semilog graph
 Loglog graph
 Linearizing exponential functions
 Fitting an exponential equation to data
Try it Now Answers
1.
2. . Predicting in 2011, billion dollars
Section 4.7 Exercises
Graph each function on a semilog scale, then find a formula for the linearized function in the form .
1. 2.
3. 4.
The graph below is on a semilog scale, as indicated. Find a formula for the exponential function .
5. 6.
7. 8.
Use regression to find an exponential function that best fits the data given.
9. 
 
10. 
 
11. 
 
12. 

 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 
 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 
 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 
 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 
[1] Selected values from http://www.swivel.com/workbooks/26190CostPerMegabyteofHardDriveSpace, retrieved Aug 26, 2010
Contributors
 David Lippman (Pierce College)
 Melonie Rasmussen (Pierce College)