Information about error calculation in TH1::Divide()


I’m using

TH1::Divide(const TH1* h1, const TH1* h2, Double_t c1 = 1, Double_t c2 = 1, Option_t* option = “”).

and I’d like to understand how errors are calculated for the resulting histogram. It’s said to be “The resulting errors are calculated assuming uncorrelated histograms” but I don’t understand what does it mean.
I’m not using the “B” option for binomial errors, c1 and c2 are set to 1 and TH1::Sumw2() is previously called for the two input histograms h1 and h2.

Thanks in advance,


1 Like


In that case the errors are calculated in the following way:
If for bin i, the bin content of the first histogram is c0 and of the second - c1, the bin errors are e0 and e1 respectively, then the square of error, assigned to this bin i, is equal to
(e0e0c1c1 + e1e1c0c0)/(c1c1c1*c1)
Is that what you wanted to know or I misunderstood your question?

1 Like

Hi Anna,

thanks for your reply.
Yes it was what I was looking for to check if error for h3=h1/h2 was defined following :

(e3/c3)^2 = (e1/c1)^2 +(e2/c2)^2

ei = error of a bin for histo hi
ci = content of a bin for histo hi

It seems to be what I was waiting for.

again thanks


1 Like