# Histogram error bar for relative counts

**URL:** <https://root-forum.cern.ch/t/histogram-error-bar-for-relative-counts/35847>\
**Category:** Newbie\
**Created:** [September 2, 2019, 12:10pm UTC](https://root-forum.cern.ch/t/histogram-error-bar-for-relative-counts/35847 "2019-09-02T12:10:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![froztiz](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/f/59ef9b/32.png) [@froztiz](https://root-forum.cern.ch/u/froztiz)\
**Post date:** [September 2, 2019, 12:10pm UTC](https://root-forum.cern.ch/t/histogram-error-bar-for-relative-counts/35847/1 "2019-09-02T12:10:58Z")

</div>

Dear expert,

I have a question that is probably very simple.  
I am wondering how the error bar on histogram is calculated in a case of normalized count.  
I am explaining:  
For an histogram of counts, we assume a Poisson distribution and consider that the error on the count ( **Ni** ) in a bin i is the square root of the count **sqrt(Ni)** at 1 sigma.  
However, in the case of a normalized count histogram (% of the total count), we plot **Ni/Nt** in % in the bin **i** where **Nt** is the total count. In such a case, how is calculated the relative error on the relative count?

Many thanks in advance for your answer.  
Yours,  
Thomas

---

<div class="post-metadata">

**Author:** ![pamputt](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pamputt/32/12526_2.png) [@pamputt](https://root-forum.cern.ch/u/pamputt)\
**Post date:** [September 2, 2019, 12:30pm UTC](https://root-forum.cern.ch/t/histogram-error-bar-for-relative-counts/35847/2 "2019-09-02T12:30:24Z")

</div>

Probably @moneta can answer better but AFAIK, it depends how you fill your histogram.  
If you fill it directly with the normalized count, then the error will be sqrt(N) where N is your noramlized count. However, if you fill the histogram with the non-normalized count and you then call the [Scale method](https://root.cern.ch/doc/master/classTH1.html#add929909dcb3745f6a52e9ae0860bfbd) to normalize it, the error will be updated as described in [this piece of code](https://root.cern.ch/doc/master/TH1_8cxx_source.html#l06218).
