# Propagation of uncertainty

(Redirected from Uncertainty propagation)

In statistics, propagation of uncertainty (or propagation of error) is the effect of variables' uncertainties (or errors, more specifically random errors) on the uncertainty of a function based on them. When the variables are the values of experimental measurements they have uncertainties due to measurement limitations (e.g., instrument precision) which propagate due to the combination of variables in the function.

The uncertainty u can be expressed in a number of ways. It may be defined by the absolute error Δx. Uncertainties can also be defined by the relative error x)/x, which is usually written as a percentage. Most commonly, the uncertainty on a quantity is quantified in terms of the standard deviation, σ, the positive square root of variance, σ2. The value of a quantity and its error are then expressed as an interval x ± u. If the statistical probability distribution of the variable is known or can be assumed, it is possible to derive confidence limits to describe the region within which the true value of the variable may be found. For example, the 68% confidence limits for a one-dimensional variable belonging to a normal distribution are approximately ± one standard deviation σ from the central value x, which means that the region x ± σ will cover the true value in roughly 68% of cases.

If the uncertainties are correlated then covariance must be taken into account. Correlation can arise from two different sources. First, the measurement errors may be correlated. Second, when the underlying values are correlated across a population, the uncertainties in the group averages will be correlated.[1]

## Linear combinations

Let ${\displaystyle \{f_{k}(x_{1},x_{2},\dots ,x_{n})\}}$ be a set of m functions which are linear combinations of ${\displaystyle n}$ variables ${\displaystyle x_{1},x_{2},\dots ,x_{n}}$ with combination coefficients ${\displaystyle A_{k1},A_{k2},\dots ,A_{kn},(k=1,\dots ,m)}$.

${\displaystyle f_{k}=\sum _{i=1}^{n}A_{ki}x_{i}{\text{ or }}\mathrm {f} =\mathrm {Ax} \,}$

and let the variance-covariance matrix of x = (x1, ..., xn) be denoted by ${\displaystyle \Sigma ^{x}\,}$.

${\displaystyle \Sigma ^{x}={\begin{pmatrix}\sigma _{1}^{2}&\sigma _{12}&\sigma _{13}&\cdots \\\sigma _{12}&\sigma _{2}^{2}&\sigma _{23}&\cdots \\\sigma _{13}&\sigma _{23}&\sigma _{3}^{2}&\cdots \\\vdots &\vdots &\vdots &\ddots \end{pmatrix}}={\begin{pmatrix}{\Sigma }_{11}^{x}&{\Sigma }_{12}^{x}&{\Sigma }_{13}^{x}&\cdots \\{\Sigma }_{12}^{x}&{\Sigma }_{2}^{x}&{\Sigma }_{23}^{x}&\cdots \\{\Sigma }_{13}^{x}&{\Sigma }_{23}^{x}&{\Sigma }_{3}^{x}&\cdots \\\vdots &\vdots &\vdots &\ddots \end{pmatrix}}}$

Then, the variance-covariance matrix ${\displaystyle \Sigma ^{f}\,}$ of f is given by

${\displaystyle {\Sigma }_{ij}^{f}=\sum _{k}^{n}\sum _{\ell }^{n}A_{ik}{\Sigma }_{k\ell }^{x}A_{j\ell },}$

or, in matrix notation:

${\displaystyle \Sigma ^{f}=\mathrm {A} \Sigma ^{x}\mathrm {A} ^{\top }.}$

This is the most general expression for the propagation of error from one set of variables onto another. When the errors on x are uncorrelated the general expression simplifies to

${\displaystyle {\Sigma }_{ij}^{f}=\sum _{k}^{n}A_{ik}{\Sigma }_{k}^{x}A_{jk}.}$

where ${\displaystyle {\Sigma }_{k}^{x}=\sigma _{x_{k}}^{2}}$ is the variance of k-th element of the x vector. Note that even though the errors on x may be uncorrelated, the errors on f are in general correlated; in other words, even if ${\displaystyle \mathrm {\Sigma ^{x}} }$ is a diagonal matrix, ${\displaystyle \mathrm {\Sigma ^{f}} }$ is in general a full matrix.

The general expressions for a scalar-valued function, f, are a little simpler.

${\displaystyle f=\sum _{i}^{n}a_{i}x_{i}:f=\mathrm {a} x\,}$
${\displaystyle \sigma _{f}^{2}=\sum _{i}^{n}\sum _{j}^{n}a_{i}{\Sigma }_{ij}^{x}a_{j}=\mathrm {a} \Sigma ^{x}\mathrm {a} ^{\top }}$

(where a is a row-vector).

Each covariance term, ${\displaystyle \sigma _{ij}}$ can be expressed in terms of the correlation coefficient ${\displaystyle \rho _{ij}\,}$ by ${\displaystyle \sigma _{ij}=\rho _{ij}\sigma _{i}\sigma _{j}\,}$, so that an alternative expression for the variance of f is

${\displaystyle \sigma _{f}^{2}=\sum _{i}^{n}a_{i}^{2}\sigma _{i}^{2}+\sum _{i}^{n}\sum _{j(j\neq i)}^{n}a_{i}a_{j}\rho _{ij}\sigma _{i}\sigma _{j}.}$

In the case that the variables in x are uncorrelated this simplifies further to

${\displaystyle \sigma _{f}^{2}=\sum _{i}^{n}a_{i}^{2}\sigma _{i}^{2}.}$

In the simplest case of identical coefficients and variances, we find

${\displaystyle \sigma _{f}={\sqrt {n}}a\sigma .}$

## Non-linear combinations

When f is a set of non-linear combination of the variables x, an interval propagation could be performed in order to compute intervals which contain all consistent values for the variables. In a probabilistic approach, the function f must usually be linearized by approximation to a first-order Taylor series expansion, though in some cases, exact formulas can be derived that do not depend on the expansion as is the case for the exact variance of products.[2] The Taylor expansion would be:

${\displaystyle f_{k}\approx f_{k}^{0}+\sum _{i}^{n}{\frac {\partial f_{k}}{\partial {x_{i}}}}x_{i}}$

where ${\displaystyle \partial f_{k}/\partial x_{i}}$ denotes the partial derivative of fk with respect to the i-th variable, evaluated at the mean value of all components of vector x. Or in matrix notation,

${\displaystyle \mathrm {f} \approx \mathrm {f} ^{0}+\mathrm {J} \mathrm {x} \,}$

where J is the Jacobian matrix. Since f0 is a constant it does not contribute to the error on f. Therefore, the propagation of error follows the linear case, above, but replacing the linear coefficients, Aki and Akj by the partial derivatives, ${\displaystyle {\frac {\partial f_{k}}{\partial x_{i}}}}$ and ${\displaystyle {\frac {\partial f_{k}}{\partial x_{j}}}}$. In matrix notation,[3]

${\displaystyle \mathrm {\Sigma } ^{\mathrm {f} }=\mathrm {J} \mathrm {\Sigma } ^{\mathrm {x} }\mathrm {J} ^{\top }.}$

That is, the Jacobian of the function is used to transform the rows and columns of the variance-covariance matrix of the argument. Note this is equivalent to the matrix expression for the linear case with ${\displaystyle \mathrm {J=A} }$.

### Simplification

Neglecting correlations or assuming independent variables yields a common formula among engineers and experimental scientists to calculate error propagation, the variance formula:[4]

${\displaystyle s_{f}={\sqrt {\left({\frac {\partial f}{\partial x}}\right)^{2}s_{x}^{2}+\left({\frac {\partial f}{\partial y}}\right)^{2}s_{y}^{2}+\left({\frac {\partial f}{\partial z}}\right)^{2}s_{z}^{2}+\cdots }}}$

where ${\displaystyle s_{f}}$ represents the standard deviation of the function ${\displaystyle f}$, ${\displaystyle s_{x}}$ represents the standard deviation of ${\displaystyle x}$, ${\displaystyle s_{y}}$ represents the standard deviation of ${\displaystyle y}$, and so forth.

