Propagation of uncertainty explained

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 . Uncertainties can also be defined by the relative error, which is usually written as a percentage.Most commonly, the uncertainty on a quantity is quantified in terms of the standard deviation,, which is the positive square root of the variance. The value of a quantity and its error are then expressed as an interval . However, the most general way of characterizing uncertainty is by specifying its probability distribution.If the probability distribution of the variable is known or can be assumed, in theory it is possible to get any of its statistics. In particular, 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, which means that the region 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]

In a general context where a nonlinear function modifies the uncertain parameters (correlated or not), the standard tools to propagate uncertainty, and infer resulting quantity probability distribution/statistics, are sampling techniques from the Monte Carlo method family.[2] For very expansive data or complex functions, the calculation of the error propagation may be very expansive so that a surrogate model[3] or a parallel computing strategy[4] [5] [6] may be necessary.

In some particular cases, the uncertainty propagation calculation can be done through simplistic algebraic procedures. Some of these scenarios are described below.

Linear combinations

Let

\{fk(x1,x2,...,xn)\}

be a set of m functions, which are linear combinations of

n

variables

x1,x2,...,xn

with combination coefficients

Ak1,Ak2,...,Akn,(k=1,...,m)

:f_k = \sum_^n A_ x_i,or in matrix notation,\mathbf = \mathbf \mathbf.

Also let the variance–covariance matrix of be denoted by

\boldsymbol\Sigmax

and let the mean value be denoted by

\boldsymbol{\mu}

:\boldsymbol\Sigma^x = E[(\mathbf{x}-\boldsymbol\mu)\otimes (\mathbf{x}-\boldsymbol\mu)]=\begin \sigma^2_1 & \sigma_ & \sigma_ & \cdots \\ \sigma_ & \sigma^2_2 & \sigma_ & \cdots\\ \sigma_ & \sigma_ & \sigma^2_3 & \cdots \\ \vdots & \vdots & \vdots & \ddots\end = \begin ^x_ & ^x_ & ^x_ & \cdots \\ ^x_ & ^x_ & ^x_ & \cdots\\ ^x_ & ^x_ & ^x_ & \cdots \\ \vdots & \vdots & \vdots & \ddots\end.

is the outer product.

Then, the variance–covariance matrix

\boldsymbol\Sigmaf

of f is given by\boldsymbol\Sigma^f= E[(\mathbf{f} - E[\mathbf{f}]) \otimes (\mathbf - E[\mathbf{f}])]= E[\mathbf{A}(\mathbf{x}-\boldsymbol\mu) \otimes \mathbf{A}(\mathbf{x}-\boldsymbol\mu)]= \mathbf E[(\mathbf{x}-\boldsymbol\mu) \otimes (\mathbf{x}-\boldsymbol\mu)]\mathbf^\mathrm= \mathbf \boldsymbol\Sigma^x \mathbf^\mathrm.

In component notation, the equation\boldsymbol\Sigma^f = \mathbf \boldsymbol\Sigma^x \mathbf^\mathrmreads\Sigma^f_ = \sum_k^n \sum_l^n A_ ^x_ A_.

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\Sigma^f_ = \sum_k^n A_ \Sigma^x_k A_,where

x
\Sigma
k

=

2
\sigma
xk
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

\boldsymbol\Sigmax

is a diagonal matrix,

\boldsymbol\Sigmaf

is in general a full matrix.

The general expressions for a scalar-valued function f are a little simpler (here a is a row vector):f = \sum_i^n a_i x_i = \mathbf,\sigma^2_f = \sum_i^n \sum_j^n a_i \Sigma^x_ a_j = \mathbf \boldsymbol\Sigma^x \mathbf^\mathrm.

Each covariance term

\sigmaij

can be expressed in terms of the correlation coefficient

\rhoij

by

\sigmaij=\rhoij\sigmai\sigmaj

, so that an alternative expression for the variance of f is\sigma^2_f = \sum_i^n a_i^2 \sigma^2_i + \sum_i^n \sum_^n a_i a_j \rho_ \sigma_i \sigma_j.

In the case that the variables in x are uncorrelated, this simplifies further to\sigma^2_f = \sum_i^n a_i^2 \sigma^2_i.

In the simple case of identical coefficients and variances, we find\sigma_f = \sqrt\, |a| \sigma.

For the arithmetic mean,

a=1/n

, the result is the standard error of the mean:\sigma_f = \frac .

Non-linear combinations

