Error propagation for a ratio

Published

December 12, 2020

Error propagation also works for systematic uncertainties. I discuss along a simple example.

We want to error propagate to variable \(c\) with \[ c = \frac a b, \] where \(a\) is constant and \(b\) has uncertainty \(\sigma[b]\). All variables shall be positive.

Error propagation yields

\[ \sigma^2[c] = \big(\frac{\partial c}{\partial b}\big)^2 \, \sigma^2[b] = \frac {a^2} {b^4} \, \sigma^2[b] = \frac{c^2}{b^2} \, \sigma^2[b] \]

Or equivalent

\[ \frac{\sigma[c]}{c} = \frac{\sigma[b]}{b} \]

The \(\sigma\) here means (as it always does) square-root of variance. Error propagation is correct for any distribution where the variance is defined.

Numerical check:

import numpy as np
from scipy import stats

a = 1.0 # result is independent of the numerical value of a

rng = np.random.default_rng(1)

# normally distributed numbers with 18 % std.dev.
b_norm = 1 + 0.18 * rng.normal(size=10000)
c_norm = a / b_norm

print(f"normal distribution {np.std(c_norm) / np.mean(c_norm):.2f}")

# uniformly distributed numbers with 18 % std.dev.
z = rng.uniform(size=10000) - 0.5
b_flat = 1 + 0.18 / np.std(z) * z  # scale z so that its std.dev. is 0.18
c_flat = a / b_flat

print(f"uniform distribution {np.std(c_flat) / np.mean(c_flat):.2f}")
normal distribution 0.20
uniform distribution 0.19

The numerical results of \(\pm 20\,\%\) and \(\pm 19\,\%\) differ a little from the analytical result \(\pm 18\,\%\) because error propagation is approximate for non-linear functions. For small deviations, all functions are linear, but \(\pm 18\,\%\) is not that small. In general, errors are usually only known up to 10 %, so this is not a shocking deviation.

Since we don’t know the probability density of systematic offsets, we need to use a distribution-independent framework for the calculation to propagate errors, where systematic uncertainties are the square roots of variances of unknown distributions. The error propagation framework provides just that.