# What is the significance of the 'Empty bins, weights = 1' and should I use it?

**URL:** <https://root-forum.cern.ch/t/what-is-the-significance-of-the-empty-bins-weights-1-and-should-i-use-it/31701>\
**Category:** Newbie\
**Created:** [November 21, 2018, 8:07am UTC](https://root-forum.cern.ch/t/what-is-the-significance-of-the-empty-bins-weights-1-and-should-i-use-it/31701 "2018-11-21T08:07:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rNov77](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/r/73ab20/32.png) [@rNov77](https://root-forum.cern.ch/u/rNov77)\
**Post date:** [November 21, 2018, 8:07am UTC](https://root-forum.cern.ch/t/what-is-the-significance-of-the-empty-bins-weights-1-and-should-i-use-it/31701/1 "2018-11-21T08:07:02Z")

</div>

I have around 20 data points in a range that I plot as a Histogram. The plot follows a Gaussian pattern, so I used the ‘gaus’ fit from the ‘FitPanel’.

Now when I use without any of the check boxes ticked, the mean and sigma varies from when the ‘Empty bins, weights=1’ option is ticked. The sigma improves from 1.8 to 1.5, I just wanted to know:

- the significance of this option in the statistics

- is the correct approach and when should I use or avoid it?

 ![1](https://root-forum.cern.ch/uploads/default/original/3X/1/1/11ca0aa6625dd1aaa23cbf17742d9d719e9c3bbc.png)

I can only post one image, but you probably get the idea.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [November 21, 2018, 9:10am UTC](https://root-forum.cern.ch/t/what-is-the-significance-of-the-empty-bins-weights-1-and-should-i-use-it/31701/2 "2018-11-21T09:10:57Z")

</div>

I guess @moneta can help you.

---

<div class="post-metadata">

**Author:** ![Dilicus](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dilicus/32/14338_2.png) [@Dilicus](https://root-forum.cern.ch/u/Dilicus)\
**Post date:** [November 22, 2018, 9:01am UTC](https://root-forum.cern.ch/t/what-is-the-significance-of-the-empty-bins-weights-1-and-should-i-use-it/31701/3 "2018-11-22T09:01:47Z")

</div>

Hi,  
this is related to the error given to the empty bins in your histogram. Usually to each bin is associated a poissonian error, so for bin with no entries the error is 0 and they are not considered in the chi square fit.  
Set ‘Empty bins, weights=1’ you are forcing the error to this bin to be equal 1 and the chi2 fit consider also this bins for the fit. Look here [TH1::Fit](https://root.cern.ch/doc/master/classTH1.html#a7e7d34c91d5ebab4fc9bba3ca47dabdd) and read **Treatment of Empty Bins**.

Moreover in this case with a very low statistic is better to use a Likelihood fit with the empty bin weight equal to 1 unchecked. This because the Likelihood treats the empty bins already in the right way .

In any case I think moneta answer will be more detailed and specific than mine.

Cheers,  
Stefano

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [November 22, 2018, 9:29am UTC](https://root-forum.cern.ch/t/what-is-the-significance-of-the-empty-bins-weights-1-and-should-i-use-it/31701/4 "2018-11-22T09:29:07Z")

</div>

As the histogram bin width is quite big (and the fit function changes a lot inside of a bin), I would also set [the “Integral” fit option](https://root.cern.ch/doc/master/classTH1.html#a7e7d34c91d5ebab4fc9bba3ca47dabdd).