See also: Taylor expansions for the moments of functions of random variables. 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 linearised by approximation to a first-order Taylor series expansion, though in some cases, exact formulae can be derived that do not depend on the expansion as is the case for the exact variance of products.[7] The Taylor expansion would be:f_k \approx f^0_k+ \sum_i^n \frac x_i where

\partialfk/\partialxi

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,\mathrm \approx \mathrm^0 + \mathrm \mathrm\,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,
\partialfk
\partialxi
and
\partialfk
\partialxj
. In matrix notation,[8] \mathrm^\mathrm = \mathrm \mathrm^\mathrm \mathrm^\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

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:[9] s_f = \sqrtwhere

sf

represents the standard deviation of the function

f

,

sx

represents the standard deviation of

x

,

sy

represents the standard deviation of

y

, and so forth.

This formula is based on the linear characteristics of the gradient of

f

and therefore it is a good estimation for the standard deviation of

f

as long as

sx,sy,sz,\ldots

are small enough. Specifically, the linear approximation of

f

has to be close to

f

inside a neighbourhood of radius

sx,sy,sz,\ldots

.[10]

Example

Any non-linear differentiable function,

f(a,b)

, of two variables,

a

and

b

, can be expanded asf\approx f^0+\fraca+\fracb.If we take the variance on both sides and use the formula[11] for the variance of a linear combination of variables\operatorname(aX + bY) = a^2\operatorname(X) + b^2\operatorname(Y) + 2ab \operatorname(X, Y),then we obtain\sigma^2_f\approx\left| \frac\right| ^2\sigma^2_a+\left| \frac\right|^2\sigma^2_b+2\frac\frac \sigma_,where

\sigmaf

is the standard deviation of the function

f

,

\sigmaa

is the standard deviation of

a

,

\sigmab

is the standard deviation of

b

and

\sigmaab=\sigmaa\sigmab\rhoab

is the covariance between

a

and

b

.

In the particular case that Then\sigma^2_f \approx b^2\sigma^2_a+a^2 \sigma_b^2+2ab\,\sigma_or\left(\frac\right)^2 \approx \left(\frac \right)^2 + \left(\frac\right)^2 + 2\left(\frac\right)\left(\frac\right)\rho_where

\rhoab

is the correlation between

a

and

b

.

When the variables

a

and

b

are uncorrelated,

\rhoab=0

. Then\left(\frac\right)^2 \approx \left(\frac \right)^2 + \left(\frac\right)^2.

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;[12] see Uncertainty quantification for details.

Reciprocal and shifted reciprocal

In the special case of the inverse or reciprocal

1/B

, where

B=N(0,1)

follows a standard normal distribution, the resulting distribution is a reciprocal standard normal distribution, and there is no definable variance.[13]

However, in the slightly more general case of a shifted reciprocal function

1/(p-B)

for

B=N(\mu,\sigma)

following a general normal distribution, then mean and variance statistics do exist in a principal value sense, if the difference between the pole

p

and the mean

\mu

is real-valued.[14]

Ratios

Ratios are also problematic; normal approximations exist under certain conditions.

Example formulae

This table shows the variances and standard deviations of simple functions of the real variables

A,B

with standard deviations

\sigmaA,\sigmaB,

covariance

\sigmaAB=\rhoAB\sigmaA\sigmaB,

and correlation

\rhoAB.

The real-valued coefficients

a

and

b

are assumed exactly known (deterministic), i.e.,

\sigmaa=\sigmab=0.

In the right-hand columns of the table,

A

and

B

are expectation values, and

f

is the value of the function calculated at those values.
Function Variance Standard deviation

f=aA

2
\sigma
f

=

2
a
A

\sigmaf=

a\sigma_A

f=A+B

2
\sigma
f

=

2
\sigma
A

+

2
\sigma
B

+2\sigmaAB

\sigmaf=

2
\sqrt{\sigma
A

+

2
\sigma
B

+2\sigmaAB

}

f=A-B

2
\sigma
f

=

2
\sigma
A

+

2
\sigma
B

-2\sigmaAB

\sigmaf=

2
\sqrt{\sigma
A

+

2
\sigma
B

-2\sigmaAB

}

f=aA+bB

2
\sigma
f

=

2
a
A

+

2
b
B

+2ab\sigmaAB

\sigmaf=

2
\sqrt{a
A

+

2
b
B

+2ab\sigmaAB

}

f=aA-bB

2
\sigma
f

=

2
a
A

+

2
b
B

