#include <Histograms.h>
Public Member Functions | |
Covariance () | |
double | covariance () |
void | fill (const double &x, const double &y) |
double | getN () |
Protected Attributes | |
int | N_ |
double | productXY_ |
double | sumX_ |
double | sumY_ |
This class can be used to compute the covariance between two input variables. The Fill method needs the two input variables. In the end the covariance method computes the covariance as: cov(x,y) = Sum_i(x_i*y_i)/N - x_mean*y_mean. Of course passing the same variable for x and y gives the variance of that variable.
Definition at line 1875 of file Histograms.h.
|
inline |
Definition at line 1877 of file Histograms.h.
|
inline |
Definition at line 1884 of file Histograms.h.
References N_, productXY_, sumX_, and sumY_.
Referenced by HCovarianceVSxy::Write().
|
inline |
Definition at line 1878 of file Histograms.h.
References N_, productXY_, sumX_, sumY_, x, and y.
Referenced by HCovarianceVSxy::Fill().
|
inline |
|
protected |
Definition at line 1899 of file Histograms.h.
Referenced by covariance(), fill(), and getN().
|
protected |
Definition at line 1896 of file Histograms.h.
Referenced by covariance(), and fill().
|
protected |
Definition at line 1897 of file Histograms.h.
Referenced by covariance(), and fill().
|
protected |
Definition at line 1898 of file Histograms.h.
Referenced by covariance(), and fill().