Uncertainty Propagation Explained#

In Numcertain#

Numcertain performs uncertainty propagation for math operations under the assumption that the values being combined are unrelated to one and other, as such the covariance \(\sigma_{ab}\) can be assumed to be zero, reducing the computation of propagated uncertainity to simple functions of prior expectations and standard deviation.

The arethmetic operations implemented in Numcertain are detailed in the Implementations table below:

Arithmetic Implementations#

Expectation

Standard Deviation

\[z=a+b\]
\[\sigma_z=\sqrt{\sigma_a^2 + \sigma_b^2}\]
\[z=a-b\]
\[\sigma_z=\sqrt{\sigma_a^2 + \sigma_b^2}\]
\[z=ab\]
\[\sigma_z=ab\sqrt{\frac{\sigma_a}{a}^2+\frac{\sigma_b}{b}^2}\]
\[z=\frac{a}{b}\]
\[\sigma_z=\frac{a}{b}\sqrt{\frac{\sigma_a}{a}^2+\frac{\sigma_b}{b}^2}\]

Alternative Methods#

In order to accurately propagate uncertainties of related values the derivative of the computed expectation must be known with respect to expectations it is comprised of. Automatic differentiation (autodiff) provides a mechanism for computing the derivative of arbitrary functions with respect to their components by exploiting the fact that all codes, regardless of complexity, are reduced to a sequence of primative arithmetic operations during execution for which the derivatives are known, by applying the chain rule the overall derivative can be determined automatically.

The python package Uncertainties provides a python data type which performs autodiff to propagate the corresponding uncertainity, unforunately due to Implementation as a python object the library is non-performant when used for array math.

Similarly, the python package soerp extends this technique to perform second order error propagation, but suffers from the same issues.

The python package mcerp approximates uncertainities with use of space sampled Monte Carlo methods, but suffers from the same issues.

The python package jacobi propagates uncertainities with use of but is quadratic in space and is therefore inappropriate when used for array math.

Whilst Propagation of Uncertainty with autodiff, describes the use of autodiff provided by the python package JAX in propagating uncertainities for array math. This approach provides accurate estimates with good performance, however its use limits portability between array backends.