Re: statistics information from 2-D (and 3-D) histos

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Jul 28 1998 - 19:10:15 MEST


stefan kluth wrote:
> 
> Hello,
> 
> I have an application in which I need to get statistics information like
> mean and rms from the individual dimensions of a 2-D histogram. The
> accessors GetMean() and GetRMS() give me these numbers for the
> x-dimension, but for y (or z) I couldn't find a way on how to do this.
> 
> For the moment I compute mean and rms from the bin-contents, but I would
> prefer to have these computed at filling time, because computing from
> bin-contents is only an approximation.
> 
> So, I would like to propose that the functions GetMean() and GetRMS() are
> extended to take an argument to specify the dimension for which the
> quantities should be computed:
> 
> stat_t GetMean( dim= 1 )
> stat_t GetRMS( dim= 1 )
> 
> In addition, a new accessor function which returns the covariance between
> two dimensions would be very useful:
> 
> stat_t GetCov( dim1= 1, dim2= 2 )
> 
> Their implementation should be trivial, fully backwards compatible and
> very efficient, since we already have the weighted sums fTsumwx, fTsumwy,
> fTsumwx2, fTsumwy2 and fTsumwxy as data members of TH1 and TH2.
> 
> How about it?
> 

Hi Stefan,
I agree with your proposal and will try to implement the changes
for the coming release.

Rene Brun



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:35 MET