TwoSampleStats Class Template Reference
[Mathematical algorithms]

#include <Stats.hpp>

Inheritance diagram for TwoSampleStats:

Inheritance graph
[legend]
Collaboration diagram for TwoSampleStats:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class T>
class gpstk::TwoSampleStats< T >

Conventional statistics for two samples.

Constructor does the same as Reset(); use this when starting a new series of input samples. Results are available at any time by calling N(), Minimum(), Maximum(), Average(), Variance() and StdDev(). NB. Variance is normalized with 1/(N-1) and StdDev is sqrt(Variance). NB. This class may not give exactly correct results with non-floating types, (for which it is not intended).

Definition at line 286 of file Stats.hpp.

Public Member Functions

 TwoSampleStats ()
 constructor
 TwoSampleStats (Vector< T > &X, Vector< T > &Y)
 constructor given two Vector of data
void Add (const T &X, const T &Y)
 Add data to the statistics.
void Add (const Vector< T > &X, const Vector< T > &Y)
 Add two Vectors of data to the statistics.
void Subtract (const T &X, const T &Y)
void Subtract (const Vector< T > &X, const Vector< T > &Y)
void Reset (void)
 reset, i.e. ignore earlier data and restart sampling
unsigned int N (void) const
 return the sample size
MinimumX (void) const
 return minimum X value
MaximumX (void) const
 return maximum X value
MinimumY (void) const
 return minimum Y value
MaximumY (void) const
 return maximum Y value
AverageX (void) const
 return computed X average
AverageY (void) const
 return computed Y average
VarianceX (void) const
 return computed X variance
VarianceY (void) const
 return computed Y variance
StdDevX (void) const
 return computed X standard deviation
StdDevY (void) const
 return computed Y standard deviation
Slope (void) const
 return slope of best-fit line Y=slope*X + intercept
Intercept (void) const
 return intercept of best-fit line Y=slope*X + intercept
SigmaSlope (void) const
 return uncertainty in slope
Correlation (void) const
 return correlation
SigmaYX (void) const
 return conditional uncertainty = uncertainty y given x
TwoSampleStats< T > & operator+= (TwoSampleStats< T > &S)
 combine two TwoSampleStats (assumed to be taken from the same or equivalent samples) NB.


Constructor & Destructor Documentation

TwoSampleStats  )  [inline]
 

constructor

Definition at line 290 of file Stats.hpp.

TwoSampleStats Vector< T > &  X,
Vector< T > &  Y
[inline]
 

constructor given two Vector of data

Definition at line 293 of file Stats.hpp.


Member Function Documentation

void Add const Vector< T > &  X,
const Vector< T > &  Y
[inline]
 

Add two Vectors of data to the statistics.

Definition at line 323 of file Stats.hpp.

void Add const T &  X,
const T &  Y
[inline]
 

Add data to the statistics.

Definition at line 300 of file Stats.hpp.

Referenced by GloFreqIndex::addPass(), and PolyTest().

T AverageX void   )  const [inline]
 

return computed X average

Definition at line 370 of file Stats.hpp.

Referenced by gpstk::operator<<().

T AverageY void   )  const [inline]
 

return computed Y average

Definition at line 374 of file Stats.hpp.

Referenced by gpstk::operator<<().

T Correlation void   )  const [inline]
 

return correlation

Definition at line 425 of file Stats.hpp.

Referenced by gpstk::operator<<().

T Intercept void   )  const [inline]
 

return intercept of best-fit line Y=slope*X + intercept

Definition at line 407 of file Stats.hpp.

Referenced by GloFreqIndex::addPass(), and gpstk::operator<<().

T MaximumX void   )  const [inline]
 

return maximum X value

Definition at line 363 of file Stats.hpp.

Referenced by gpstk::operator<<().

T MaximumY void   )  const [inline]
 

return maximum Y value

Definition at line 367 of file Stats.hpp.

Referenced by gpstk::operator<<().

T MinimumX void   )  const [inline]
 

return minimum X value

Definition at line 361 of file Stats.hpp.

Referenced by gpstk::operator<<().

T MinimumY void   )  const [inline]
 

return minimum Y value

Definition at line 365 of file Stats.hpp.

Referenced by gpstk::operator<<().

unsigned int N void   )  const [inline]
 

return the sample size

Definition at line 359 of file Stats.hpp.

Referenced by GloFreqIndex::addPass(), and gpstk::operator<<().

TwoSampleStats<T>& operator+= TwoSampleStats< T > &  S  )  [inline]
 

combine two TwoSampleStats (assumed to be taken from the same or equivalent samples) NB.

Beware using this with very small sample size.

Definition at line 450 of file Stats.hpp.

void Reset void   )  [inline]
 

reset, i.e. ignore earlier data and restart sampling

Definition at line 356 of file Stats.hpp.

Referenced by PolyTest(), and LinearClockModel::reset().

T SigmaSlope void   )  const [inline]
 

return uncertainty in slope

Definition at line 416 of file Stats.hpp.

Referenced by GloFreqIndex::addPass(), and gpstk::operator<<().

T SigmaYX void   )  const [inline]
 

return conditional uncertainty = uncertainty y given x

Definition at line 437 of file Stats.hpp.

Referenced by gpstk::operator<<().

T Slope void   )  const [inline]
 

return slope of best-fit line Y=slope*X + intercept

Definition at line 398 of file Stats.hpp.

Referenced by GloFreqIndex::addPass(), and gpstk::operator<<().

T StdDevX void   )  const [inline]
 

return computed X standard deviation

Definition at line 392 of file Stats.hpp.

Referenced by GloFreqIndex::addPass(), and gpstk::operator<<().

T StdDevY void   )  const [inline]
 

return computed Y standard deviation

Definition at line 395 of file Stats.hpp.

Referenced by GloFreqIndex::addPass(), and gpstk::operator<<().

void Subtract const Vector< T > &  X,
const Vector< T > &  Y
[inline]
 

Definition at line 348 of file Stats.hpp.

void Subtract const T &  X,
const T &  Y
[inline]
 

Definition at line 330 of file Stats.hpp.

T VarianceX void   )  const [inline]
 

return computed X variance

Definition at line 378 of file Stats.hpp.

Referenced by gpstk::operator<<().

T VarianceY void   )  const [inline]
 

return computed Y variance

Definition at line 385 of file Stats.hpp.

Referenced by gpstk::operator<<().


The documentation for this class was generated from the following file:
Generated on Tue May 21 03:31:56 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1