Hi all,

I tried to fit two linear histograms with one data point shifted up. (see attached)

The data point is assigned with a very large error by Setbinerror in one of the histogram (linear_testfit_large_unc_P.pdf), while the data point in the other histogram (linear_testfit_norm_unc_P.pdf) just obtain the normal error which is the square root of the bin content.

I fitted both histograms with Pearson chi square method by the option “P” in TH1::Fit().

As described in the manual 7.1.1,Pearson chi-square method is using expected errors instead of the observed one.

I would expect the two histograms give the same fitted result since the bins contents are the same for the two histograms. However, the fitted results are different as shown. This means the assigned errors do affect the fitting. It looks to me that the Pearson chi square method is using observed error instead of the expected one. How exactly does Pearson chi square fit work with the errors?

Thank you all in advance!

linear_testfit_norm_unc_P.pdf (15.0 KB)

linear_testfit_large_unc_P.pdf (15.0 KB)