Re: definition of binomial error in histogram division?

From: Lorenzo Moneta <Lorenzo.Moneta_at_cern.ch>
Date: Thu, 19 Jul 2007 14:47:34 +0200


Hi Gero,

> Hi Lorenzo,
> OK, I understand. So in case of deviding ha by hb with histograms
> ha and
> hb having weights, you assume that all entries in ha got the same
> weight
> also in hb. Thanks for clarification.

yes, this is the case.
> But still, I do not like the silent overwriting of the constants c1
> and
> c2, perhaps one should give a warning if the are not 1.?

You are right, probably a warning message should be printed in that case. I will add it,

Cheers,

  Lorenzo

>
> Cheers
>
> Gero
>
>> On Jul 4, 2007, at 7:52 AM, Gero Flucke wrote:
>>
>>> On Tue, 3 Jul 2007, Rene Brun wrote:
>>>
>>>> Please read comments in the doc of TH1::Divide at
>>>> http://root.cern.ch/root/htmldoc/src/TH1.cxx.html#hh46dE
>>>>
>>>> When using the pro release 5.16 the error in bin1 is null.
>>>
>>> Hi Rene,
>>> while this makes sense (and simplifies the code) I wonder whether
>>> it was
>>> really intended to ignore the factors c1 and c2 in case of dividing
>>> histograms with binomial errors, which 'slipped in' now (not being
>>> mentioned in the commit log of TH1.cxx rev. 1.347!). I think that
>>> factors
>>> should be treated as if all histogram entries would have been
>>> weighted
>>> with this factor. A useful error for dividing weighted histograms
>>> with
>>> binomial errors has been introduced by Lorenzo in rev. 1.303.
>>>
>>> I did not check whether the old code after 1.303 and before 1.347
>>> treated
>>> the factors c1/2 correctly as weights, though.
>>>
>>> Cheers
>>>
>>> Gero
>>>
>>>>> Hi,
>>>>>
>>>>> In ROOT 5, the binomial error I expect to get with the "B"
>>>>> option in
>>>>> histogram
>>>>> division isn't the "standard" binomial error.
>>>>> What is its precise definition? If it's a bug it should be fixed,
>>>>> if it's not, the documentation should be updated.
>>>>>
>>>>> I attach an example where I expect to see an error of 0, but
>>>>> it's 0.0496 instead.
>>>>>
>>>>> Regards,
>>>>> Suyong
>>>>>
>>>>> ------------------------------------------------------------------
>>>>> ------
>>>>>
>>>>> {
>>>>> TH1F *h1 = new TH1F("h1", "Demonimator", 1, 0.0, 1.0);
>>>>> TH1F *h2 = new TH1F("h2", "Numerator", 1, 0.0, 1.0);
>>>>>
>>>>> h1->Sumw2();
>>>>> h2->Sumw2();
>>>>>
>>>>> h1->Fill(0.5,10.0);
>>>>> h2->Fill(0.5,10.0);
>>>>>
>>>>> h1->Divide(h1, h2, 1.0, 1.0, "B");
>>>>> }
>>>
>>> --
>>> --------------------------------------------------------------------
>>> ---
>>> Gero Flucke office: DESY, Bldg. 67b, room 24
>>> Inst. f. Experimentalphysik fon: +49 (0)40 8998 4743
>>> Universitaet Hamburg fax: +49 (0)40 8998 2959
>>> Luruper Chaussee 149 at CERN: Bldg. 32 office 3-B20
>>> 22761 Hamburg fon: +41 (0)22 76-77557
>>> Germany
>>>
>>> --
>>> A: Because it messes up the order in which people normally read
>>> text.
>>> Q: Why is it such a bad thing?
>>> A: Top-posting.
>>> Q: What is the most annoying thing on usenet and in e-mail?
>>>
>>
>>
>
> --
> ----------------------------------------------------------------------
> -
> Gero Flucke office: DESY, Bldg. 67b, room 24
> Inst. f. Experimentalphysik fon: +49 (0)40 8998 4743
> Universitaet Hamburg fax: +49 (0)40 8998 2959
> Luruper Chaussee 149 at CERN: Bldg. 32 office 3-B20
> 22761 Hamburg fon: +41 (0)22 76-77557
> Germany
>
> --
> A: Because it messes up the order in which people normally read text.
> Q: Why is it such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing on usenet and in e-mail?
>
Received on Thu Jul 19 2007 - 14:48:33 CEST

This archive was generated by hypermail 2.2.0 : Thu Jul 19 2007 - 17:50:02 CEST