theplu::yat::statistics::AveragerPair Class Reference

Class for taking care of mean and covariance of two variables. More...

#include <yat/statistics/AveragerPair.h>

List of all members.

Public Member Functions

 AveragerPair (void)
 The default constructor.
 AveragerPair (const AveragerPair &)
void add (const double x, const double y, const long n=1)
double ccc (void) const
 Concordence correlation coefficient.
double correlation (void) const
double covariance (void) const
double mean_xy (void) const
double msd (void) const
long n (void) const
void reset (void)
 Reset everything to zero.
double sum_xy (void) const
double sum_squared_deviation (void) const
double sum_xy_centered (void) const
const Averagerx_averager (void) const
const Averagery_averager (void) const
const AveragerPairoperator= (const AveragerPair &a)
 The assigment operator.
const AveragerPairoperator+= (const AveragerPair &)


Detailed Description

Class for taking care of mean and covariance of two variables.

See also:
Averager AveragerWeighted AveragerPairWeighted

Constructor & Destructor Documentation

theplu::yat::statistics::AveragerPair::AveragerPair ( const AveragerPair  ) 

Constructor taking sum of x , xx , y , yy , xy and number of pair of values n The copy constructor


Member Function Documentation

void theplu::yat::statistics::AveragerPair::add ( const double  x,
const double  y,
const long  n = 1 
)

Adding n pairs of data points with value x and y.

double theplu::yat::statistics::AveragerPair::ccc ( void   )  const

Concordence correlation coefficient.

$ \frac{\sum_i (x_i-m_x)(y_i-m_y)}{\sum_i (x_i-m_x)^2+\sum_i (y_i-m_y)^2 + n(m_x-m_y)^2} $

double theplu::yat::statistics::AveragerPair::correlation ( void   )  const

$ \frac{\sum_i (x_i-m_x)(y_i-m_y)}{\sqrt{\sum_i (x_i-m_x)^2\sum_i (y_i-m_y)^2}} $

Returns:
Pearson correlation coefficient.

double theplu::yat::statistics::AveragerPair::covariance ( void   )  const

Calculating covariance using $ \frac{1}{N}\sum_i (x_i-m_x)(y_i-m_y) $, where $ m $ is the mean.

Returns:
The covariance.

double theplu::yat::statistics::AveragerPair::mean_xy ( void   )  const

Returns:
The mean of xy.

double theplu::yat::statistics::AveragerPair::msd ( void   )  const

Returns:
Average squared deviation between x and y $ \frac{1}{N} \sum (x-y)^2 $

long theplu::yat::statistics::AveragerPair::n ( void   )  const

Returns:
The number of pair of data points.

double theplu::yat::statistics::AveragerPair::sum_xy ( void   )  const

Returns:
The sum of xy.

double theplu::yat::statistics::AveragerPair::sum_squared_deviation ( void   )  const

Returns:
Sum of squared deviation between x and y $ \sum (x-y)^2 $

double theplu::yat::statistics::AveragerPair::sum_xy_centered ( void   )  const

Returns:
$ \sum_i (x_i-m_x)(y_i-m_y) $

const Averager& theplu::yat::statistics::AveragerPair::x_averager ( void   )  const

Returns:
A const refencer to the averager object for x.

const Averager& theplu::yat::statistics::AveragerPair::y_averager ( void   )  const

Returns:
A const reference to the averager object for y

const AveragerPair& theplu::yat::statistics::AveragerPair::operator+= ( const AveragerPair  ) 

Operator to add another Averager


The documentation for this class was generated from the following file:

Generated on Tue Jan 18 02:20:11 2011 for yat by  doxygen 1.5.5