Use Data to Build a Logarithmic Model

Site: Saylor Academy
Course: MA001: College Algebra
Book: Use Data to Build a Logarithmic Model
Printed by: Guest user
Date: Saturday, May 18, 2024, 7:15 AM

Description

Now, we will practice building models using datasets. Here, you will see a short video on using an online graphing calculator to do the calculations required. Billions of data points are collected every year in fields from consumer behavior to weather. Fitting this data to a model allows us to explore the behaviors we observe around us meaningfully. The first model you will build is logarithmic.

Building an Exponential Model from Data

Learning Objectives

In this section, you will:

  • Build an exponential model from data.
  • Build a logarithmic model from data.
  • Build a logistic model from data.

In previous sections of this chapter, we were either given a function explicitly to graph or evaluate, or we were given a set of points that were guaranteed to lie on the curve. Then we used algebra to find the equation that fit the points exactly. In this section, we use a modeling technique called regression analysis to find a curve that models data collected from real-world observations. With regression analysis, we don't expect all the points to lie perfectly on the curve. The idea is to find a model that best fits the data. Then we use the model to make predictions about future events.

Do not be confused by the word model. In mathematics, we often use the terms function, equation, and model interchangeably, even though they each have their own formal definition. The term model is typically used to indicate that the equation or function approximates a real-world situation.

We will concentrate on three types of regression models in this section: exponential, logarithmic, and logistic. Having already worked with each of these functions gives us an advantage. Knowing their formal definitions, the behavior of their graphs, and some of their real-world applications gives us the opportunity to deepen our understanding. As each regression model is presented, key features and definitions of its associated function are included for review. Take a moment to rethink each of these functions, reflect on the work we've done so far, and then explore the ways regression is used to model real-world phenomena.


Building an Exponential Model from Data

As we've learned, there are a multitude of situations that can be modeled by exponential functions, such as investment growth, radioactive decay, atmospheric pressure changes, and temperatures of a cooling object. What do these phenomena have in common? For one thing, all the models either increase or decrease as time moves forward. But that's not the whole story. It's the way data increase or decrease that helps us determine whether it is best modeled by an exponential equation. Knowing the behavior of exponential functions in general allows us to recognize when to use exponential regression, so let's review exponential growth and decay.

Recall that exponential functions have the form y=ab^x or y=A_0e^{kx}. When performing regression analysis, we use the form most commonly used on graphing utilities, y=ab^x. Take a moment to reflect on the characteristics we've already learned about the exponential function y=ab^x (assume a > 0):

  • b must be greater than zero and not equal to one.
  • The initial value of the model is y=a.
    • If b > 1, the function models exponential growth. As x increases, the outputs of the model increase slowly at first, but then increase more and more rapidly, without bound.
    • If 0 < b < 1, the function models exponential decay. As x increases, the outputs for the model decrease rapidly at first and then level off to become asymptotic to the x-axis. In other words, the outputs never become equal to or less than zero.


As part of the results, your calculator will display a number known as the correlation coefficient, labeled by the variable r, or r^2. (You may have to change the calculator's settings for these to be shown.) The values are an indication of the "goodness of fit" of the regression equation to the data. We more commonly use the value of r^2 instead of r, but the closer either value is to 1, the better the regression equation approximates the data.


Exponential Regression

Exponential regression is used to model situations in which growth begins slowly and then accelerates rapidly without bound, or where decay begins rapidly and then slows down to get closer and closer to zero. We use the command "ExpReg" on a graphing utility to fit an exponential function to a set of data points. This returns an equation of the form,

y=ab^x

Note that:

  • b must be non-negative.
  • when b > 1, we have an exponential growth model.
  • when 0 < b < 1, we have an exponential decay model.

How To

Given a set of data, perform logarithmic regression using a graphing utility.

  1. Use the STAT then EDIT menu to enter given data.
    1. Clear any existing data from the lists.
    2. List the input values in the L1 column.
    3. List the output values in the L2 column.
  2. Graph and observe a scatter plot of the data using the STATPLOT feature.
    1. Use ZOOM [9] to adjust axes to fit the data.
    2. Verify the data follow a logarithmic pattern.
  3. Find the equation that models the data.
    1. Select "ExpReg" from the STAT then CALC menu.
    2. Use the values returned for a and b to record the model, y=ab^x.
  4. Graph the model in the same window as the scatterplot to verify it is a good fit for the data.

Try It #1
Table 2 shows a recent graduate's credit card balance each month after graduation.

Month 1 2 3 4 5 6 7 8
Debt ($) 620.00 761.88 899.80 1039.93 1270.63 1589.04 1851.31 2154.92

Table 2

ⓐ Use exponential regression to fit a model to these data.
ⓑ If spending continues at this rate, what will the graduate's credit card debt be one year after graduating?

Q&A
Is it reasonable to assume that an exponential regression model will represent a situation indefinitely?

No. Remember that models are formed by real-world data gathered for regression. It is usually reasonable to make estimates within the interval of original observation (interpolation). However, when a model is used to make predictions, it is important to use reasoning skills to determine whether the model makes sense for inputs far beyond the original observation interval (extrapolation).


Source: Rice University, https://openstax.org/books/college-algebra/pages/6-8-fitting-exponential-models-to-data
Creative Commons License This work is licensed under a Creative Commons Attribution 4.0 License.

Building a Logarithmic Model from Data

Just as with exponential functions, there are many real-world applications for logarithmic functions: intensity of sound, pH levels of solutions, yields of chemical reactions, production of goods, and growth of infants. As with exponential models, data modeled by logarithmic functions are either always increasing or always decreasing as time moves forward. Again, it is the way they increase or decrease that helps us determine whether a logarithmic model is best.

Recall that logarithmic functions increase or decrease rapidly at first, but then steadily slow as time moves on. By reflecting on the characteristics we've already learned about this function, we can better analyze real world situations that reflect this type of growth or decay. When performing logarithmic regression analysis, we use the form of the logarithmic function most commonly used on graphing utilities, y=a+bln(x). For this function

  • All input values, x, must be greater than zero.
  • The point (1,a) is on the graph of the model.
  • If b > 0 , the model is increasing. Growth increases rapidly at first and then steadily slows over time.
  • If b < 0, the model is decreasing. Decay occurs rapidly at first and then steadily slows over time.


Logarithmic Regression

Logarithmic regression is used to model situations where growth or decay accelerates rapidly at first and then slows over time. We use the command "LnReg" on a graphing utility to fit a logarithmic function to a set of data points. This returns an equation of the form,

y=a+bln(x)


Note that

  • all input values, x, must be non-negative.
  • when b > 0, the model is increasing.
  • when b < 0, the model is decreasing.


How To

Given a set of data, perform logarithmic regression using a graphing utility.

  1. Use the STAT then EDIT menu to enter given data.
    1. Clear any existing data from the lists.
    2. List the input values in the L1 column.
    3. List the output values in the L2 column.
  2. Graph and observe a scatter plot of the data using the STATPLOT feature.
    1. Use ZOOM [9] to adjust axes to fit the data.
    2. Verify the data follow a logarithmic pattern.
  3. Find the equation that models the data.
    1. Select "LnReg" from the STAT then CALC menu.
    2. Use the values returned for a and b to record the model, y=a+bln(x).
  4. Graph the model in the same window as the scatterplot to verify it is a good fit for the data.
Try It #2
Sales of a video game released in the year 2000 took off at first, but then steadily slowed as time moved on. Table 4 shows the number of games sold, in thousands, from the years 2000–2010.

Year 2000 2001 2002 2003 2004 2005
Number Sold (thousands) 142 149 154 155 159 161
Year 2006 2007 2008 2009 2010 -
Number Sold (thousands) 163 164 164 166 167 -

Table 4

ⓐ Let x represent time in years starting with x=1 for the year 2000. Let  y  represent the number of games sold in thousands. Use logarithmic regression to fit a model to these data.
ⓑ If games continue to sell at this rate, how many games will sell in 2015? Round to the nearest thousand.

Regressions



Source: Desmos, https://www.youtube.com/watch?v=VfC8uQGm5W8
Creative Commons License This work is licensed under a Creative Commons Attribution 4.0 License.