Re: fitting unsorted data

Rene Brun (Rene.Brun@cern.ch)
Fri, 29 Aug 1997 12:56:51 +0200


Voropaev S.G. wrote:
>
> Hello,
> I have new problem with fitting unsorted data. I am trying to fit unsorted
> array X,Y to line. I use object TGraph. Parameters of line is well, but error
> is very strange.
> Test macro with only 5 data point. (In real life number of data point is
> larger, but problem still exist):
>
> Result of fitting: p0 = 0.64 +- 0.85 !, p1 = -1.04 +- 9.5 !!!
>
> Where is error? It is my error or not?
>
> I use ROOT 1.02/00 1 august 1997 ( Valery Fine version) on Windows NT
>
> With best regards Voropaev S.G.

This problem is now fixed in the development version 1.03/02.
Result of fitting: p0 = 0.644 +- 0.023, p1 = -1.036 +- 0.256

The fitting algorithm in version 1.02 from TGraph and TGraphErrors objects
assumed errors = 1 !
I have now implemented an algorithm that really uses the error specified
in TGraphErrors and compute an approximation of the errors for TGraph
objects.
Thanks for reporting

Rene Brun