# TH1 and RooDataHist asymmetric uncertainties differ

**URL:** <https://root-forum.cern.ch/t/th1-and-roodatahist-asymmetric-uncertainties-differ/63936>\
**Category:** ROOT\
**Tags:** roofit, hist, root\
**Created:** [July 28, 2025, 6:53am UTC](https://root-forum.cern.ch/t/th1-and-roodatahist-asymmetric-uncertainties-differ/63936 "2025-07-28T06:53:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iaosiiuv](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/i/82dd89/32.png) [@iaosiiuv](https://root-forum.cern.ch/u/iaosiiuv)\
**Post date:** [July 28, 2025, 6:53am UTC](https://root-forum.cern.ch/t/th1-and-roodatahist-asymmetric-uncertainties-differ/63936/1 "2025-07-28T06:53:30Z")

</div>

Hello everyone,

When asking to display asymmetric error bars, `TH1` and `RooDataHist` give the same intervals except for a bin with 0 event.

The frequentist approach states that there is 68% coverage and 32% in the upper and lower tails (16% each). For the case `n=0` there is no lower bound, so the upper bound could correspond to 32%. `RooDataHist` makes this distinction, while TH1 does not.

For `RooDataHist`, it returns the [one-sided upper limit](https://root.cern.ch/doc/master/RooHistError_8cxx_source.html#l00251) `[0, 1.35]`.

For `TH1`, it returns the [double-sided upper limit](https://root.cern.ch/doc/master/TH1_8cxx_source.html#l09158) `[0, 1.84]`. As you can see in the link, the one-sided upper limit is also present [`l.9160`](https://root.cern.ch/doc/master/TH1_8cxx_source.html#l09160) , but it is commented out without any explanations.

I wanted to know the reason behind this decision for `TH1`, why the `RooDataHist` uses another definition, and which one we should choose when using asymmetric uncertainties for empty bins?

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [July 28, 2025, 6:57am UTC](https://root-forum.cern.ch/t/th1-and-roodatahist-asymmetric-uncertainties-differ/63936/2 "2025-07-28T06:57:42Z")

</div>

I’m sure @jonas can give an explanation

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [August 11, 2025, 6:57am UTC](https://root-forum.cern.ch/t/th1-and-roodatahist-asymmetric-uncertainties-differ/63936/3 "2025-08-11T06:57:45Z")

</div>

Closed on August 11, 2025, 6:57am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
