Logarithmic Functions
Context & Data Modeling
Learn how logarithmic functions model real-world phenomena: from earthquake magnitudes to sound intensity, and master the art of fitting log models to data.
What Is a Logarithm?
A logarithm answers the question: to what power must we raise a base to get a given number? If \( b^c = x \), then \( \log_b(x) = c \).
The Shape of \( y = \log_b(x) \)
Why Logs Model Real Data
Many real-world phenomena exhibit rapid initial growth that tapers off: the louder a sound gets, the less additional loudness we perceive. Logarithmic models capture this diminishing-returns pattern perfectly.
The General Logarithmic Model
Transformations of \( \log \) Functions
Exponential vs Logarithmic
| Exponential \( b^x \) | Logarithmic \( \log_b(x) \) | |
|---|---|---|
| Domain | \( (-\infty, \infty) \) | \( (0, \infty) \) |
| Range | \( (0, \infty) \) | \( (-\infty, \infty) \) |
| Asymptote | Horizontal: \( y = 0 \) | Vertical: \( x = 0 \) |
| Key Point | \( (0, 1) \) | \( (1, 0) \) |
| Growth Rate | Accelerates without bound | Slows as \( x \to \infty \) |
| Relationship | Inverse functions: reflect across \( y = x \) | |
Is Your Data Logarithmic?
Fitting a Log Model to Data
Example 1: Sound Intensity
A researcher measures perceived loudness \( L \) (in sones) at various sound intensities \( I \) (in watts/m²):
| \( I \) (W/m²) | 0.001 | 0.01 | 0.1 | 1 | 10 |
|---|---|---|---|---|---|
| \( L \) (sones) | 2.1 | 5.8 | 9.4 | 13.1 | 16.7 |
Example 1: Visualizing the Fit
Example 2: Population & Species Count
An ecologist records the number of distinct bird species \( S \) observed in forest patches of area \( A \) (in km²):
| \( A \) (km²) | 1 | 5 | 20 | 100 | 500 |
|---|---|---|---|---|---|
| \( S \) | 12 | 22 | 31 | 42 | 51 |
Example 3: Predicting with a Log Model
Using the species-area model \( S = 12.0 + 6.3\ln(A) \), predict how many species will be found in a 50 km² patch and a 1000 km² patch.
\( \approx 12.0 + 6.3(3.912) \)
\( \approx 12.0 + 24.65 \)
\( \approx \) 37 species
\( \approx 12.0 + 6.3(6.908) \)
\( \approx 12.0 + 43.52 \)
\( \approx \) 56 species
Checking Model Fit with Residuals
A residual is the difference between an observed value and the model's prediction: \( e_i = y_i - \hat{y}_i \). A good fit produces residuals that are small and randomly scattered around zero.
Common Mistakes to Avoid
Summary: Log Models at a Glance
| Property | Details |
|---|---|
| General Form | \( f(x) = a + b\ln(x) \) |
| Domain | \( x > 0 \) (or \( x > h \) if shifted) |
| Asymptote | Vertical at \( x = 0 \) (or \( x = h \)) |
| Key Point | \( (1, a) \) since \( \ln(1) = 0 \) |
| Linearization | Replace \( x \) with \( \ln(x) \), then do linear regression |
| When to Use | Rapid initial growth that slows: diminishing returns |
| Check Fit | Residuals should be small and randomly scattered |
Question 1 of 5
A data set has all positive \( x \)-values. When you plot \( (\ln x, y) \), the points form an approximately linear pattern. Which model best fits the original data?
Question 2 of 5
Given the model \( f(x) = 5 + 3\ln(x) \), what is the value of \( f(e^2) \)?
Question 3 of 5
The function \( g(x) = 20 - 4\ln(x) \) models a quantity over time. As \( x \to \infty \), what happens to \( g(x) \)?
Question 4 of 5
A researcher fits \( y = 8.2 + 4.5\ln(x) \) to her data. The residual plot of \( (\ln x, e_i) \) shows a clear U-shaped curve. What should she conclude?
Question 5 of 5
The Richter scale defines earthquake magnitude as \( M = \log_{10}\!\left(\frac{I}{I_0}\right) \). An earthquake of magnitude 6 has intensity \( I_6 \). What is the intensity of a magnitude 8 earthquake relative to \( I_6 \)?