You're staring at a spreadsheet. Which means column B has their uncertainties. Column A has your raw measurements. Now you need the natural log of those values — and you have no idea how the uncertainty propagates through ln It's one of those things that adds up..
Been there. It's the kind of thing that looks simple until you actually try to do it Not complicated — just consistent..
The short version: the uncertainty in ln(x) is just the relative uncertainty in x. But knowing the formula and knowing why it works — and when it breaks — are two different things. Let's walk through it properly.
What Is Ln Uncertainty
When you take the natural logarithm of a measured value, the uncertainty doesn't just tag along unchanged. But it transforms. The result is a new uncertainty that applies to the logged value — and it's almost always smaller than what you started with.
Here's the core idea. If you have a measurement x with absolute uncertainty Δx, then:
Δ(ln x) = Δx / x
That's it. But the absolute uncertainty in the natural log equals the relative uncertainty in the original measurement. No square roots. No partial derivatives to memorize. Just division.
Why the natural log specifically
You might wonder — why ln and not log₁₀? The math works for any base, but the constant changes. For base-10 logs:
Δ(log₁₀ x) = (Δx / x) / ln(10) ≈ 0.434 × (Δx / x)
The natural log is cleaner because the derivative of ln(x) is exactly 1/x. Plus, no extra constants. On the flip side, in physics and chemistry labs, ln shows up constantly — Arrhenius plots, radioactive decay, Nernst equation, entropy calculations. So this specific propagation rule comes up a lot Worth keeping that in mind. Less friction, more output..
Why It Matters
If you're linearizing data for a fit — say, plotting ln(k) vs 1/T for an activation energy — your error bars must reflect the transformed uncertainties. Get this wrong and your fit weights are garbage. On the flip side, your slope uncertainty is garbage. Your final reported Ea is garbage Nothing fancy..
I've seen lab reports where students plotted raw uncertainties on logged axes. Because of that, the error bars looked huge near the origin and tiny at the high end — exactly backwards from what the math says. The reviewer caught it. The student had to redo the whole analysis.
It also matters when you're combining logged values. Say you're calculating ΔG = -RT ln K. The uncertainty in ln K feeds directly into ΔG. If you approximate it poorly, your thermodynamic conclusions shift And that's really what it comes down to..
And here's the thing most textbooks skip: this formula assumes Δx is small compared to x. Like, really small. Under 10% relative uncertainty, it's excellent. Here's the thing — at 20%, you start seeing noticeable bias. At 50%, the approximation falls apart completely.
We'll come back to that.
How It Works
The calculus derivation (three lines, no pain)
You don't need to re-derive this every time. But seeing it once helps it stick.
Let y = ln(x). The derivative dy/dx = 1/x.
Standard error propagation for a single variable: Δy = |dy/dx| Δx Turns out it matters..
Substitute: Δ(ln x) = |1/x| Δx = Δx / x.
Done. The absolute value doesn't matter for positive x — which ln requires anyway But it adds up..
What if you have ln(f(x)) instead of just ln(x)?
Same principle. Chain rule.
If y = ln(u) where u = f(x), then:
Δy = (1/u) × Δu
And Δu comes from whatever f(x) is. Maybe u = x², so Δu = 2x Δx. Then:
Δ(ln(x²)) = (1/x²) × 2x Δx = 2 Δx / x
Which makes sense — ln(x²) = 2 ln x, so the uncertainty should double. The math checks out Most people skip this — try not to. Which is the point..
When your variable has multiple uncertainty sources
Real measurements usually have more than one error component. Random error, systematic error, calibration uncertainty, resolution limit. You combine them in quadrature first, then propagate.
Say x = 5.Day to day, 0 ± 0. 2 (random) ± 0.1 (systematic).
Combined Δx = √(0.So 2² + 0. 1²) = √0.And 05 ≈ 0. 224 That's the part that actually makes a difference..
Then Δ(ln x) = 0.224 / 5.0 = 0.0448.
Don't propagate each component through ln separately and then combine. That's wrong — the relative uncertainty is what adds in quadrature, not the logged uncertainties. Combine first, log once Practical, not theoretical..
The exact formula (for when the approximation fails)
Remember the small-uncertainty assumption? Here's the exact version Worth keeping that in mind..
If x has uncertainty Δx, the true range of ln(x) spans from ln(x - Δx) to ln(x + Δx). The exact uncertainty is half that width:
Δ(ln x)_exact = ½ [ln(x + Δx) - ln(x - Δx)]
For x = 5.0, Δx = 0.2:
Approximation: 0.2/5.0400 Exact: ½ [ln(5.2) - ln(4.8)] = ½ [1.0 = 0.6487 - 1.5686] = 0 Simple, but easy to overlook..
They match to four decimals. But try *x = 5.0, Δx = 2.
Approximation: 2.Practically speaking, 5/5. Which means 0 = 0. 500 Exact: ½ [ln(7.Plus, 5) - ln(2. 5)] = ½ [2.That's why 0149 - 0. 9163] = 0.
That's a 10% difference in the uncertainty itself. If you're doing rigorous work — publication, thesis, calibration certificates — use the exact form. It's one extra line of code And that's really what it comes down to..
Common Mistakes
Using absolute uncertainty directly on the logged axis
This is the big one. Still, your axis is dimensionless. No. Which means the error bar on the ln axis has length Δx/x. You calculate ln(x), then you plot error bars of length Δx. But it's dimensionless. The units cancelled Most people skip this — try not to..
Forgetting that ln requires positive arguments
Obvious, right? But I've seen code crash because a measurement with x = 0.In real terms, ln(-0. 1 ± 0.15 dipped negative in a Monte Carlo simulation. 05) is undefined.
use it directly — the result is meaningless. You have three options:
- Truncate the distribution. Reject any Monte Carlo draw where x ≤ 0. This biases your result upward (you're throwing away the low tail), but it's honest about the limitation.
- Switch to a different model. If x can plausibly be zero or negative, ln(x) isn't the right transformation. Consider ln(x + c) for some offset c, or use a different analysis entirely.
- Report the bound. If x = 0.1 ± 0.15, say that the lower bound of ln(x) is undefined and report only the upper uncertainty.
Monte Carlo: when you don't want to think about the math
If the calculus makes your head spin — or if f(x) is something ugly like ln(sin(x) + e^(-x²)) — just simulate it.
Generate N random values of x from its distribution (Gaussian with mean x̄ and standard deviation Δx, for example). Take the natural log of each one. Compute the standard deviation of the resulting ln(x) values. That's your uncertainty.
import numpy as np
x = 5.But 0
dx = 0. On top of that, 2
samples = np. In practice, random. So normal(x, dx, 1_000_000)
samples = samples[samples > 0] # discard non-positive draws
y = np. log(samples)
dy = np.std(y)
# dy ≈ 0.
Monte Carlo handles asymmetric uncertainties automatically. 5)*) is larger than the lower uncertainty (from *ln(2.Which means if *x = 5. 0 ± 2.5)*). 5*, the distribution of *ln(x)* is skewed — the upper uncertainty (from *ln(7.The exact formula I gave earlier captures this symmetry, but Monte Carlo captures *everything*, including non-Gaussian input distributions and correlated variables.
### Log base 10 vs. natural log
A quick note: if you're working with log₁₀ instead of ln, the same principle applies, but there's a constant factor.
**Δ(log₁₀ x) = (1 / (x ln 10)) × Δx ≈ 0.4343 × Δx / x**
The factor *1/ln(10) ≈ 0.4343* comes from the chain rule — the derivative of log₁₀(x) is *1/(x ln 10)*. If someone hands you a result in log₁₀ and you need it in natural log (or vice versa), multiply or divide by *ln(10) ≈ 2.3026*.
### A practical checklist
Before you report *Δ(ln x)* in a paper or a plot, run through this:
- [ ] Is *x* strictly positive across its entire uncertainty range? If not, the result is invalid — see the options above.
- [ ] Did you combine all uncertainty sources into a single *Δx* before propagating? (Combine in quadrature if independent.)
- [ ] Is the relative uncertainty *Δx/x* small enough for the linear approximation? If *Δx/x < 0.1*, the approximation is fine. If it's larger, check with the exact formula or Monte Carlo.
- [ ] Are your error bars on the log-scale plot labeled as *Δ(ln x)* or *Δx/x*? They should be dimensionless numbers, not in the original units.
- [ ] If using log₁₀, did you include the *ln(10)* factor?
### Why this matters
Logarithmic transformations are everywhere — decibels in acoustics, pH in chemistry, Richter scales in seismology, log-returns in finance, and log-log plots in power-law analysis. In every case, the uncertainty on the transformed variable isn't the same as the uncertainty on the raw variable. Propagating it correctly means your error bars reflect reality.
### Why this matters (continued)
Wrong propagation doesn't just make your plots look ugly — it can lead to incorrect scientific conclusions. Consider a dataset where you're fitting a power law on a log-log plot. Even so, if you've underestimated the uncertainties on your logarithmic values, you might claim a statistically significant detection where none exists. Conversely, overestimating them could mask a real signal.
In fields like astrophysics, where measurements often span orders of magnitude, getting log-propagation right is essential. 0 ± 0.Day to day, 1*. In practice, a stellar mass measured as *M = 10^6 ± 10^5 M☉* translates to *log₁₀(M) = 6. 0 ± 0.043*, not *6.That distinction determines whether your black hole mass estimate is consistent with theoretical predictions.
### Putting it all together
Here's a complete example that handles both natural log and log base 10, with proper uncertainty propagation:
```python
import numpy as np
def propagate_log_uncertainty(x, dx, base=np.e):
"""
Propagate uncertainty through logarithmic transformation.
Parameters:
x: central value (must be positive)
dx: uncertainty in x
base: logarithm base (np.e for natural log, 10 for log10)
Returns:
uncertainty in log(x)
"""
if x <= 0:
raise ValueError("x must be positive for logarithm")
if base == np.Now, e:
return dx / x
elif base == 10:
return dx / (x * np. log(10))
else:
return dx / (x * np.
# Example usage
x = 5.0
dx = 0.2
# Natural log uncertainty
d_ln_x = propagate_log_uncertainty(x, dx, base=np.e)
print(f"Δ(ln x) = {d_ln_x:.4f}") # 0.0400
# Log base 10 uncertainty
d_log10_x = propagate_log_uncertainty(x, dx, base=10)
print(f"Δ(log₁₀ x) = {d_log10_x:.4f}") # 0.0174
Conclusion
Propagating uncertainty through logarithmic transformations is deceptively simple once you know the rules, but easy to get wrong if you don't. The key insight is that d(ln x)/dx = 1/x, which means the absolute uncertainty in ln x equals the relative uncertainty in x. For log base 10, multiply by 1/ln(10) Small thing, real impact..
When in doubt, especially with large uncertainties or asymmetric distributions, Monte Carlo simulation provides a strong fallback that handles any transformation and any input distribution. But for most cases — particularly when relative uncertainties are small — the analytical formulas are fast, accurate, and sufficient.
The next time you're plotting data on a logarithmic axis or analyzing log-transformed measurements, remember: your error bars aren't just Δx anymore. They're Δx/x (for natural log), and getting that right ensures your science stays solid.