Consider histogram bin error in extended binned likelihood fit

Dear experts,

I am trying to fit on a histogram sample (TH1 → RooDataHist) with extended likelihood fit (Extended() and Minos() options are on). The fitter simply has signal and background PDF components.
In this histogram sample, the bin error is manually set, and is much larger than poisson error.
However, extended likelihood fit doesn’t care about the error of the histogram bins, so the fitted error is smaller than expected.

I also tried with extended chi^2 fit, and the fitted error is much larger than the one from the extended likelihood fit. The bin error of histogram is reflected in case of the chi^2 fit.

I am wondering that is it possible for the likelihood fit to correctly consider the bin error of the fitted histogram? By default it doesn’t case about the bin error. I tried with the SumW2Error() option but it doesn’t change the result.

Thank you in advance.

Hi,
If the bin error is different than the Poisson error, sqrt(bin_content), then you should use the SumW2Error() or Asymptotic() option when fitting. The resulting error should be similar to the chi^2 fit case. If not I will need to have a look, , in this case please post your code and data to run it

Best

Lorenzo

Yes, I tried with the SumW2Error() or Asymptotic() option in fitTo(), but the returned error is almost the same (still much smaller then the one from chi2FitTo() by a factor or 2 ~ 3).
Here let me attach my code and data. It is a simplified case with two PDFs to fit on a histogram sample. The difference of error can be seen by switching between fitTo() and chi2FitTo().
Thank you for taking your time.
ex.tar.gz (5.7 KB)

1 Like

Hi,
Thanks for the core, I can reproduce your problem. First of all, you cannot use Minos and SumW2Error. Then I see there is a problem in computing the corrected Hessian matrix used by SumW2Error. Asymptotic will not work well in this case because it is an extended fit (see https://sft.its.cern.ch/jira/browse/ROOT-10827 ).
Your example is interesting and I will use to investigate why Sum2Error does not work correctly.

Best regards

Lorenzo

Thank you very much. I finally succeeded with the SumW2Error flag, and it can give the result as I expect (weighted likelihood fit). I just need to disable the Minos flag and it will be working.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.