Research notes · . #Uncertainty #Measurement

Error propagation

On this page

This is a note on the error propagation (propagation of uncertainty). Assume the errors to each measured value are

  • independent of each other
  • follow a normal (Gaussian) distribution
  • the covariance between the errors are negligible or none,

then the following formulas can be applied in a sequential manner.

Definition of errors

Suppose a quantity has a true value xtruex_{true}, its measured value is xx and the difference is a small amount Δx\Delta x,

xtrue=x±Δx, x_{true}=x\pm\Delta x,

where Δx\Delta x is the absolute error (uncertainty) of xx while Δx/x\Delta x/ x is the relative error (uncertainty) of xx.

In notation, the uncertainty in parenthesis is given in the last digit of each value. e.g. a length of l=12.5(1) ftl=12.5(1)\,\text{ft} reads l=12.5 ftl=12.5\,\text{ft} and the uncertainty Δl=0.1 ft\Delta l = 0.1\,\text{ft}.

Derivation of error propagation

For simplicity, suppose the measurement zz depends on two variables xx and yy, such that z=f(x,y)z= f(x,y), the uncertainty Δz\Delta z can be derived as follows

Δz=f(x+Δx,y+Δy)−f(x,y)≈(f(x,y)+∂f∂xΔx+∂f∂yΔy)−f(x,y)≈∂f∂xΔx+∂f∂yΔy \begin{aligned} \Delta z &= f(x+\Delta x, y + \Delta y) - f(x,y) \\ &\approx \left(f(x,y) + \frac{\partial f}{\partial x}\Delta x + \frac{\partial f}{\partial y}\Delta y \right) - f(x,y) \\ &\approx \frac{\partial f}{\partial x}\Delta x + \frac{\partial f}{\partial y}\Delta y \end{aligned}

Box of uncertainty

If we assume uncertainties Δx\Delta x and Δy\Delta y are completely independent, the uncertainty Δz\Delta z reads

Δz≈∣∂f∂x∣Δx+∣∂f∂y∣Δy,(1) \Delta z\approx \left\lvert\frac{\partial f}{\partial x}\right\rvert \Delta x + \left\lvert\frac{\partial f}{\partial y}\right\rvert\Delta y, \tag{1}

Ball of uncertainty

If we assume uncertainties Δx\Delta x and Δy\Delta y are lies in a radius, the uncertainty Δz\Delta z can be reduced to

Δz≈(∂f∂x)2Δx2+(∂f∂y)2Δy2.(2) \Delta z\approx \sqrt{\left(\frac{\partial f}{\partial x}\right)^2 \Delta x^2 + \left(\frac{\partial f}{\partial y}\right)^2\Delta y^2}. \tag{2}

Change of variables

Note that change of variables works for box of uncertainty and not for ball of uncertainty. To see this, assume originally one has the value z=f(a,b)z=f(a,b), which is changed to z=f(x,y)z=f(x,y) with x=x(a,b)x=x(a,b) and y=y(a,b)y=y(a,b), one can see

