VF_corrcoeffVD_corrcoeffVE_corrcoeff
FunctionLinear correlation coefficient between two distributions
Syntax C/C++#include <VFstd.h>
float VF_corrcoeff( fVector X, fVector Y, ui size, float Xmean, float Ymean );
C++ VecObj#include <OptiVec.h>
T vector<T>::corrcoeff( const vector<T>& Y, T Xmean, T Ymean );
Pascal/Delphiuses VFstd;
function VF_corrcoeff( X, Y:fVector; size:UIntSize; Xmean, Ymean:Single ): Single;
DescriptionThe linear correlation coefficient ("Pearson's r") takes on values between -1.0 and +1.0. The mean values of both distributions must be known. They are passed to VF_corrcoeff as the parameters Xmean and Ymean.
Example C/C++r = VF_corrcoeff( X, Y, n, VF_mean( X, n ), VF_mean( Y, n ) );
Return valuelinear correlation coefficient r
See alsoVF_mean,   VF_varianceV,   VF_linregress

VectorLib Table of Contents  OptiVec home