The output of uncertainties obtained with a log=likelihood fit (option “VWLE”) are somewhat inconsistent (if the histogram has been re-scaled).
Using root version 5.34.01 with the following minimal example.
void TestFit() {
TH1D hGaus("hGaus","hgaus", 100, -5, 5);
hGaus.Sumw2();
hGaus.FillRandom("gaus",10000);
hGaus.Scale(0.01);
TFitResultPtr resPtr = hGaus.Fit("gaus","VWLES");
TFitResult *res = resPtr.Get();
for (int i = 0; i <3 ;++i) {
std::cout << res->Parameter(i) << " - " << res->LowerError(i) << " + " << res->UpperError(i) << std::endl;
}
}
If the histogram is scaled before the fit, the fit outputs three different uncertainties.
One after Migrad is done and Hesse has been run
FCN=0.422288 FROM HESSE STATUS=OK 16 CALLS 70 TOTAL
EDM=1.38199e-08 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER INTERNAL INTERNAL
NO. NAME VALUE ERROR STEP SIZE VALUE
1 Constant 3.97058e+00 4.86312e-01 5.26493e-05 3.97058e+00
2 Mean 8.63014e-03 1.00477e-01 1.33245e-05 8.63014e-03
3 Sigma 1.00476e+00 7.10483e-02 2.55226e-06 -9.27293e-01
Edit:
After Minos was done, Hesse again:
FCN=0.120438 FROM HESSE STATUS=OK 22 CALLS 23 TOTAL
EDM=2.8871e-05 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER INTERNAL INTERNAL
NO. NAME VALUE ERROR STEP SIZE VALUE
1 Constant 3.97058e+00 4.88173e+00 4.86312e-02 3.97058e+00
2 Mean 8.63014e-03 1.00859e+00 1.75530e-02 8.63014e-03
3 Sigma 1.00476e+00 7.16343e-01 3.39655e-03 -9.27293e-01
And the standard output from the fit, also shown without option “V”
****************************************
Minimizer is Minuit / Migrad
MinFCN = 0.422288
Chi2 = 59.1487
NDf = 97
Edm = 1.38199e-08
NCalls = 70
Constant = 3.97058 +/- 0.0484528
Mean = 0.00863014 +/- 0.0100107
Sigma = 1.00476 +/- 0.00698139 (limited)
Three different errors, all a factor 10 different. I don’t understand where the difference is coming from.
If the histogram is not rescaled all the uncertainties reported are the same size. If not using log-likelihood all the uncertainties are also the same.