# Error Propagation when dividing histogram (by a constant, by bin width and by another histogram)

**URL:** <https://root-forum.cern.ch/t/error-propagation-when-dividing-histogram-by-a-constant-by-bin-width-and-by-another-histogram/46277>\
**Category:** Newbie\
**Created:** [August 11, 2021, 8:22pm UTC](https://root-forum.cern.ch/t/error-propagation-when-dividing-histogram-by-a-constant-by-bin-width-and-by-another-histogram/46277 "2021-08-11T20:22:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![oskiiiii](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/o/85f322/32.png) [@oskiiiii](https://root-forum.cern.ch/u/oskiiiii)\
**Post date:** [August 11, 2021, 8:22pm UTC](https://root-forum.cern.ch/t/error-propagation-when-dividing-histogram-by-a-constant-by-bin-width-and-by-another-histogram/46277/1 "2021-08-11T20:22:28Z")

</div>

Hello everyone,  
I’m quite new to root, I hope my question is not really obvious. Let’s say I have two histograms, h1 and h2. I get their error using Sumw2().  
But how should I handle error propagation and how should I do the following operations?:

1. Dividing them by a constant N, h1/N and h2/N.
2. Dividing each entry by its bin width, because I have variable bin width.
3. Doing the ratio h1/h2 (this one is the one I know how to do, I have seen that I should do h1-\>Divide(h2).  
Thank you very much for your help.  
Oscar

---

<div class="post-metadata">

**Author:** ![yus](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/y/9fc348/32.png) [@yus](https://root-forum.cern.ch/u/yus)\
**Post date:** [August 11, 2021, 8:58pm UTC](https://root-forum.cern.ch/t/error-propagation-when-dividing-histogram-by-a-constant-by-bin-width-and-by-another-histogram/46277/2 "2021-08-11T20:58:55Z")

</div>

Hi Òscar,

when

> [@oskiiiii](#):
>
> Dividing them by a constant N, h1/N and h2/N.

the relative bin errors should remain unchanged. The absolute errors should scale down by `N`.

When

> [@oskiiiii](#):
>
> Doing the ratio h1/h2

the relative bin errors in the resulting histogram should equal the square root of the sum of squares of errors in bins in `h1` and `h2`.
