# Error by bin

Hello everybody,

I would like to ask a newbee question about the sense of computing the error of each bin of a given histogram with the TH1::Sumw2() method.
Why do we calculate the uncertainty on the value of each bin using the sum of squares of weights, is it because we consider that the error follow a gaussian law ?
Sorry for this naive question but I haven’t found any answer on that point yet and I would like to understand what I am doing with the errors associated to an histogram.
To precise my question, I would like to calculate the statistical uncertainty associated to a MC sample in my analysis.

Cheers,

Jerome

Hi,

The uncertainty in each bins (i.e. sum of the square of the weights) can be derived by considering n counts for each bin with a weight w(i) (i=1,…n) with Poisson statistics for the number n.

The weigh can be for example related to an efficiency (w = 1/e) or to a rescaling factor of your MC.
If you call TH1::Sumw2(), your bin errors will be correctly calculated taking into account of the weights and your re-scaled MC histogram will have the correct statistical error.

Best Regards

Lorenzo