hypothesis that a sample population is random against the hypothesis that it is not random. The result is a two-element vector containing the nearly-normal test statistic
and its associated probability. This two-tailed is an extension of the "Runs Test for Randomness" and is often referred to as the
Median Delta Test.
This routine is written in the IDL language. Its source code can be found in the file
subdirectory of the IDL distribution.
Result = MD_TEST(
-element integer, single- or double-precision floating-point vector.
Use this keyword to specify a named variable that will contain the number of sample population values greater than the median of
Use this keyword to specify a named variable that will contain the number of sample population values less than the median of
Use this keyword to specify a named variable that will contain the number of Median Delta Clusters (sequential values of
above and below the median).
Define a sample population.
X = [ 2.00, 0.90, -1.44, -0.88, -0.24, 0.83, -0.84, -0.74, $
0.99, -0.82, -0.59, -1.88, -1.96, 0.77, -1.89, -0.56, $
-0.62, -0.36, -1.01, -1.36]
Test the hypothesis that
represents a random population against the hypothesis that it does not represent a random population at the 0.05 significance level.
result = MD_TEST(X, MDC = mdc)
The computed probability (0.322949) is greater than the 0.05 significance level and therefore we do not reject the hypothesis that
represents a random population.