Re: histogram subtraction and mean

From: Stefan Piperov <piperov_at_fnal.gov>
Date: Tue, 1 Mar 2011 16:59:46 +0200

I understand that mechanism, and the fact that computing moments from un-binned data is more precise, but it's also misleading. If I'm filling a histogram, then I want to know the charachteristics (e.g. moments) of the binned data, not the originals. I can always calculate the moments of the unbinned data if I wished.

To me, at least, the default should be moments to be calculated from binned data. The other behaviour should be optional. But that might be quite a change on ROOT...

Stefan.

On Tue, 1 Mar 2011, Rene Brun wrote:

> When you use TH1::Fill, ROOT can compute the moments precisely because it has
> the original input values.
> As soon as you make an operation (add, ssubtract, zoom, etc), the only thing
> that we can do is to start from
> the bin contents only with the approximation that all values in the bin are
> at the center of the bin.
>
> Rene
>
>
> On 01/03/2011 15:50, Stefan Piperov wrote:
>>
>> Well, probably the more interesting question is why before operations the
>> moments are not calculated using the bin contents?
>> That's a default which has always puzlled me.
>> Stefan.
>>
>> On Tue, 1 Mar 2011, Rene Brun wrote:
>>
>> > What you get is perfectly normal.
>> > Following an operation on your histogram (Add, Substract, Rebin, etc)
>> > the statitics for moments (mean, sigma, etc)
>> > are recomputed from the bin contents, assuming the center of the bin.
>> >
>> > Rene Brun
>> >
>> >
>> > On 01/03/2011 12:37, Margar Simonyan wrote:
>> > > Hello ROOTTalk
>> > >
>> > > I get strange results after histogram subtraction, the attached
>> > > script
>> > > written in Python demonstrates the issue. My goal is to subtract
>> > > background from signal+background distribution and get meaningful
>> > > results for mean.
>> > > There are several unexpected (for me) results:
>> > > First, the mean changes after subtracting empty histogram, this is
>> > > not
>> > > a big issue. Second, after subtracting background I don't get exactly
>> > > the signal value. Third, rebinning before subtracting changes the
>> > > results once more.
>> > > Can somebody explain this? I am using ROOT 5.26/00e complied on SLC5
>> > > with gcc43.
>> > >
>> > > Thanks,
>> > > Margar
>> > > -------------------------------------------------------------------------
>> > > Dr Margar Simonyan, post-doctoral researcher
>> > > Niels Bohr Institute, Copenhagen University
>> > > -------------------------------------------------------------------------
>> >
>> >
>> >
>>
>> *---------------------------------------------------------------------*
>> Stefan Piperov Mail: FNAL P.O.Box 500, MS 205, Batavia, IL-60510
>> Phone: (630) 840-5176 E-Mail: piperov_at_fnal.gov
>> *---------------------------------------------------------------------*
>> "Give a skeptic an inch... and he'll measure it."
>>
>
>

*---------------------------------------------------------------------*
  Stefan Piperov      Mail: FNAL P.O.Box 500, MS 205, Batavia, IL-60510
  Phone: (630) 840-5176                        E-Mail: piperov_at_fnal.gov
*---------------------------------------------------------------------*
"Give a skeptic an inch... and he'll measure it." Received on Tue Mar 01 2011 - 15:59:54 CET

This archive was generated by hypermail 2.2.0 : Tue Mar 01 2011 - 17:50:01 CET