| PANDORE Version 6 | GREYC-IMAGE |
pcorrelationcoefficient calculates the correlation value between two variables represented each by an array of values of the same size and stored in a collection.
The sample correlation coefficient between the two vecteurs X and Y is given by:
r_{xy} = \frac{\sum\limits_{i=1}^n (x_i-\bar{x})(y_i-\bar{y})}{(n-1) s_x s_y}
= \frac{\sum\limits_{i=1}^n (x_i-\bar{x})(y_i-\bar{y})} {\sqrt{\sum\limits_{i=1}^n (x_i-\bar{x})^2 \sum\limits_{i=1}^n (y_i-\bar{y})^2}},
where x and y
are the sample means of X and Y, and sx and sy are the sample standard deviations of X and Y.
Returns the value of correlation.
pcorrelationcoefficient Correctness Correctness r ccorrectness1.pan ccorrectness2.pan toto.pan
Errc PCorrelationCoefficient( const Collection &col_in1, const Collection &col_in2, Collection &col_out, const string &attr_in1, const string &attr_in2, const string &attr_out );
Author: Régis Clouard