Free for students · Ad-free · WCAG 2.1 AA Compliant · Accessibility

Logarithmic Function Context and Data Modeling

Lesson ~11 min read 8 MCQs

In simple terms: In simple terms, logarithmic modeling is about describing situations where growth starts fast and then slows down, like how extra study hours give you diminishing returns on a test score.

Why this matters

Think about studying for a big AP exam. The first hour you study, you learn a ton of new concepts. Your score might jump from a 50 to a 65. That’s a huge gain! The second hour is also productive, maybe getting you to a 75. But what about the tenth hour? You’re mostly reviewing and refining. That hour might only nudge your score from a 94 to a 95. The effort is the same (one hour), but the return diminishes.

This pattern—fast growth at the beginning that levels off over time—is everywhere. Learning an instrument, training for a 5k, or even how your eyes adjust to a dark room. Exponential functions can't capture this "slowing down" story. For that, we need their inverses: logarithmic functions. In this lesson, we'll learn how to build and use logarithmic models to describe and predict these "diminishing returns" scenarios.

Comparison of linear, exponential, and logarithmic growth patterns.

Concept overview

flowchart TD
    A[Start: Have a real-world data set] --> B{Does the data show slowing growth?};
    B -- Yes --> C[Choose a logarithmic model <br> y = a + b ln(x)];
    B -- No --> D[Consider other models <br> (Linear, Exponential, etc.)];
    C --> E{How many data points?};
    E -- Two Points --> F[Solve system of equations <br> algebraically for a and b];
    E -- Many Points --> G[Use technology for <br> logarithmic regression (LnReg)];
    F --> H[Construct the final model equation];
    G --> H;
    H --> I[Use the model to make predictions];
This diagram shows a flowchart for data modeling. It starts with a data set and asks if the growth is slowing. If yes, it directs to a logarithmic model, with paths for solving with two points or using regression for many points, both leading to a final model used for prediction. If no, it suggests other models.

Core explanation

In our last unit, we saw how exponential functions model things that grow by a constant percentage over equal time intervals, like compound interest or population growth. This leads to that classic, ever-steepening curve of runaway growth.

Logarithmic models tell the opposite story: the story of diminishing returns.

The Core Idea: Flipping the Script

Remember that logarithmic functions are the inverses of exponential functions. This inverse relationship is key to understanding how they model data.

Logarithmic and exponential functions as inverses, reflected across y=x.
  • Exponential Model
    For every equal jump in input (e.g., +1 year), the output changes proportionally (e.g., × 1.05).
  • Logarithmic Model
    For every equal proportional change in input (e.g., × 2), the output changes by an equal amount (e.g., +10 points).

Let's use an analogy. Imagine you're playing a video game.

  • Going from Level 1 to Level 2 might take 100 experience points (XP).
  • Going from Level 2 to Level 3 might take 200 XP.
  • Going from Level 50 to Level 51 might take 50,000 XP!

The output (your level) increases by a constant amount (+1 level), but the input required (XP) grows dramatically. This is a logarithmic relationship. The "payoff" for your effort gets smaller over time. This is why the graph of a logarithmic function is steep at the beginning and then flattens out.

The characteristic shape of a logarithmic function, showing diminishing returns.

Building a Logarithmic Model

How do we find the equation for one of these models? The general form we'll often use is:

f(x) = a + b ln(x)

Here, x is our input, f(x) is our output, and a and b are constants we need to find. We use ln(x), the natural logarithm (log base e), because it appears so frequently in natural processes and is the standard for most calculators' regression functions.

Method 1: Building from Two Points

If you have two solid data points, you can build a model algebraically. Let's say we have two points, (x₁, y₁) and (x₂, y₂). We can create a system of two equations:

  1. y₁ = a + b ln(x₁)
  2. y₂ = a + b ln(x₂)

This is a system you can solve for a and b! A common strategy is to subtract the first equation from the second to eliminate a:

y₂ - y₁ = (a + b ln(x₂)) - (a + b ln(x₁)) y₂ - y₁ = b ln(x₂) - b ln(x₁) y₂ - y₁ = b (ln(x₂) - ln(x₁))

Using the logarithm property ln(A) - ln(B) = ln(A/B), we get:

y₂ - y₁ = b * ln(x₂ / x₁)

From here, you can solve for b:

b = (y₂ - y₁) / ln(x₂ / x₁)

Once you have b, you can plug it back into either of the original equations to solve for a.

Method 2: Building with Technology (Regression)

In the real world, data is messy. You'll rarely have just two perfect points. Instead, you'll have a scatter plot of many points that suggest a logarithmic trend.

This is where your graphing calculator is your best friend.

You can enter your data points into your calculator's lists and then perform a logarithmic regression (often labeled LnReg on calculators). The calculator will analyze all the points and find the a and b values for the equation y = a + b ln(x) that create the "best-fit" curve for your data.

For example, let's look at the "Study Hours vs. Test Score" data from our visual: (1, 60), (2, 75), (4, 85), (8, 92), (12, 96)

Plugging this into a calculator and running a logarithmic regression gives us the model:

y = 60.1 + 15.5 ln(x)

This equation represents the smooth, concave-down curve that best passes through our data points. The 60.1 and 15.5 are the a and b values determined by the regression. These are transformations on the parent function f(x) = ln(x). The b value of 15.5 acts as a vertical stretch, making the initial growth steeper, and the a value of 60.1 shifts the whole graph up.

