Re: histogram subtraction and mean

From: Margar Simonyan <margar.simonyan_at_gmail.com>
Date: Tue, 1 Mar 2011 15:54:46 +0100


Dear Rene

thanks, now I understand the observed differences. In a real example I have another issue, signal+background distribution has empty bins, but background distribution can have non-zero content for the same bins, then the difference has bins with negative content. I tried to re-bin, but the results were depend significantly on grouping. Is there a better way of solving this issue?

Can background subtraction from signal+background done with TProfile (Add)? I attach updated version of my script. Certainly TProfile:Add does something different.

Best regards,

        Margar

On Tue, Mar 1, 2011 at 12:56 PM, Rene Brun <Rene.Brun_at_cern.ch> 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
>>  -------------------------------------------------------------------------
>
>

Received on Tue Mar 01 2011 - 15:54:53 CET

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