# Goodness of Fit using FitPanel?

Hi all,

I was using the the Fit Panel from ROOT TBrowser to do a polynomial fit to a histogram. I vary the order of the polynomial to see which one fits better.

I wonder what number tells me the goodness of the fit in the returned result? For example is poly-3 fit result in (1) better than poly-4 in (2) below?

Thanks,
Wei

(1)
TFitEditor::DoFit - using function PrevFitTMP 0x7fe2845e5a70
FCN=0.591975 FROM MIGRAD STATUS=CONVERGED 322 CALLS 323 TOTAL
EDM=4.32795e-07 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 -1.10954e+00 9.18266e-01 1.02775e-04 5.53132e-04
2 p1 1.06824e-01 1.07420e-01 4.85003e-06 4.96149e-02
3 p2 -1.54849e-03 3.74637e-03 1.27990e-07 2.99205e+00
4 p3 6.86471e-06 4.13870e-05 2.64028e-09 1.61884e+02
ERR DEF= 0.5

(2)
TFitEditor::DoFit - using function PrevFitTMP 0x7fe2846aaec0
FCN=0.306416 FROM MIGRAD STATUS=CONVERGED 490 CALLS 491 TOTAL
EDM=1.29955e-07 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 4.36662e+00 1.25175e+00 9.83371e-05 3.44223e-04
2 p1 -7.72224e-01 1.33680e-01 4.20468e-06 -7.61226e-03
3 p2 4.58093e-02 4.90177e-03 1.07723e-07 -4.66029e-01
4 p3 -1.01979e-03 1.14356e-04 2.23922e-09 -1.81536e+01
5 p4 7.69120e-06 1.20614e-06 4.38113e-11 -6.73846e+02
ERR DEF= 0.5

I assume the printed “FCN” is the best found value of the objective function (chi2 or likelihood) used in the fit, not corrected for the number of degrees of freedom (“NDF”).

I do understand that FCN above is the max likelihood returned, but taking into the NDF, how should I compare the two?

It’s up to you. You may compare “FCN” values or “chi^2 / NDF” values or use the “likelihood-ratio test”.

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