## Total uncertainty

Consider the result of measurement Y expressed by a function of other measurements X_{1}, X_{2}, ..., X_{n}

Y = f(X_{1}, X_{2}, ..., X_{n})

### Total uncertainty of independent measurements

The total uncertainty is a combination of all measurements, and the measurement results can be
independent or correlate with each other. For independent measurements, the total variance (u_{c}^{2}(y))
is determined by the formula:

u_{c}^{2}(y) = Σ^{n}_{i=1}[df/dx_{i}]^{2}u^{2}(x_{i})

Where f is the measurement model, u_{i}is the uncertainty of type A or B.

If the nonlinearity of the function f is critical, the Taylor series for the derivative df/dx_{i}should include senior degrees:

Σ^{n}_{i=1}Σ^{n}_{j=1}[½[d^{2}f/(dx_{i}dx_{j})]^{2}+ df/dx_{i}d^{3}f/dx_{i}dx_{j}^{2}]u^{2}(x_{i})u^{2}(x_{j})

Partial derivatives of the measurement model calculated at the point μ(x_{i}) are called coefficients
sensitivity and describe the change in the mathematical expectation y depending on the mathematical expectation
independent measurement values. In particular, the change in y caused by a small change in Δx_{i},
expressed as: (Δy)_{i} = (df/dx_{i})(Δx_{i}). If the reason for this
the change is the uncertainty of the mathematical expectation x_{i}, the change y is expressed as
(df/dx_{i})u(x_{i}). The total variance u_{c}^{2}(y) can be expressed
as the sum of the variances of each of x_{i}, hence:

u_{c}^{2}= Σ_{i=1}^{n}[c_{i}u(x_{i})]^{2}= Σ u_{i}^{2}(y)

Where c_{i}= df/dx_{i}and u_{i}(y) =|c_{i}|u(x_{i})

The total uncertainty can be calculated by replacing c_{i}u(x_{i}) with the following expression:

Z_{i}= ½{f[x_{1}, ..., x_{i}+ u(x_{i}), ..., x_{n}] - f[x_{1}, ..., x_{i}- u(x_{i}), ..., x_{n}]}

Thus, we calculate the changes of y as a result of the change of x_{i} in the interval between +u(x_{i})
and -u(x_{i}). The value u_{i}(y) can be taken |Z_{i}|, the corresponding coefficient
sensitivity c_{i} is equal to Z_{i}/u(x_{i}).

The sensitivity coefficient c_{i} can also be obtained as a result of measuring y at fixed
by changing x_{i}, the true nature of the value of the function f will be lost, since the value
c_{i} will be obtained empirically.

### Total uncertainty of dependent measurements

In the case when the values of x_{i} have a correlation dependence, it is necessary to change the formula
total variance:

u^{2}_{c}(y) = Σ^{n}_{i=1}Σ^{n}_{j=1}df/dx_{i}• df/dx_{j}u(x_{i},x_{j}) = Σ_{i=1}^{n}[df/dx_{i}]^{2}u^{2}(x_{i}) + 2 Σ^{n-1}_{i=1}Σ^{n}_{j=i+1}df/dx_{i}• df/dx_{j}u(x_{i},x_{j})

Where x_{i}, x_{j}are the expected values of X_{i}and X_{j}, u(x_{i},x_{j}) - covariance of the values of x_{i}and x_{j}.

Correlation coefficient:

r(x_{i}, x_{j}) = r(x_{j}, x_{i}) = u(x_{i}, x_{j})/u(x_{i})u(x_{j})

r∈ [-1,1], if the mathematical expectations x_{i} and x_{j} are independent, then r=0.

u_{c}^{2}= Σ_{i=1}^{n}[c_{i}u(x_{i})]^{2}+ 2 Σ^{n-1}_{i=1}Σ^{n}_{j=i+1}c_{i}c_{j}u(x_{i}) u(x_{j}) r(x_{i},x_{j})

So, if all values have a direct relationship (r =1), the equation will take the form:

u_{c}^{2}(y) = [Σ^{n}_{i=1}c_{i}u(x_{i})]^{2}= [Σ^{n}_{i=1}df/dx_{i}u(x_{i})]^{2}

## Extended uncertainty

The extended uncertainty (U) is determined by the confidence interval of the total uncertainty: U = ku_{c}(y).
In practice, when the number of degrees of freedom u_{c}(y) can be neglected, the values are used
k=2 for 95% confidence interval and k=3 for 99% confidence interval.
When the number of degrees of freedom is known, and the uncertainties obey the law of normal distribution,
the Student's criterion is used as the criterion k.

## General uncertainty calculation algorithm

1. First of all, it is necessary to make a measurement model Y = f(X_{1}, X_{2}, ..., X_{n}).
The measurement model should include all values and all correction values that may affect the result
measurements.

2. Determine the statistical estimate of the average value of X_{i} using statistical analysis or other
methods.

3. Express the uncertainty value u(x_{i}) of each statistical estimate of the average value of x_{i}.
If the average value was obtained by statistical analysis, then uncertainty of type A is used, in the rest
in cases of type B uncertainty .

4. Express the covariance values for all measured quantities having a correlation dependence.

5. Calculate the measurement result: statistical estimation of the measured value Y based on the measurement model f,
using as statistical estimates X_{i} the values of x_{i} obtained at the second stage.

6. Determine the total uncertainty u_{c}(y) of the measurement result, y, based on the uncertainties
and covariance of statistical estimates of averages.

7. If necessary, calculate the extended uncertainty U.