Calculation of uncertainties