It is important to note that this formula is based on the linear characteristics of the gradient of ${\displaystyle f}$ and therefore it is a good estimation for the standard deviation of ${\displaystyle f}$ as long as ${\displaystyle s_{x},s_{y},s_{z},\ldots }$ are small enough. Specifically, the linear approximation of ${\displaystyle f}$ has to be close to ${\displaystyle f}$ inside a neighborhood of radius ${\displaystyle s_{x},s_{y},s_{z},\ldots }$.[5]

### Example

Any non-linear differentiable function, f(a,b), of two variables, a and b, can be expanded as

${\displaystyle f\approx f^{0}+{\frac {\partial f}{\partial a}}a+{\frac {\partial f}{\partial b}}b}$

hence:

${\displaystyle \sigma _{f}^{2}\approx \left|{\frac {\partial f}{\partial a}}\right|^{2}\sigma _{a}^{2}+\left|{\frac {\partial f}{\partial b}}\right|^{2}\sigma _{b}^{2}+2{\frac {\partial f}{\partial a}}{\frac {\partial f}{\partial b}}\sigma _{ab}.}$

In the particular case that ${\displaystyle f=ab\!}$, ${\displaystyle {\frac {\partial f}{\partial a}}=b,{\frac {\partial f}{\partial b}}=a}$. Then

${\displaystyle \sigma _{f}^{2}\approx b^{2}\sigma _{a}^{2}+a^{2}\sigma _{b}^{2}+2ab\,\sigma _{ab}}$

or

${\displaystyle \left({\frac {\sigma _{f}}{f}}\right)^{2}\approx \left({\frac {\sigma _{a}}{a}}\right)^{2}+\left({\frac {\sigma _{b}}{b}}\right)^{2}+2\left({\frac {\sigma _{a}}{a}}\right)\left({\frac {\sigma _{b}}{b}}\right)\sigma _{ab}.}$

### Caveats and warnings

Error estimates for non-linear functions are biased on account of using a truncated series expansion. The extent of this bias depends on the nature of the function. For example, the bias on the error calculated for log(1+x) increases as x increases, since the expansion to x is a good approximation only when x is near zero.

For highly non-linear functions, there exist five categories of probabilistic approaches for uncertainty propagation;[6] see Uncertainty Quantification#Methodologies for forward uncertainty propagation for details.

#### Reciprocal

In the special case of the inverse or reciprocal ${\displaystyle 1/B}$, where ${\displaystyle B=N(0,1)}$, the distribution is a reciprocal normal distribution, and there is no definable variance. For such inverse distributions and for ratio distributions, there can be defined probabilities for intervals, which can be computed either by Monte Carlo simulation or, in some cases, by using the Geary–Hinkley transformation.[7]

#### Shifted reciprocal

The statistics, mean and variance, of the shifted reciprocal function ${\displaystyle {\frac {1}{p-B}}}$ for ${\displaystyle B=N(\mu ,\sigma )}$, however, exist in a principal value sense if the difference between the shift or pole ${\displaystyle p}$ and the mean ${\displaystyle \mu }$ is real. The mean of this transformed random variable is then indeed the scaled Dawson's function ${\displaystyle {\frac {\sqrt {2}}{\sigma }}F\left({\frac {p-\mu }{{\sqrt {2}}\sigma }}\right)}$.[8] In contrast, if the shift ${\displaystyle p-\mu }$ is purely complex, the mean exists and is a scaled Faddeeva function, whose exact expression depends on the sign of the imaginary part, ${\displaystyle \operatorname {Im} (p-\mu )}$. In both cases, the variance is a simple function of the mean.[9] Therefore, the variance has to be considered in a principal value sense if ${\displaystyle p-\mu }$ is real, while it exists if the imaginary part of ${\displaystyle p-\mu }$ is non-zero. Note that these means and variances are exact, as they do not recur to linearisation of the ratio. The exact covariance of two ratios with a pair of different poles ${\displaystyle p_{1}}$ and ${\displaystyle p_{2}}$ is similarly available.[10] The case of the inverse of a complex normal variable ${\displaystyle B}$, shifted or not, exhibits different characteristics.[8]

## Example formulas

