# Uncertainty Analysis and Error Propagation

The Uncertainty Propagation system is a practical way to propagate laboratory uncertainties from measured data using classical uncertainty propagation formulas (absolute and statisttical) to obtain the uncertainties of data obtained from experiments.
To get into the uncertainty propagation module, do this: click the Gráficos e plots button and then “Propagação de Incertezas…”, as shown below.

## Propagation Assistant

The propagation assistant is a practical tool to propagate uncertainties of data obtained in laboratory. It is the opening screen and you can also get to it by using the “Assistente” menu.

1 – After clicking “Concluir” to finish the assistant, click button “Propagar” of the main module to propagate the errors;
2 – McLabEn shows propagated variables and possible reasons some uncertainties may not have been propagated. After propagation, it is possible to click “Gráficos” (for graphs) and “Exportar Variáveis” (to export variables to the main environment, the command line).

3 – Click Gráficos Individuais to see graphs about the variables;
4 – All calculated variables and their uncertainties can be visualized in Variáveis Calculadas;

## Main Module

Whenever you already know the primary uncertainties of the measured variables, it is practical to go straight to the main module to propagate errors:

1 – The box “Variáveis conhecidas / medidas” stores measured data. Use the box beside the “Adicionar / Alterar” button to rename the data set. Type the measured data and uncertainty separing them with ; (semicolon) and spaces. Click button “Adicionar/Alterar” to include the new data set.

2 – If you want to insert a scalar with its associated uncertainty to make calculations, just name the variable and type only ONE value and ONE uncertainty;

3 – Insert all known data repeating operations 2 and 3;
4 – To add a new variable to be calculated based on experimental data, type its formula relating them with the known variables in the box  “Variáveis desconhecidas”. Add a new unknown variable with the button “Adicionar / Alterar”. The formulas in these fields are operated element-wise among vector variables or all with the scalar value if one of them is a scalar;

5 – The following unknown variables may refer to unknown variables that have already been added (it has become known). Click “Adicionar/Alterar” to add new unknown variables;

6 – To replace a relation that was incorrect just type the correct formula in the field and click the button “Adicionar / Alterar”. The new formula replaces the previous one;
7 – Repeat steps 6 and 7 until you have added all unknown variables;
8 – Next step is error propagation. Choose the type of uncertainty to propagate (statistical or global – “estatística” or “global”) and click button “Propagar”.

9 – McLabEn shows the variables that were propagated and reasons some of them may not have been calculated. After propagation, buttons Gráficos and Exportar Variáveis become enabled;

10 – To view graphs of the variables of the problem, click button Gráficos Individuais;
11 – All variables and their uncertainties can be visualized in Variáveis Calculadas;

## Formulas

Error propagation has some theories which will not be discussed. The formulas for error propagation of a function f dependent on x1, x2, …, xn are:  f = f(x1, x2, …,xn)

Global uncertainty:

Statistical uncertainty: