Conventional statistics for two samples. Constructor does the same as clear(); use this when starting a new series of input samples.
Definition at line 63 of file BivarStats.hpp.
#include <BivarStats.hpp>
Public Member Functions | |||||||
T | averageX (void) const | ||||||
T | averageY (void) const | ||||||
void | clear (void) | ||||||
Remove all data and start over. More... | |||||||
T | correlation (void) const | ||||||
Stats< T > | estimateDeviation (const std::vector< std::pair< T, T > > &d) const | ||||||
T | eval (const T &x) const | ||||||
compute intercept + x * slope More... | |||||||
T | intercept (void) const | ||||||
Return intercept of best-fit line Y=slope*X + intercept. More... | |||||||
T | maximumX (void) const | ||||||
T | maximumY (void) const | ||||||
T | minimumX (void) const | ||||||
T | minimumY (void) const | ||||||
size_t | n (void) const | ||||||
Return the sample size. More... | |||||||
BivarStats< T > & | operator+= (BivarStats< T > &S) | ||||||
T | sigmaSlope (void) const | ||||||
Return uncertainty in slope. More... | |||||||
T | sigmaYX (void) const | ||||||
return conditional uncertainty = uncertainty y given x More... | |||||||
T | slope (void) const | ||||||
Return slope of best-fit line Y=slope*X + intercept. More... | |||||||
T | stdDevX (void) const | ||||||
T | stdDevY (void) const | ||||||
T | varianceX (void) const | ||||||
T | varianceY (void) const | ||||||
Constructors. | |||||||
Various ways to construct a BivarStats object.
| |||||||
BivarStats (bool scale=false) | |||||||
BivarStats (const T &x, const T &, bool scale=false) | |||||||
BivarStats (const std::vector< T > &x, const std::vector< T > &y, bool scale=false) | |||||||
BivarStats (const std::vector< std::pair< T, T > > &d, bool scale=false) | |||||||
BivarStats (const Vector< T > &x, const Vector< T > &y, bool scale=false) | |||||||
Addition Functions | |||||||
Add data to the statistics. | |||||||
void | add (const T &x, const T &y) | ||||||
void | add (const std::vector< T > &x, const std::vector< T > &y) | ||||||
void | add (const std::vector< std::pair< T, T > > &d) | ||||||
void | add (const Vector< T > &x, const Vector< T > &y) | ||||||
Subtraction Functions | |||||||
Subtract data from the statistics. | |||||||
void | subtract (const T &x, const T &y) | ||||||
void | subtract (const std::vector< T > &x, const std::vector< T > &y) | ||||||
void | subtract (const std::vector< std::pair< T, T > > &d) | ||||||
void | subtract (const Vector< T > &x, const Vector< T > &y) | ||||||
Private Attributes | |
size_t | ns |
Number of samples added to the statistics so far. More... | |
bool | scaled |
T | scaleX |
T | scaleY |
T | sumX |
T | sumX2 |
T | sumXY |
T | sumY |
T | sumY2 |
T | xMax |
T | xMin |
T | yMax |
T | yMin |
gnsstk::BivarStats< T >::BivarStats | ( | bool | scale = false | ) |
Definition at line 170 of file BivarStats.hpp.
gnsstk::BivarStats< T >::BivarStats | ( | const T & | x, |
const T & | y, | ||
bool | scale = false |
||
) |
Definition at line 175 of file BivarStats.hpp.
gnsstk::BivarStats< T >::BivarStats | ( | const std::vector< T > & | x, |
const std::vector< T > & | y, | ||
bool | scale = false |
||
) |
Definition at line 182 of file BivarStats.hpp.
gnsstk::BivarStats< T >::BivarStats | ( | const std::vector< std::pair< T, T > > & | d, |
bool | scale = false |
||
) |
Definition at line 190 of file BivarStats.hpp.
gnsstk::BivarStats< T >::BivarStats | ( | const Vector< T > & | x, |
const Vector< T > & | y, | ||
bool | scale = false |
||
) |
Definition at line 197 of file BivarStats.hpp.
void gnsstk::BivarStats< T >::add | ( | const std::vector< std::pair< T, T > > & | d | ) |
Definition at line 253 of file BivarStats.hpp.
void gnsstk::BivarStats< T >::add | ( | const std::vector< T > & | x, |
const std::vector< T > & | y | ||
) |
Definition at line 243 of file BivarStats.hpp.
void gnsstk::BivarStats< T >::add | ( | const T & | x, |
const T & | y | ||
) |
Definition at line 204 of file BivarStats.hpp.
void gnsstk::BivarStats< T >::add | ( | const Vector< T > & | x, |
const Vector< T > & | y | ||
) |
Definition at line 261 of file BivarStats.hpp.
T gnsstk::BivarStats< T >::averageX | ( | void | ) | const |
Definition at line 346 of file BivarStats.hpp.
T gnsstk::BivarStats< T >::averageY | ( | void | ) | const |
Definition at line 349 of file BivarStats.hpp.
void gnsstk::BivarStats< T >::clear | ( | void | ) |
Remove all data and start over.
This assumes that the accessors will check for n>0, which they do.
Definition at line 331 of file BivarStats.hpp.
T gnsstk::BivarStats< T >::correlation | ( | void | ) | const |
Definition at line 399 of file BivarStats.hpp.
Stats< T > gnsstk::BivarStats< T >::estimateDeviation | ( | const std::vector< std::pair< T, T > > & | d | ) | const |
Definition at line 439 of file BivarStats.hpp.
|
inline |
compute intercept + x * slope
Definition at line 127 of file BivarStats.hpp.
T gnsstk::BivarStats< T >::intercept | ( | void | ) | const |
Return intercept of best-fit line Y=slope*X + intercept.
Definition at line 381 of file BivarStats.hpp.
T gnsstk::BivarStats< T >::maximumX | ( | void | ) | const |
Definition at line 339 of file BivarStats.hpp.
T gnsstk::BivarStats< T >::maximumY | ( | void | ) | const |
Definition at line 343 of file BivarStats.hpp.
T gnsstk::BivarStats< T >::minimumX | ( | void | ) | const |
Definition at line 337 of file BivarStats.hpp.
T gnsstk::BivarStats< T >::minimumY | ( | void | ) | const |
Definition at line 341 of file BivarStats.hpp.
|
inline |
Return the sample size.
Definition at line 334 of file BivarStats.hpp.
BivarStats< T > & gnsstk::BivarStats< T >::operator+= | ( | BivarStats< T > & | S | ) |
Combine two BivarStats (assumed to be taken from the same or equivalent samples).
combine two BivarStats (assumed to be taken from the same or equivalent samples)
Definition at line 420 of file BivarStats.hpp.
T gnsstk::BivarStats< T >::sigmaSlope | ( | void | ) | const |
Return uncertainty in slope.
Definition at line 390 of file BivarStats.hpp.
T gnsstk::BivarStats< T >::sigmaYX | ( | void | ) | const |
return conditional uncertainty = uncertainty y given x
Definition at line 409 of file BivarStats.hpp.
T gnsstk::BivarStats< T >::slope | ( | void | ) | const |
Return slope of best-fit line Y=slope*X + intercept.
Definition at line 371 of file BivarStats.hpp.
T gnsstk::BivarStats< T >::stdDevX | ( | void | ) | const |
Definition at line 366 of file BivarStats.hpp.
T gnsstk::BivarStats< T >::stdDevY | ( | void | ) | const |
Definition at line 368 of file BivarStats.hpp.
void gnsstk::BivarStats< T >::subtract | ( | const std::vector< std::pair< T, T > > & | d | ) |
Definition at line 312 of file BivarStats.hpp.
void gnsstk::BivarStats< T >::subtract | ( | const std::vector< T > & | x, |
const std::vector< T > & | y | ||
) |
Definition at line 302 of file BivarStats.hpp.
void gnsstk::BivarStats< T >::subtract | ( | const T & | x, |
const T & | y | ||
) |
Definition at line 271 of file BivarStats.hpp.
void gnsstk::BivarStats< T >::subtract | ( | const Vector< T > & | x, |
const Vector< T > & | y | ||
) |
Definition at line 320 of file BivarStats.hpp.
T gnsstk::BivarStats< T >::varianceX | ( | void | ) | const |
Definition at line 354 of file BivarStats.hpp.
T gnsstk::BivarStats< T >::varianceY | ( | void | ) | const |
Definition at line 360 of file BivarStats.hpp.
|
private |
Number of samples added to the statistics so far.
Definition at line 138 of file BivarStats.hpp.
|
private |
Definition at line 142 of file BivarStats.hpp.
|
private |
Definition at line 141 of file BivarStats.hpp.
|
private |
Definition at line 141 of file BivarStats.hpp.
|
private |
Definition at line 143 of file BivarStats.hpp.
|
private |
Definition at line 143 of file BivarStats.hpp.
|
private |
Definition at line 143 of file BivarStats.hpp.
|
private |
Definition at line 143 of file BivarStats.hpp.
|
private |
Definition at line 143 of file BivarStats.hpp.
|
private |
Definition at line 140 of file BivarStats.hpp.
|
private |
Definition at line 140 of file BivarStats.hpp.
|
private |
Definition at line 140 of file BivarStats.hpp.
|
private |
Definition at line 140 of file BivarStats.hpp.