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


WilcoxonSignedRankTest

Declaration: WilcoxonSignedRankTest (Data1, Data2: TDoubleArray; alpha: double; OneSided: boolean; var mdiff, WStat, WCritLow, WCritHigh: double): integer;
The function WilcoxonSignedRankTest performs the Wilcoxon signed rank test to decide whether there is a significant difference of the medians of the two paired samples data1 and data2. The parameter alpha specifies the level of sognificance, the parameter OneSided has to be set to TRUE if the test is one-tailed.

The variable parameters mdiff, WStat, WCritLow and WCritHigh return the median of the paired differences, the Wilcoxon statistic and the lower and upper critical limit for the given level of significance. The null hypothesis has to be rejected according to the following rules:

The function returns the following error codes:
 0 ... everything is OK
-1 ... number of available data is too low (a minimum of 8 data pairs are required)
-2 ... the data arrays are not paired, i.e. they exhibit different lengths
-3 ... alpha is out of range (valid range: >0 ... ≤1.0)