Likelihood fit in root and roofit


Just curious, why the binned-likelihood fit gives gives different results using ROOT and ROOFIT

For ROOT i just fit the histogram as
h->Fit(“pdf”,“L”); // likelihood fit to 1D histogram"h" (1)

With roofit i use:
RooFitResult* fitr=pdf.fitTo(mc); //MC is roodatahist (2)

(1) and (2) should be exactly same, isn’t this true ?



There are some small differences between the binned likelihood fit in ROOT and RooFit, in particular for what concerns the normalisation of the function and its evaluation in the bin.
Both methods are approximated because the compute the function at the center of the bin, however the RooFIt approximation is less precise and in some case can produce a bias larger than the ROOT one.
This is discussed also here


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