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