Re: [ROOT] TF1::RejectPoint and chi^2 in stats box

From: Gero Flucke (gero.flucke@desy.de)
Date: Mon Apr 19 2004 - 18:35:04 MEST


On Mon, 19 Apr 2004, Rene Brun wrote:

> Hi Gero,
>
> What you observe is not connected with the use of TF1::RejectPoint, but rather
> with the likelihood option. When the "l" option is specified,
> TF1::GetChisquare returns an equivalent chisquare value using the parameters
> computed from the likelihood fit. This value is different from the value
> of the objective function using the likelihood method.
>
Hi Rene,
I don't use the likelihood option 'l', but integral option 'I'.

If I reject a point, I always return 0 in the function, and the chi^2 I
get is too high by roughly the sum of the two bins that I exclude by
RejectPoint. Because it's a histogram without weights this makes me
quite sure that RecejtPoint is not taken into account in calculating
chi^2. Of course the fit result itself is not affected as it's a constant
offset of chi^2.

Do you need a small script to demonstrate the problem?

Thanks

	Gero

> Rene Brun
>
> Gero Flucke wrote:
> >
> > Hi,
> > fitting histograms with a non-contigous function via TF1::RejectPoint
> > works rather well, but for me it seems that the chi^2 that is shown in the
> > statistic box ignores the rejection. I tried to get the chi^2 directly
> > after the fit via
> >
> > TF1* fitFunc = ...   // my TF1 defining the function
> > TF1* histToFit = ... // the hist that I fit
> > histToFit->Fit(fitFunc, "EMBRI");
> > TVirtualFitter::Fitter(histToFit)
> >     ->Chisquare(fitFunc->GetNpar(), fitFunc->GetParameters())
> >
> > but that gives the same result which is also printed on screen as FCN
> > while fitting:
> >
> > FCN=761.11  FROM MINOS     STATUS=SUCCESSFUL    804 CALLS <snip>
> >
> > How can I get the 'real' chi^2?
> >
> > Cheers
> >
> >         Gero
> >
> > PS: 3.10_02 on linux
> >
> > -----------------------------------------------------------------------
> > Gero Flucke
> > 1a / 603
> > DESY
> > Notkestr. 85
> > 22607 Hamburg
> > +49-(0)40-8998-2454
> >
> > Privat / private:
> > -----------------
> > Von-Hutten-Str. 20
> > 22761 Hamburg
>

-----------------------------------------------------------------------
Gero Flucke
1a / 603
DESY
Notkestr. 85
22607 Hamburg
+49-(0)40-8998-2454


Privat / private:
-----------------
Von-Hutten-Str. 20
22761 Hamburg



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET