MarketPropagation of uncertainty
Company Profile

Propagation of uncertainty

In statistics, propagation of uncertainty is the effect of variables' uncertainties 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 which propagate due to the combination of variables in the function.

Linear combinations
Let \{f_k(x_1, x_2, \dots, x_n)\} be a set of m functions, which are linear combinations of n variables x_1, x_2, \dots, x_n with combination coefficients A_{k1}, A_{k2}, \dots,A_{kn}, (k = 1, \dots, m): f_k = \sum_{i=1}^n A_{ki} x_i, or in matrix notation, \mathbf{f} = \mathbf{A} \mathbf{x}. Also let the variance–covariance matrix of be denoted by \boldsymbol\Sigma^x and let the mean value be denoted by \boldsymbol{\mu}: \begin{align} \boldsymbol\Sigma^x = \operatorname{E}[(\mathbf{x}-\boldsymbol\mu)\otimes (\mathbf{x}-\boldsymbol\mu)] &= \begin{pmatrix} \sigma^2_1 & \sigma_{12} & \sigma_{13} & \cdots \\ \sigma_{21} & \sigma^2_2 & \sigma_{23} & \cdots\\ \sigma_{31} & \sigma_{32} & \sigma^2_3 & \cdots \\ \vdots & \vdots & \vdots & \ddots \end{pmatrix} \\[1ex] &= \begin{pmatrix} {\Sigma}^x_{11} & {\Sigma}^x_{12} & {\Sigma}^x_{13} & \cdots \\ {\Sigma}^x_{21} & {\Sigma}^x_{22} & {\Sigma}^x_{23} & \cdots \\ {\Sigma}^x_{31} & {\Sigma}^x_{32} & {\Sigma}^x_{33} & \cdots \\ \vdots & \vdots & \vdots & \ddots \end{pmatrix}. \end{align} \otimes is the outer product. Then, the variance–covariance matrix \boldsymbol\Sigma^f of f is given by \begin{align} \boldsymbol\Sigma^f &= \operatorname{E}\left[(\mathbf{f} - \operatorname{E}[\mathbf{f}]) \otimes (\mathbf{f} - \operatorname{E}[\mathbf{f}])\right] = \operatorname{E}\left[\mathbf{A}(\mathbf{x}-\boldsymbol\mu) \otimes \mathbf{A}(\mathbf{x}-\boldsymbol\mu)\right] \\[1ex] &= \mathbf{A} \operatorname{E}\left[(\mathbf{x}-\boldsymbol\mu) \otimes (\mathbf{x}-\boldsymbol\mu)\right] \mathbf{A}^\mathrm{T} = \mathbf{A} \boldsymbol\Sigma^x \mathbf{A}^\mathrm{T}. \end{align} In component notation, the equation \boldsymbol\Sigma^f = \mathbf{A} \boldsymbol\Sigma^x \mathbf{A}^\mathrm{T} reads \Sigma^f_{ij} = \sum_k^n \sum_l^n A_{ik} {\Sigma}^x_{kl} A_{jl}. 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_{ij} = \sum_k^n A_{ik} \Sigma^x_k A_{jk}, where \Sigma^x_k = \sigma^2_{x_k} 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\Sigma^x is a diagonal matrix, \boldsymbol\Sigma^f 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{a x}, \sigma^2_f = \sum_i^n \sum_j^n a_i \Sigma^x_{ij} a_j = \mathbf{a} \boldsymbol\Sigma^x \mathbf{a}^\mathrm{T}. Each covariance term \sigma_{ij} can be expressed in terms of the correlation coefficient \rho_{ij} by \sigma_{ij} = \rho_{ij} \sigma_i \sigma_j, 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_{j (j \ne 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 \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{n}\, |a| \sigma. For the arithmetic mean, a=1/n, the result is the standard error of the mean: \sigma_f = \frac{\sigma} {\sqrt{n}}. == Non-linear combinations ==
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 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. The Taylor expansion would be: f_k \approx f^0_k+ \sum_i^n \frac{\partial f_k}{\partial {x_i}} x_i where \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, \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, \frac{\partial f_k}{\partial x_i} and \frac{\partial f_k}{\partial x_j}. In matrix notation, \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 \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: 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 s_f represents the standard deviation of the function f, s_x represents the standard deviation of x, s_y 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 s_x, s_y, s_z,\ldots are small enough. Specifically, the linear approximation of f has to be close to f inside a neighbourhood of radius s_x, s_y, s_z,\ldots. Example Any non-linear differentiable function, f(a,b), of two variables, a and b, can be expanded as f\approx f^0+\frac{\partial f}{\partial a}a+\frac{\partial f}{\partial b}b. If we take the variance on both sides and use the formula for the variance of a linear combination of variables \operatorname{Var}(aX + bY) = a^2\operatorname{Var}(X) + b^2\operatorname{Var}(Y) + 2ab \operatorname{Cov}(X, Y), then we obtain \sigma^2_f\approx\left| \frac{\partial f}{\partial a}\right| ^2\sigma^2_a+\left| \frac{\partial f}{\partial b}\right|^2\sigma^2_b+2\frac{\partial f}{\partial a}\frac{\partial f} {\partial b}\sigma_{ab}, where \sigma_{f} is the standard deviation of the function f, \sigma_{a} is the standard deviation of a, \sigma_{b} is the standard deviation of b and \sigma_{ab} = \sigma_{a}\sigma_{b} \rho_{ab} is the covariance between a and b. In the particular case that {{nowrap|\frac{\partial f}{\partial a} = b,}} {{nowrap|\frac{\partial f}{\partial b} = a.}} Then \sigma^2_f \approx b^2\sigma^2_a+a^2 \sigma_b^2+2ab\,\sigma_{ab} or \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)\rho_{ab} where \rho_{ab} is the correlation between a and b. When the variables a and b are uncorrelated, \rho_{ab}=0. Then \left(\frac{\sigma_f}{f}\right)^2 \approx \left(\frac{\sigma_a}{a} \right)^2 + \left(\frac{\sigma_b}{b}\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; 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. 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. Ratios Ratios are also problematic; normal approximations exist under certain conditions. ==Example formulae==
Example formulae
This table shows the variances and standard deviations of simple functions of the real variables A, B with standard deviations \sigma_A, \sigma_B, covariance \sigma_{AB} = \rho_{AB} \sigma_A \sigma_B, and correlation \rho_{AB}. The real-valued coefficients a and b are assumed exactly known (deterministic), i.e., \sigma_a = \sigma_b = 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. For uncorrelated variables (\rho_{AB} = 0, \sigma_{AB} = 0) expressions for more complicated functions can be derived by combining simpler functions. For example, repeated multiplication, assuming no correlation, gives f = ABC; \qquad \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 f = AB we also have Goodman's expression for the exact variance: for the uncorrelated case it is \operatorname{V}[XY] = \operatorname{E}[X]^2 \operatorname{V}[Y] + \operatorname{E}[Y]^2 \operatorname{V}[X] + \operatorname{V}[X] \operatorname{V}[Y], and therefore we have \sigma_f^2 = A^2\sigma_B^2 + B^2\sigma_A^2 + \sigma_A^2\sigma_B^2. The last term represents a small correction to the usual formula as can be seen by dividing both sides by f^2 = A^2 B^2 . \left(\frac{\sigma_f}{f}\right)^2 = \left(\frac{\sigma_A}{A}\right)^2 + \left(\frac{\sigma_B}{B}\right)^2 + \left(\frac{\sigma_A\sigma_B}{AB}\right)^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 (\rho_{AB} \to 1) 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 (\rho_{AB} \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 \sigma_f^2 = 0 only if the variate is perfectly autocorrelated (\rho_A = 1). If A is uncorrelated, \rho_A = 0, then the output variance is twice the input variance, \sigma_f^2 = 2\sigma^2_A. And if A is perfectly anticorrelated, \rho_A = -1, then the input variance is quadrupled in the output, \sigma_f^2 = 4 \sigma^2_A (notice 1 - \rho_A = 2 for f = aAaA in the table above). ==Example calculations==
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 f(x) = \arctan(x), where \Delta_x is the absolute uncertainty on our measurement of . The derivative of with respect to is \frac{d f}{d x} = \frac{1}{1+x^2}. Therefore, our propagated uncertainty is \Delta_{f} \approx \frac{\Delta_x}{1+x^2}, where \Delta_f 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{ \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 }. ==See also==
tickerdossier.comtickerdossier.substack.com