Fitting TGraphAsymErrors, difference between "W" and "EX0"

Hey, I am fitting a TGraphAsymErrors graph, and I was wondering what the difference was between adding “EX0” or adding “W” to the Fit function. If I understood it correctly, “W” means that the error bars are being ignored. For “EX0” I found ’ When fitting or TGraphAsymErrors do not consider errors in the coordinate’, which also means that the errors are ignored? However, I get different results when fitting depending on which one I use. So what is the difference?

@couet This is a bug in the “EX0” description. It should be:
When fitting a TGraphErrors or TGraphAsymErrors do not consider errors in the X coordinate

BTW. “W” ignores all errors in X and Y and sets all “weights” to 1.

1 Like

EX0 is a TGraph::Fit option . I let @moneta give his point of view on the doc change.


The option EX0 is an option that applies for the fitting of TGraphErrors , TGraphAsymmErrors and TGraph2Derrors.
It means that the errors are set to zero for all the coordinates. Coordinate error does not mean point error. Coordinates are considered the independent variables (the features of the regression problem), which are X in the 1-dim case (TGraphErrors) and X and Y in the 2D case (TGraph2DErrors) and they are not to be confused with the dependent variables (Y in 1D case and Z in the 2d case).

Now option W instead set all errors to 1 and basically ignore all point errors. It is like fitting a TGraph instead of a TGraphErrors


1 Like

@moneta : @Wile_E_Coyote suggested some change in the help of EX0. Should we do it ?

Yes, I will clarify this is the documentation

Well, in my “improvement proposal”, I’ve forgotten about the TGraph2DErrors as it was not explicitly mentioned in the “EX0” description.

@moneta Maybe also adding relevant infos to the “W” description would be nice (basically the same clarifications as in your previous post).

Thank you for the suggestion. I agree the current explanations:
" Set all weights to 1; ignore error bars" is not very clear.

I think something like this would be better:

“Set all errors to 1; this is equivalent to ignoring error bars”