Pan: The Parity Analyzer -- Class Index

Pan classes only
All classes


+
class TaStatistics
-
#include "TaStatistics.hh"
Display options:
Show inherited
Show non-public

class TaStatistics


HALL A C++/ROOT Parity Analyzer  Pan

       TaStatistics.cc  (implementation)

 Author:  R. Holmes <http://mep1.phy.syr.edu/~rsholmes>, A. Vacheret <http://www.jlab.org/~vacheret>, R. Michaels <http://www.jlab.org/~rom>, K.Paschke
 @(#)pan/src:$Name:  $:$Id: TaStatistics.cc,v 1.9 2003/07/31 16:12:00 rsholmes Exp $



    A general purpose statistics class, allowing accumulation of
    sums for one value or a set of values, from which quantities
    such as means, widths, errors, etc. can be computed.

    Note that this class permits a single-pass analysis with *no*
    attempt to reduce errors on the computed quantities.  Such an
    analysis, using mathematically correct formulas, can still give
    badly erroneous results for RMS / variance / error due to
    roundoff problems.  In particular, when N is large and the
    variance is small, mean(x^2)-(mean(x))^2 is a difference of two
    large numbers and can have very poor precision.  Results can be
    improved by making an estimate of mean(x) and subtracting this
    from each x_i, but automating such an estimate is difficult.

    However, this class also allows 2-pass calculations to be made
    if desired, with greatly improved precision.  Note that in
    practice the aforementioned roundoff problems have not been
    shown to be significant for HAPPEX data.  For more on this
    subject see for example _The American Statistician_ V. 37 p. 242
    (1982).


Function Members (Methods)

public:
TaStatistics(const TaStatistics& s)
TaStatistics(const size_t nquant, const Bool_t goodErrors = true)
virtual~TaStatistics()
static TClass*Class()
vector<Double_t>DataRMS() const
Double_tDataRMS(const size_t i) const
voidDumpSums(const size_t i) const
virtual TClass*IsA() const
vector<Double_t>Mean() const
Double_tMean(const size_t i) const
vector<pair<Double_t,Double_t> >MeanAndErr() const
pair<Double_t,Double_t>MeanAndErr(const size_t i) const
vector<Double_t>MeanErr() const
Double_tMeanErr(const size_t i) const
vector<Double_t>MeanVar() const
Double_tMeanVar(const size_t i) const
Int_tN() const
vector<Double_t>Neff() const
Double_tNeff(const size_t i) const
TaStatistics&operator+=(const TaStatistics& s)
const TaStatistics&operator=(const TaStatistics& s)
voidSetFirstPass(Bool_t)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
size_tSize() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
voidUpdate(const vector<Double_t>& x, const vector<Double_t>& xerr = vector<Double_t>(0), const vector<Double_t>& w = vector<Double_t>(0))
voidUpdate(const Double_t x, const Double_t xerr = 0, const Double_t w = 0)
voidZero()
private:
Double_tPDataMS(const size_t i) const
Double_tPMean(const size_t i) const
Double_tPMeanVar(const size_t i) const
Double_tPNeff(const size_t i) const

Data Members

private:
Bool_tfFirstPassFirst or second pass?
Bool_tfGoodErrorsupdate functions will pass good errors
Int_tfNsum of 1 (= N)
Int_tfN2sum of 1 (= N) for second pass
vector<Double_t>fSumWtsum of weights
vector<Double_t>fSumWt2sum of weights^2
vector<Double_t>fSumWt2Err2sum of weights^2 * error^2
vector<Double_t>fSumWtXsum of weights * x
vector<Double_t>fSumWtX2sum of weights * x^2
vector<Double_t>fSumWtXssum of weights * (x-<x>)
vector<Double_t>fSumWtXs2sum of weights * (x-<x>)^2
vector<Double_t>fXbarmeans of x from first pass

Class Charts

Inheritance Chart:
TaStatistics

Function documentation

~TaStatistics()
N()
 Number of events in stats
Size()
 Size of statistics vector (nquant)
DataRMS()
 Vector of RMS of x
Mean()
 Vector of means of x
MeanVar()
 Vector of variances of means of x
MeanErr()
 Vector of errors of means of x
MeanAndErr()
 Vector of means of x and their errors
Neff()
 Effective N for all x
vector<Double_t> DataRMS()
vector<Double_t> Mean()
vector<Double_t> MeanVar()
vector<Double_t> MeanErr()
MeanAndErr()
vector<Double_t> Neff()
void SetFirstPass(Bool_t)
 Other functions

Author: R. Holmes , A. Vacheret , R. Michaels , K.Paschke
Last update: pan/src:$Name: $:$Id: TaStatistics.cc,v 1.9 2003/07/31 16:12:00 rsholmes Exp $

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.