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



RunsTest


Unit: SDL_statis
Class: none
Declaration: [1] function RunsTest (Data: TBitFld; var p: double): boolean;
[2] function RunsTest (Data: TBoolArray; var p: double): boolean;

The Wald-Wolfowitz runs test is a non-parametric statistical test that checks for randomness of the binary data sequence Data. The function returns the p-value in the variable parameter p, and TRUE as a function result if the p-value is less than 0.05.

Please note that the RunsTest algorithm uses the exact calculation of the probability p for group sizes less than 26 (this means that neither the count of TRUE bits nor the count of FALSE bits in the Data field exceeds 25), otherwise it approximates the p value in order to avoid numeric overflow.


Last Update: 2023-Feb-06