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



BinomSignTest


Unit: SDL_statis
Class: none
Declaration: function BinomSignTest (Data: TBoolArray; p1: double): double;

The function BinomSignTest performs a binomial sign test. It tests the null hypothesis that the proportion of TRUE and FALSE values in the boolean array Data is equal to p1. The null hypothesis H0 is as follows: the sample data comes from a population with 100*p1 percent TRUE and 100*(1-p1) percent FALSE values. The function returns the probability that the actual proportion is equal p1.

Please note that the exact probability can only be calculated for relatively small samples (typically less than 1000 data points, however, the exact limit depends on p1). If the probability cannot be calculated the function returns a value of -3 instead of the probability.

The function returns the following error codes:

 0 ... everything is OK
-1 .... sample size is smaller than 3 observations
-2 .... invalid p1 (valid range: 0.0 ... 1.0)
-3 .... probability cannot be calculated due to arithmetic overflow


Last Update: 2023-Feb-06