This table shows the variances of simple functions of the real variables ${\displaystyle A,B\!}$, with standard deviations ${\displaystyle \sigma _{A},\sigma _{B},\,}$ covariance ${\displaystyle \sigma _{AB}}$ and exactly known real-valued constants ${\displaystyle a,b\,}$ (i.e., ${\displaystyle \sigma _{a}=\sigma _{b}=0}$).

Function Variance Standard Deviation
${\displaystyle f=aA\,}$ ${\displaystyle \sigma _{f}^{2}=a^{2}\sigma _{A}^{2}}$ ${\displaystyle \sigma _{f}=|a|\sigma _{A}}$
${\displaystyle f=aA+bB\,}$ ${\displaystyle \sigma _{f}^{2}=a^{2}\sigma _{A}^{2}+b^{2}\sigma _{B}^{2}+2ab\,\sigma _{AB}}$ ${\displaystyle \sigma _{f}={\sqrt {a^{2}\sigma _{A}^{2}+b^{2}\sigma _{B}^{2}+2ab\,\sigma _{AB}}}}$
${\displaystyle f=aA-bB\,}$ ${\displaystyle \sigma _{f}^{2}=a^{2}\sigma _{A}^{2}+b^{2}\sigma _{B}^{2}-2ab\,\sigma _{AB}}$ ${\displaystyle \sigma _{f}={\sqrt {a^{2}\sigma _{A}^{2}+b^{2}\sigma _{B}^{2}-2ab\,\sigma _{AB}}}}$
${\displaystyle f=AB\,}$ ${\displaystyle \sigma _{f}^{2}\approx f^{2}\left[\left({\frac {\sigma _{A}}{A}}\right)^{2}+\left({\frac {\sigma _{B}}{B}}\right)^{2}+2{\frac {\sigma _{AB}}{AB}}\right]}$[11][12] ${\displaystyle \sigma _{f}\approx \left|f\right|{\sqrt {\left({\frac {\sigma _{A}}{A}}\right)^{2}+\left({\frac {\sigma _{B}}{B}}\right)^{2}+2{\frac {\sigma _{AB}}{AB}}}}}$
${\displaystyle f={\frac {A}{B}}\,}$ ${\displaystyle \sigma _{f}^{2}\approx f^{2}\left[\left({\frac {\sigma _{A}}{A}}\right)^{2}+\left({\frac {\sigma _{B}}{B}}\right)^{2}-2{\frac {\sigma _{AB}}{AB}}\right]}$[13] ${\displaystyle \sigma _{f}\approx \left|f\right|{\sqrt {\left({\frac {\sigma _{A}}{A}}\right)^{2}+\left({\frac {\sigma _{B}}{B}}\right)^{2}-2{\frac {\sigma _{AB}}{AB}}}}}$
${\displaystyle f=aA^{b}\,}$ ${\displaystyle \sigma _{f}^{2}\approx \left({a}{b}{A}^{b-1}{\sigma _{A}}\right)^{2}=\left({\frac {{f}{b}{\sigma _{A}}}{A}}\right)^{2}}$ ${\displaystyle \sigma _{f}\approx \left|{a}{b}{A}^{b-1}{\sigma _{A}}\right|=\left|{\frac {{f}{b}{\sigma _{A}}}{A}}\right|}$
${\displaystyle f=a\ln(bA)\,}$ ${\displaystyle \sigma _{f}^{2}\approx \left(a{\frac {\sigma _{A}}{A}}\right)^{2}}$[14] ${\displaystyle \sigma _{f}\approx \left|a{\frac {\sigma _{A}}{A}}\right|}$
${\displaystyle f=a\log _{10}(bA)\,}$ ${\displaystyle \sigma _{f}^{2}\approx \left(a{\frac {\sigma _{A}}{A\ln(10)}}\right)^{2}}$[14] ${\displaystyle \sigma _{f}\approx \left|a{\frac {\sigma _{A}}{A\ln(10)}}\right|}$
${\displaystyle f=ae^{bA}\,}$ ${\displaystyle \sigma _{f}^{2}\approx f^{2}\left(b\sigma _{A}\right)^{2}}$[15] ${\displaystyle \sigma _{f}\approx \left|f\left(b\sigma _{A}\right)\right|}$
${\displaystyle f=a^{bA}\,}$ ${\displaystyle \sigma _{f}^{2}\approx f^{2}(b\ln(a)\sigma _{A})^{2}}$ ${\displaystyle \sigma _{f}\approx \left|f(b\ln(a)\sigma _{A})\right|}$
${\displaystyle f=a\sin(bA)\,}$ ${\displaystyle \sigma _{f}^{2}\approx \left[ab\cos(bA)\sigma _{A}\right]^{2}}$ ${\displaystyle \sigma _{f}\approx \left|ab\cos(bA)\sigma _{A}\right|}$
${\displaystyle f=a\cos \left(bA\right)\,}$ ${\displaystyle \sigma _{f}^{2}\approx \left[ab\sin(bA)\sigma _{A}\right]^{2}}$ ${\displaystyle \sigma _{f}\approx \left|ab\sin(bA)\sigma _{A}\right|}$
${\displaystyle f=A^{B}\,}$ ${\displaystyle \sigma _{f}^{2}\approx f^{2}\left[\left({\frac {B}{A}}\sigma _{A}\right)^{2}+\left(\ln(A)\sigma _{B}\right)^{2}+2{\frac {B\ln(A)}{A}}\sigma _{AB}\right]}$ ${\displaystyle \sigma _{f}\approx \left|f\right|{\sqrt {\left({\frac {B}{A}}\sigma _{A}\right)^{2}+\left(\ln(A)\sigma _{B}\right)^{2}+2{\frac {B\ln(A)}{A}}\sigma _{AB}}}}$
${\displaystyle f={\sqrt {aA^{2}\pm bB^{2}}}\,}$ ${\displaystyle \sigma _{f}^{2}\approx \left({\frac {A}{f}}\right)^{2}a^{2}\sigma _{A}^{2}+\left({\frac {B}{f}}\right)^{2}b^{2}\sigma _{B}^{2}\pm 2ab{\frac {AB}{f^{2}}}\,\sigma _{AB}}$ ${\displaystyle \sigma _{f}\approx {\sqrt {\left({\frac {A}{f}}\right)^{2}a^{2}\sigma _{A}^{2}+\left({\frac {B}{f}}\right)^{2}b^{2}\sigma _{B}^{2}\pm 2ab{\frac {AB}{f^{2}}}\,\sigma _{AB}}}}$

