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....



Prob2x2Contingency


Unit:SDL_statis
Class: none
Declaration: function Prob2x2Contingency (FreqTab: TInt2DArray; var Prob: double): integer;

The function Prob2x2Contingency calculates the probability Prob that the given 2x2 contingency table FreqTab occurs by chance (under the condition that the margin sums are contant).

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: 2020-May-28