DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


PearsonCorrCoeff

Declaration: function PearsonCorrCoeff (Data1, Data2: TDoubleArray; var CorrCoeff: double): integer;
The function PearsonCorrCoeff calculates Pearson's correlation coefficient of the two data sets Data1 and Data2 and returns it in the variable parameter CorrCoeff.

The function returns the following error codes:

 0 ... everything is OK
-1 ... too few data values (a minimum of 3 data pairs are required)
-2 ... data arrays do not match in size