Δzx,y≈(∂f∂x)2Δx2+(∂f∂y)2Δy2≈(∂f∂x)2((∂x∂a)2Δa2+(∂x∂b)2Δb2)+(∂f∂y)2((∂y∂a)2Δa2+(∂y∂b)2Δb2)≈((∂f∂x∂x∂a)2+(∂f∂y∂y∂a)2)Δa2+((∂f∂x∂x∂b)2+(∂f∂y∂y∂b)2)Δb2≠(∂f∂x∂x∂a+∂f∂y∂y∂a)2Δa2+(∂f∂x∂x∂b+∂f∂y∂y∂b)2Δb2=(∂f∂a)2Δa2+(∂f∂b)2Δb2≈Δza,b \begin{aligned} \Delta z_{x,y}&\approx \sqrt{\left(\frac{\partial f}{\partial x}\right)^2 \Delta x^2 + \left(\frac{\partial f}{\partial y}\right)^2\Delta y^2} \\ &\approx\sqrt{\left(\frac{\partial f}{\partial x}\right)^2 \left(\left(\frac{\partial x}{\partial a}\right)^2 \Delta a^2 + \left(\frac{\partial x}{\partial b}\right)^2\Delta b^2\right) + \left(\frac{\partial f}{\partial y}\right)^2\left(\left(\frac{\partial y}{\partial a}\right)^2 \Delta a^2 + \left(\frac{\partial y}{\partial b}\right)^2\Delta b^2\right)} \\ &\approx\sqrt{\left(\left(\frac{\partial f}{\partial x}\frac{\partial x}{\partial a}\right)^2 +\left(\frac{\partial f}{\partial y}\frac{\partial y}{\partial a}\right)^2\right) \Delta a^2 + \left(\left(\frac{\partial f}{\partial x}\frac{\partial x}{\partial b}\right)^2 +\left(\frac{\partial f}{\partial y}\frac{\partial y}{\partial b}\right)^2\right)\Delta b^2} \\ &\neq\sqrt{\left(\frac{\partial f}{\partial x}\frac{\partial x}{\partial a} +\frac{\partial f}{\partial y}\frac{\partial y}{\partial a}\right)^2 \Delta a^2 + \left(\frac{\partial f}{\partial x}\frac{\partial x}{\partial b} +\frac{\partial f}{\partial y}\frac{\partial y}{\partial b}\right)^2\Delta b^2} \\ &=\sqrt{\left(\frac{\partial f}{\partial a}\right)^2 \Delta a^2 + \left(\frac{\partial f}{\partial b}\right)^2\Delta b^2}\approx \Delta z_{a,b} \end{aligned}

Formulas by calculus

For each mathematical operation, some formulas can be derived by taking Eqs. (1) or (2). Suppose a variable xx is a function of other variables

x=u±v±…, x=u\pm v \pm\dots,

and they have variances Δx2\Delta x^2, Δu2\Delta u^2, Δv2\Delta v^2, …\dots. The variance of xx can be approximated using partial derivatives (taking Eq. (2) for example),

Δx2=Δu2(∂x∂u)2+Δv2(∂x∂v)2+… . \Delta x^2 = \Delta u^2\left(\frac{\partial x}{\partial u}\right)^2 + \Delta v^2\left(\frac{\partial x}{\partial v}\right)^2 + \dots.

Addition and subtraction with weights

x=au±bv±…givesΔx2=a2Δu2+b2Δv2+… . \begin{aligned} x &= au \pm bv \pm \dots \\ \text{gives}\quad \Delta x^2 &= a^2\Delta u^2 + b^2\Delta v^2 + \dots. \end{aligned}

Multiplication and division with weights

The same rule applies to division.

x=a×u×v×…givesΔx2x2=Δu2u2+Δv2v2+… . \begin{aligned} x &= a \times u \times v \times \dots \\ \text{gives}\quad \frac{\Delta x^2}{x^2} &= \frac{\Delta u^2}{u^2} + \frac{\Delta v^2}{v^2} + \dots. \end{aligned}

Powers

x=aubgivesΔxx=bΔuu. \begin{aligned} x &= a u^b \\ \text{gives}\quad \frac{\Delta x}{x} &= b\frac{\Delta u}{u}. \end{aligned}

Exponential functions

x=ae±bugivesΔxx=bΔu. \begin{aligned} x &= a e^{\pm b u} \\ \text{gives}\quad \frac{\Delta x}{x} &= b\Delta u. \end{aligned}

For any base yy, the corresponding result is

x=ay±bu→Δxx=bln⁡(y)Δu. x = a y^{\pm b u} \to \frac{\Delta x}{x} = b\ln(y)\Delta u.

Logarithmic functions

For base kk,

x=alog⁡k(±bu)givesΔx=aΔuln⁡(k)u. \begin{aligned} x &= a \log_k(\pm bu) \\ \text{gives}\quad \Delta x &= a\frac{\Delta u}{\ln(k)u}. \end{aligned}