# Systematic error bar per bin

**URL:** <https://root-forum.cern.ch/t/systematic-error-bar-per-bin/49739>\
**Category:** Newbie\
**Created:** [April 25, 2022, 1:52pm UTC](https://root-forum.cern.ch/t/systematic-error-bar-per-bin/49739 "2022-04-25T13:52:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dil](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dil/32/26887_2.png) [@Dil](https://root-forum.cern.ch/u/Dil)\
**Post date:** [April 25, 2022, 1:52pm UTC](https://root-forum.cern.ch/t/systematic-error-bar-per-bin/49739/1 "2022-04-25T13:52:40Z")

</div>

Hello Rooters,

I need your help to figure out this. I have two histograms as follows.

h1-\>Fill(variable, weight);  
h1-\>sumW2();  
h2-\>Fill(variable, weight\_uncertainty);

What could be the total statistics + systematics error bar per bin?

= sqrt{err\_weight(bin i)^2 + err\_syst(bin i)^2}  
or just  
= err\_syst(bin i)

err\_weight(bin i) = error value of bin i of variable\_weight  
and  
err\_syst(bin i) = error value of bin i of variable\_weight\_uncertainty

thnaks  
Dil

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [April 25, 2022, 2:54pm UTC](https://root-forum.cern.ch/t/systematic-error-bar-per-bin/49739/2 "2022-04-25T14:54:04Z")

</div>

Hi @Dil ,  
if I understand correctly, this is less a question about ROOT and more a question about statistics. Let’s see if @moneta has some suggestions, otherwise you should ask your research group’s statistics expert.

Cheers,  
Enrico

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [April 26, 2022, 7:39am UTC](https://root-forum.cern.ch/t/systematic-error-bar-per-bin/49739/3 "2022-04-26T07:39:12Z")

</div>

Hi,  
The total error (statistical one and the one given by the weights uncertainties) can be approximated with  
`sqrt{err_weight(bin i)^2 + err_syst(bin i)^2}` using your definitions or err\_weight and err\_syst.

Lorenzo

---

<div class="post-metadata">

**Author:** ![Dil](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dil/32/26887_2.png) [@Dil](https://root-forum.cern.ch/u/Dil)\
**Post date:** [April 26, 2022, 2:09pm UTC](https://root-forum.cern.ch/t/systematic-error-bar-per-bin/49739/4 "2022-04-26T14:09:36Z")

</div>

Thank you Lorenzo.
