Re: [ROOT] Bug in likelihood fitting?

From: Dave Morrison (dave@bnl.gov)
Date: Fri Apr 28 2000 - 20:55:41 MEST


Hi Burt,

Yep.  This has been a topic of discussion in PHENIX computing recently. 
Here are the lines that do the deed (H_H1.cxx:1546-1550):

         if (fu < 1.e-9) fu = 1.e-9;
         icu  = Int_t(cu);
         fsub = -fu + cu * TMath::Log(fu);
         fobs = hFitter->GetSumLog(icu);

The bin contents are floor()'ed.  I suppose one could argue that since
the log likelihood procedure in TH1::Fit happens to assume a poisson
probability for sampling the observed bin contents from the model you're
on somewhat sketchy ground if the bins don't contain integer values, but
I think the last line above should be changed to 

         fobs = hFitter->GetSumLog(cu);

if only to avoid needless surprises.

Cheers,
Dave

Burt Holzman wrote:

> It seems that log-likelihood fitting is integerizing bin
> contents before fitting.  Is this intended behavior?

-- 
David Morrison  Brookhaven National Laboratory  phone: 631-344-5840
                Physics Department, Bldg 510 C    fax: 631-344-3253
		          Upton, NY 11973-5000  email: dave@bnl.gov



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:24 MET