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


Declaration: PerformMannWhitneyUTest (Data1, Data2: TDoubleArray; OneSided: boolean; var UStatistic: double): double;
The function PerformMannWhitneyUTest returns the probability associated with a 2-sample U-test, that is the probability which indicates the likelihood that two samples have come from the same two underlying populations having the same median.

The parameters Data1 and Data2 contain the data to be compared, the boolean flag OneSided determines whether the problem is a one-sided or a two-sided one. The variable parameter UStatistic contains the value of the U statistic on return (if no error ocurred).

Returned error codes:

≥0 ... everything is OK, the returned value represents the p-value
-1 ... at least one of the data field is empty