The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



FisherExactTest


Unit:SDL_statis
Class: none
Declaration: function FisherExactTest (FreqTab: TInt2DArray; var ProbLow, ProbHigh, Prob2Tail: double): integer;

The function FisherExactTest calculates the probabilities of Fisher's exact test of independence for the 2x2 contingency table FreqTab. The variable parameters ProbLow, ProbHigh and Prob2Tail return the probabilities for the one-tailed lower tail, the one-tailed upper tail and the two-tailed test, respectively.

The function returns the following error codes:

 0 ... everything is OK
-1 ... frequency table is not a 2x2 table
-2 ... frequency table too large (N must be less than 1001)
-3 ... frequency table must not contain negative numbers


Last Update: 2023-Feb-06