How to check that a fit succedeed

Dear experts,

  • I wonder how I can be sure that my fit worked, actually so far I set cut on KS<0.5 or Chi2>2 to determine if the fit worked, but by doing that I have cases where even if the KS or Chi2 pass the cut, the fit failed like in the plot.png I posted.
  • The fit results is in log.txt that I posted. There we can see that “STATUS=FAILED” but in some cases I have “STATUS=CONVERGED” but the fit is still bad.
  • So do you know a method that indicate if the fit really succeeded (if the fit match properly the histogram)?

PS: I saw the TVirtualFitter class, but I really need a method that tells me if the fit match properly the histogram.

Regards
log.txt (2.37 KB)


Dear experts,

any idea?

Regards

Hi,

Unfortunately there is no way to distinguish that a converged fit is not good, when the fit converged to a local minimum different than the global one.
You can also try in some case to re-fitting the functions using different initial parameters. Do a scan of the initial parameter values and fit every time, it is often a useful thing to do.

I think the Chi2 cut is fine. But the Chi2 needs to be less than something (i.e. chi2/ndf < 2) in order to the fit to be good. You might want in some case to have a customised chi2 that remove some outliers.

Looking at your plot, I cannot believe the normalised Chi2 result is less than 2

Best regards

Lorenzo

Dear Moneta,

ok, thank you for your answer.

Regards