[Rivet] Weighted events [Re: Rivet "collaboration meeting"?]

Ben Waugh b.waugh at ucl.ac.uk
Wed May 22 12:01:00 BST 2013


Hi All,

In case it is of any interest, when I was on H1 I remember finding an 
internal note that I think was useful in dealing with errors in the case 
of weighted events. I'm pretty sure this is the one, although I have not 
checked the derivations:

http://www.desy.de/~blist/notes/effic.ps.gz

Cheers,
Ben

On 21/05/13 20:23, Andy Buckley wrote:
> On 21/05/13 21:01, Leif Lönnblad wrote:
>> On 2013-05-21 16:50, Frank Siegert wrote:
>>> Why is this not using the normal variance a la
>>> s^2 = 1/(n-1) <(w-<w>)^2>
>>>      = 1/(n-1) (<w^2> - <w>^2)
>>>      = 1/(n-1) (sum(w^2)/n - sum(w)^2/n^2)
>>
>> If we use this, the error will be zero for uniform weights...
>
> Yes, this would be a measure of the width of the distribution of weights.
>
>> For uniform weights, the number of entries in a bin is typically given
>> by a Poissonian distribution , which means that the variance is the same
>> as the mean, so the error on the number of entries is given by
>> sqrt(number of entries).
>>
>> For weighted events, one way of thinking is the following: Imagine there
>> is a discrete set of weights w_i. For each of these there are n_i
>> entries giving the error w_i*sqrt(n_i) for the sum of weight, n_i*w_i.
>> The total height of the histogram is sum_i(n_i*w_i), and the error in
>> that number is the square root of the sum of the squared errors for each
>> w_i: sqrt(sum_i(n_i*w_i^2)). This generalizes to the error
>> sqrt(sum(w^2)) for the bin height sum(w).
>
> Exactly. But with "height" replaced by "area" when the bin widths need
> to be accounted for to converge to the physical distribution.
>
>> Of course, this "derivation" only holds for a large number of entries in
>> a large number of bins, but it gives a reasonable error estimate also
>> for a few entries per bin. But maybe there is a better estimate out
>> there...
>
> If there is, I'd like to know. Hardly a proof of correctness, but ROOT
> uses sqrt(sum(w^2)) too... well, it does if you explicitly tell it to
> before starting to fill:
>
> "If Sumw2 has been called, the error per bin is computed as the sqrt(sum
> of squares of weights), otherwise the error is set equal to the sqrt(bin
> content)."
> from http://root.cern.ch/root/html/TH1.html
>
> Where was this causing a problem, Frank/David?
>
> Andy
>

-- 
Dr Ben Waugh                                   Tel. +44 (0)20 7679 7223
Dept of Physics and Astronomy                  Internal: 37223
University College London
London WC1E 6BT



More information about the Rivet mailing list