I am wondering how does minuit treat data point with zero error.
The chi-2 should diverge unless minuit is programed to ignore
this data point automaticly.
However, the following sample macro demonstraits the zero error
data point leaves finite impact on the fitting result as if it is assigned
some large error instead of zero inside the minuit. Is my guess true?
I tried with your version 5.17/02 and it’s the same problem. Let me re-state the problem. When there is a point with zero error, it is somehow ignored in the fit: otherwise it should drive the fit completely as its weight is infinite. However, it is not ignored completely as the results changes from p0=1 for g1 and p0=0.99972 for g2 (in the example). We would like to know (if possible) how this point is treated exactly in the fit, i.e. which weight is associated with it, when the error bar is zero.
If the user is careless and tries to feed a chisq fit a data point with
zero error, the designer of the code has to make a choice :
kick out the data point
use the data point with a best guess for the weight
give an error message and do one of the two above
kick the user
I would do number 4 but the author choose to …
Dig in the TGraph::Fit code and notice that the objective function chosen is
TFitter::GraphFitChisquare .
I see the following code :
958 eu = ey*ey+eux*eux;
959 if (eu <= 0) eu = 1;
960 f += fsum*fsum/eu;
To me this seems to amount to setting the total error to 1 if it is
<= 0 .
This would explain the fact that adding this point influences the
fit result .