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


Unit: SDL_statis
Class: none
Declaration: function RunsTest (Data: TBitFld; 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: 2015-May-14