For uncorrelated variables (${\displaystyle \rho _{AB}=0}$) the covariance terms are also zero, as ${\displaystyle \sigma _{AB}=\rho _{AB}\sigma _{A}\sigma _{B}\,}$.

In this case, expressions for more complicated functions can be derived by combining simpler functions. For example, repeated multiplication, assuming no correlation gives,

${\displaystyle f=ABC;\left({\frac {\sigma _{f}}{f}}\right)^{2}\approx \left({\frac {\sigma _{A}}{A}}\right)^{2}+\left({\frac {\sigma _{B}}{B}}\right)^{2}+\left({\frac {\sigma _{C}}{C}}\right)^{2}.}$

For the case ${\displaystyle f=AB}$ we also have Goodman's expression[2] for the exact variance: for the uncorrelated case it is

${\displaystyle V(XY)=E(X)^{2}V(Y)+E(Y)^{2}V(X)+E((X-E(X))^{2}(Y-E(Y))^{2})}$

and therefore we have:

${\displaystyle \sigma _{f}^{2}=A^{2}\sigma _{B}^{2}+B^{2}\sigma _{A}^{2}+\sigma _{A}^{2}\sigma _{B}^{2}}$

## Example calculations

### Inverse tangent function

We can calculate the uncertainty propagation for the inverse tangent function as an example of using partial derivatives to propagate error.

Define

${\displaystyle f(x)=\arctan(x),}$

where ${\displaystyle \Delta _{x}}$ is the absolute uncertainty on our measurement of x. The derivative of f(x) with respect to x is

