Mean of histogram

Hi,

I have a quick question. Would the mean of a histogram depend on the binning? I am assuming that all points that needs to be filled are filled on the histogram.

Thanks,
Indigo

[quote=“indigo”]Hi,

I have a quick question. Would the mean of a histogram depend on the binning? I am assuming that all points that needs to be filled are filled within the histogram’s range.

Thanks,
Indigo[/quote]

The information necessary to compute the mean value and RMS is accumulated when calling the histo Fill functions. The mean/rms reported on the full histogram does not depend on the binning.
However, when zooming a histogram between binmin,binmax, we recompute the mean,rms based on the center of the bin. This recomputed value on a histogram subset depends on the binning.

Rene

thank you!

Say we had 2 histograms with the same range. The ranges have not been changed so the histogram records the mean independent of the binning. If the two histograms were added together (assume both histograms have same binning), would the proper mean be recorded?

As in, would this new mean of histo1+histo2 be the same as if a single histogram were made using the same binning but filled using the values use to fill both histo1 and histo2.

[quote]Say we had 2 histograms with the same range. The ranges have not been changed so the histogram records the mean independent of the binning. If the two histograms were added together (assume both histograms have same binning), would the proper mean be recorded?
[/quote]
yes

Yes

Rene