-2ab\sigmaAB

\sigmaf=

2
\sqrt{a
A

+

2
b
B

-2ab\sigmaAB

}

f=AB

2
\sigma
f

f2\left[\left(

\sigmaA
A

\right)2+\left(

\sigmaB
B

\right)2+2

\sigmaAB
AB

\right]

[15] [16]

\sigmaf\left

f \right\sqrt

f=

A
B
2
\sigma
f

f2\left[\left(

\sigmaA
A

\right)2+\left(

\sigmaB
B

\right)2-2

\sigmaAB
AB

\right]

[17]

\sigmaf\left

f \right\sqrt

f=

A
A+B
2
\sigma
f

f2\left(
\left(A+B\right)2
B2
A2
2
\sigma
A
2
+\sigma
B

-2

B
A

\sigmaAB\right)

\sigmaf\left

\frac\right\sqrt

f=aAb

2
\sigma
f

\left({a}{b}{A}b-1{\sigmaA}\right)2=\left(

{f
b

{\sigmaA}}{A}\right)2

\sigmaf\left

^ \right= \left\frac \right

f=aln(bA)

2
\sigma
f

\left(a

\sigmaA
A

\right)2

\sigmaf\left

a \frac\right

f=alog10(bA)

2
\sigma
f

\left(a

\sigmaA
Aln(10)

\right)2

\sigmaf\left

a \frac \right

f=aebA

2
\sigma
f

f2\left(b\sigmaA\right)2

[18]

\sigmaf\left

f \right\left\left(b\sigma_A \right) \right

f=abA

2
\sigma
f

f2

2
(bln(a)\sigma
A)

\sigmaf\left

f \right\leftb \ln(a) \sigma_A \right

f=a\sin(bA)

2
\sigma
f

\left[ab\cos(bA)\sigmaA\right]2

\sigmaf\left

a b \cos(b A) \sigma_A \right

f=a\cos\left(bA\right)

2
\sigma
f

\left[ab\sin(bA)\sigmaA\right]2

\sigmaf\left

a b \sin(b A) \sigma_A \right

f=a\tan\left(bA\right)

2
\sigma
f

\left[ab\sec2(bA)\sigmaA\right]2

\sigmaf\left

a b \sec^2(b A) \sigma_A \right

f=AB

2
\sigma
f

f2\left[\left(

B
A

\sigmaA\right)2+\left(ln(A)\sigmaB\right)2+2

Bln(A)
A

\sigmaAB\right]

\sigmaf\left

f \right\sqrt

f=\sqrt{aA2\pmbB2}

2
\sigma
f

\left(

A
f

\right)2

2
a
A

+\left(

B
f

\right)2

2
b
B

\pm2ab

AB
f2

\sigmaAB

\sigmaf\sqrt{\left(

A
f

\right)2

2
a
A

+\left(

B
f

\right)2

2
b
B

\pm2ab

AB
f2

\sigmaAB

}

For uncorrelated variables (

\rhoAB=0

,

\sigmaAB=0

) expressions for more complicated functions can be derived by combining simpler functions. For example, repeated multiplication, assuming no correlation, givesf = ABC; \qquad \left(\frac\right)^2 \approx \left(\frac\right)^2 + \left(\frac\right)^2+ \left(\frac\right)^2.

For the case

f=AB

we also have Goodman's expression[7] for the exact variance: for the uncorrelated case it isV(XY)= E(X)^2 V(Y) + E(Y)^2 V(X) + E((X-E(X))^2 (Y-E(Y))^2),and therefore we have\sigma_f^2 = A^2\sigma_B^2 + B^2\sigma_A^2 + \sigma_A^2\sigma_B^2.

Effect of correlation on differences

If A and B are uncorrelated, their difference AB will have more variance than either of them. An increasing positive correlation (

\rhoAB\to1

) will decrease the variance of the difference, converging to zero variance for perfectly correlated variables with the same variance. On the other hand, a negative correlation (

\rhoAB\to-1

) will further increase the variance of the difference, compared to the uncorrelated case.

For example, the self-subtraction f = AA has zero variance

2
\sigma
f

=0

only if the variate is perfectly autocorrelated (

\rhoA=1

). If A is uncorrelated,

\rhoA=0,

then the output variance is twice the input variance,
2
\sigma
f

=

2
2\sigma
A.
And if A is perfectly anticorrelated,

\rhoA=-1,

then the input variance is quadrupled in the output,
2
\sigma
f

=4