Using the Model to Make Predictions

Once you have your model, you can use it to predict outcomes. This is the most powerful part of data modeling.

Using our study model y = 60.1 + 15.5 ln(x):

Question: What score would you predict for someone who studies for 10 hours?

Solution: Here, the input is x = 10. We just plug it in. y = 60.1 + 15.5 * ln(10) y ≈ 60.1 + 15.5 * (2.302) y ≈ 60.1 + 35.68 y ≈ 95.8

Our model predicts a score of about 95.8 for 10 hours of studying. This makes sense—it's a bit higher than the score for 8 hours (92) but not by much, showing those diminishing returns.

You can also work backward. How many hours would you need to study to aim for a score of 90? You would set y = 90 and solve for x.

Logarithmic models give us the mathematical language to describe and analyze any process that gets progressively harder or yields smaller and smaller gains over time.

Worked examples

Example 1

Building a Model from Two Points

The Richter scale measures earthquake intensity. It's logarithmic because the energy released increases exponentially, so the scale we use to describe it needs to "tame" those huge numbers. Let's say a simplified model relates the Richter magnitude M(i) to the intensity i of the ground shaking.

Problem: An earthquake in Seattle has an intensity i = 1000 and measures 3 on our simplified Richter scale. A much larger one in California has an intensity i = 1,000,000 and measures 6 on the scale. Construct a logarithmic model of the form M(i) = a + b log(i), using log base 10.

Step 1: Set up the system of equations. We have two points: (1000, 3) and (1000000, 6). Let's plug them into our model M(i) = a + b log(i).

  • Equation 1: 3 = a + b log(1000)
  • Equation 2: 6 = a + b log(1000000)

Step 2: Simplify the logarithms. We can simplify log(1000) and log(1000000) because they are powers of 10. log(1000) = log(10³) = 3 log(1000000) = log(10⁶) = 6

Our system becomes much simpler:

  • Equation 1: 3 = a + 3b
  • Equation 2: 6 = a + 6b

Step 3: Solve the system for a and b. Subtract Equation 1 from Equation 2 to eliminate a: (6 - 3) = (a + 6b) - (a + 3b) 3 = 3b b = 1

Now, substitute b = 1 back into Equation 1: 3 = a + 3(1) 3 = a + 3 a = 0

Step 4: Write the final model. With a = 0 and b = 1, our model is: M(i) = 0 + 1 * log(i) M(i) = log(i)

This shows that on this simplified scale, the magnitude is simply the log base 10 of the intensity.


Example 2

Using a Regression Model to Predict

Let's return to our "Study Hours vs. Test Score" model, which a calculator determined to be y = 60.1 + 15.5 ln(x), where x is hours studied and y is the predicted score.

Problem: A) Priya studied for 5 hours. What is her predicted score? B) Marcus wants to score at least an 88. How many hours should he study, according to the model?

Part A: Predict Priya's score.

Step 1: Identify the input. Priya studied for 5 hours, so x = 5.

Step 2: Plug the input into the model. y = 60.1 + 15.5 ln(5)

Step 3: Calculate the result. Use your calculator to find ln(5). ln(5) ≈ 1.609. y ≈ 60.1 + 15.5 * (1.609) y ≈ 60.1 + 24.94 y ≈ 85.04 The model predicts a score of about 85 for Priya.

Part B: Find the hours needed for Marcus.

Step 1: Identify the output. Marcus wants a score of 88, so y = 88.

Step 2: Set up the equation to solve for x. 88 = 60.1 + 15.5 ln(x)

Step 3: Isolate the ln(x) term. 88 - 60.1 = 15.5 ln(x) 27.9 = 15.5 ln(x) ln(x) = 27.9 / 15.5 ln(x) ≈ 1.8

Step 4: Solve for x by exponentiating. To undo the natural log (ln), we use its inverse, the exponential function with base e. e^(ln(x)) = e^(1.8) x = e^(1.8) x ≈ 6.05

Where students get confused: Remember that ln(x) is log_e(x). To "free" the x from the logarithm, you need to make both sides of the equation an exponent on the base e.

According to the model, Marcus should study for just over 6 hours to achieve a score of 88.

Study hours vs. test score model: y = 60.1 + 15.5 ln(x).

Try it yourself

Practice Problem

The perceived brightness of stars is measured on a logarithmic scale called apparent magnitude. A lower magnitude number means a brighter star. Let's create a simplified model.

Problem: The star Vega has a light intensity of 2.2 x 10⁻⁸ W/m² and an apparent magnitude of 0.0. The star Polaris has a light intensity of 2.0 x 10⁻⁹ W/m² and an apparent magnitude of 2.0.

Using these two data points, construct a logarithmic model of the form m(i) = a + b ln(i), where i is the light intensity and m(i) is the apparent magnitude.

Hints:

  1. Your two points are (2.2 x 10⁻⁸, 0.0) and (2.0 x 10⁻⁹, 2.0).
  2. Set up your system of two equations just like in the worked example.
  3. Remember your log property: ln(A) - ln(B) = ln(A/B). Be careful with the scientific notation when you divide!
  4. Solve for b first, then plug it back in to find a.
Apparent magnitude model for stars based on light intensity.