Fit Results

Hi,

I have a basic question. I am fitting the results of my data, they are contained in a simple TGraphErrors, with 7 data points, errors on y and no error on x.
When I try to fit them with pol1 or pol2 (the command I use is simply gr->Fit(“pol2”);). The point is that I have two graphs, with exaclty same numbers of data points, but when I perform the fit, I get two different Ndf (Ndf=3 and Ndf=4).

Could you please explain me how to solve this issue?

Thanks a lot

Best regards

Ndf = “number of points used in the fit” - "number of free parameters"
For “pol1”, the “number of free parameters” = 2
For “pol2”, the “number of free parameters” = 3

Hi,

thanks for your answer, I know what you mean, but my problem is different. When I fit two different Graphs with the same number of data points, and with the same polN, I get different Ndf.
For example I fit both with pol2, having both 7 data points, but I get from one Ndf=3, from the other one Ndf=4. It seems to me that in the first case one data point is not included in the fit, but I don’t understand why!

Check the “Y errors” (i.e. “EY”) … “data points” which have it 0 will be removed from the fit (i.e. the “number of points used in the fit” will be decreased).

Ok, this seems to be the case.
Thank you for the support!