${\displaystyle {\frac {df}{dx}}={\frac {1}{1+x^{2}}}.}$

Therefore, our propagated uncertainty is

${\displaystyle \Delta _{f}\approx {\frac {\Delta _{x}}{1+x^{2}}},}$

where ${\displaystyle \Delta _{f}}$ is the absolute propagated uncertainty.

### Resistance measurement

A practical application is an experiment in which one measures current, I, and voltage, V, on a resistor in order to determine the resistance, R, using Ohm's law, R = V / I.

Given the measured variables with uncertainties, I ± σI and V ± σV, and neglecting their possible correlation, the uncertainty in the computed quantity, σR, is:

${\displaystyle \sigma _{R}\approx {\sqrt {\sigma _{V}^{2}\left({\frac {1}{I}}\right)^{2}+\sigma _{I}^{2}\left({\frac {-V}{I^{2}}}\right)^{2}}}=R{\sqrt {\left({\frac {\sigma _{V}}{V}}\right)^{2}+\left({\frac {\sigma _{I}}{I}}\right)^{2}}}.}$

## References

1. ^ Kirchner, James. "Data Analysis Toolkit #5: Uncertainty Analysis and Error Propagation" (PDF). Berkeley Seismology Laboratory. University of California. Retrieved 22 April 2016.
2. ^ a b Goodman, Leo (1960). "On the Exact Variance of Products". Journal of the American Statistical Association. 55 (292): 708–713. doi:10.2307/2281592. JSTOR 2281592.
3. ^ Ochoa1,Benjamin; Belongie, Serge "Covariance Propagation for Guided Matching"
4. ^ Ku, H. H. (October 1966). "Notes on the use of propagation of error formulas". Journal of Research of the National Bureau of Standards. National Bureau of Standards. 70C (4): 262. doi:10.6028/jres.070c.025. ISSN 0022-4316. Retrieved 3 October 2012.
5. ^ Clifford, A. A. (1973). Multivariate error analysis: a handbook of error propagation and calculation in many-parameter systems. John Wiley & Sons. ISBN 0470160551.[page needed]
6. ^ Lee, S. H.; Chen, W. (2009). "A comparative study of uncertainty propagation methods for black-box-type problems". Structural and Multidisciplinary Optimization. 37 (3): 239–253. doi:10.1007/s00158-008-0234-7.
7. ^ Hayya, Jack; Armstrong, Donald; Gressis, Nicolas (July 1975). "A Note on the Ratio of Two Normally Distributed Variables". Management Science. 21 (11): 1338–1341. doi:10.1287/mnsc.21.11.1338. JSTOR 2629897.
8. ^ a b Lecomte, Christophe (May 2013). "Exact statistics of systems with uncertainties: an analytical theory of rank-one stochastic dynamic systems". Journal of Sound and Vibrations. 332 (11): 2750–2776. doi:10.1016/j.jsv.2012.12.009.
9. ^ Lecomte, Christophe (May 2013). "Exact statistics of systems with uncertainties: an analytical theory of rank-one stochastic dynamic systems". Journal of Sound and Vibrations. 332 (11). Section (4.1.1). doi:10.1016/j.jsv.2012.12.009.
10. ^ Lecomte, Christophe (May 2013). "Exact statistics of systems with uncertainties: an analytical theory of rank-one stochastic dynamic systems". Journal of Sound and Vibrations. 332 (11). Eq.(39)-(40). doi:10.1016/j.jsv.2012.12.009.
11. ^ "A Summary of Error Propagation" (PDF). p. 2. Retrieved 2016-04-04.
12. ^ "Propagation of Uncertainty through Mathematical Operations" (PDF). p. 5. Retrieved 2016-04-04.
13. ^ "Strategies for Variance Estimation" (PDF). p. 37. Retrieved 2013-01-18.
14. ^ a b Harris, Daniel C. (2003), Quantitative chemical analysis (6th ed.), Macmillan, p. 56, ISBN 0-7167-4464-3
15. ^ "Error Propagation tutorial" (PDF). Foothill College. October 9, 2009. Retrieved 2012-03-01.