2
\sigma
A
(notice

1-\rhoA=2

for f = aAaA in the table above).

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.

Definef(x) = \arctan(x),where

\Deltax

is the absolute uncertainty on our measurement of . The derivative of with respect to is\frac = \frac.

Therefore, our propagated uncertainty is\Delta_ \approx \frac,where

\Deltaf

is the absolute propagated uncertainty.

Resistance measurement

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

Given the measured variables with uncertainties, and, and neglecting their possible correlation, the uncertainty in the computed quantity,, is:

\sigma_R \approx \sqrt = R\sqrt.

See also

Further reading

External links

Notes and References

  1. Web site: Kirchner . James . Data Analysis Toolkit #5: Uncertainty Analysis and Error Propagation . Berkeley Seismology Laboratory. University of California . 22 April 2016.
  2. Book: Kroese . D. P. . Taimre . T. . Botev . Z. I. . Handbook of Monte Carlo Methods . 2011 . John Wiley & Sons.
  3. Ranftl. Sascha. von der Linden. Wolfgang. 2021-11-13. Bayesian Surrogate Analysis and Uncertainty Propagation. Physical Sciences Forum. 3. 1. 6. 10.3390/psf2021003006. 2673-9984. free . 2101.04038.
  4. Atanassova . E. . Gurov . T. . Karaivanova . A. . Ivanovska . S. . Durchova . M. . Dimitrov . D. . 2016 . On the parallelization approaches for Intel MIC architecture . AIP Conference Proceedings . 1773 . 1 . 070001 . 10.1063/1.4964983 . 2016AIPC.1773g0001A.
  5. Cunha Jr . A. . Nasser . R. . Sampaio . R. . Lopes . H. . Breitman . K. . 2014 . Uncertainty quantification through the Monte Carlo method in a cloud computing setting . Computer Physics Communications . 185 . 5 . 1355–1363 . 10.1016/j.cpc.2014.01.006 . 2105.09512 . 2014CoPhC.185.1355C . 32376269.
  6. Lin . Y. . Wang . F. . Liu . B. . 2018 . Random number generators for large-scale parallel Monte Carlo simulations on FPGA . Journal of Computational Physics . 360 . 93–103 . 10.1016/j.jcp.2018.01.029 . 2018JCoPh.360...93L.
  7. Goodman . Leo . Leo Goodman . On the Exact Variance of Products . Journal of the American Statistical Association . 1960 . 55 . 292 . 708–713 . 10.2307/2281592 . 2281592.
  8. Ochoa1, Benjamin; Belongie, Serge "Covariance Propagation for Guided Matching"
  9. Ku. H. H.. October 1966 . Notes on the use of propagation of error formulas. Journal of Research of the National Bureau of Standards . 70C. 4. 262. 10.6028/jres.070c.025. 0022-4316. 3 October 2012. free.
  10. Book: Clifford, A. A. . Multivariate error analysis: a handbook of error propagation and calculation in many-parameter systems . John Wiley & Sons . 1973 . 978-0470160558 .
  11. Web site: Soch. Joram. 2020-07-07. Variance of the linear combination of two random variables. 2022-01-29. The Book of Statistical Proofs. en.
  12. S. H. . Lee . W. . Chen . A comparative study of uncertainty propagation methods for black-box-type problems . Structural and Multidisciplinary Optimization . 37 . 3 . 2009 . 239–253 . 10.1007/s00158-008-0234-7 . 119988015 .
  13. Book: Johnson . Norman L. . Kotz . Samuel . Balakrishnan . Narayanaswamy . Continuous Univariate Distributions, Volume 1 . 1994 . Wiley . 0-471-58495-9 . 171 .
  14. Lecomte . Christophe. Exact statistics of systems with uncertainties: an analytical theory of rank-one stochastic dynamic systems. Journal of Sound and Vibration. 332. 11. May 2013. 2750–2776. 10.1016/j.jsv.2012.12.009.
  15. Web site: A Summary of Error Propagation . 2 . 2016-04-04 . https://web.archive.org/web/20161213135602/http://ipl.physics.harvard.edu/wp-uploads/2013/03/PS3_Error_Propagation_sp13.pdf . 2016-12-13 . dead .
  16. Web site: Propagation of Uncertainty through Mathematical Operations . 5 . 2016-04-04.
  17. Web site: Strategies for Variance Estimation . 37 . 2013-01-18.
  18. Web site: Error Propagation tutorial. October 9, 2009. Foothill College . 2012-03-01.