Please read tips for efficient and successful posting and posting code
ROOT Version: 6.3
Platform: mac
Compiler:
dear rooters,
I am trying to fit simple data points using linear fit
TF1* fitFunction = new TF1(“fitFunction”, “pol1”, TMath::MinElement(xValues.size(), xValues.data()), TMath::MaxElement(xValues.size(), xValues.data()));
graph->Fit(fitFunction);
in general the fit is working well, and I can see the line is fully agree with the points and the parameters are perfectly working with the results.
however, the chi2 and ndf values are not good according to statistical.
I have 8 points and the fitting results are
Minimizer is Linear / Migrad
Chi2 = 0.0556064
NDf = 6
p0 = 0.0458751 +/- 0.0573359
p1 = 0.192528 +/- 1.28146e-05
how come that the chi square < ndf and accordingly chi2/ndf is less than 1??