Random Numbers and Computers by Ronald T. Kneusel

Random Numbers and Computers by Ronald T. Kneusel

Author:Ronald T. Kneusel
Language: eng
Format: epub
Publisher: Springer International Publishing, Cham


4.1.7 Permutation Test

The permutation test examines the frequencies with which specific orderings of t consecutive samples occur. There are t! orderings of t values and these orderings should occur equally often with a probability p = 1/t! if the input samples are random. This test requires as input t which should be no more than 5. Additionally, if t = 4 or t = 5, then the number of input samples should be 100 million or more. The calculated statistic is χ2.

The above begs the question: how to do we uniquely characterize the orderings of samples? One way to do this would be to build a table mapping a sequence of t elements to a particular numeric value, [0, t). This, naturally, is not elegant and would quickly become cumbersome as t increases. For t = 5 we would already need a table of 120 elements and many machine cycles to determine which input sequence matches one of the table entries. Fortunately for us, there is a simpler way to uniquely characterize each of the possible t! orderings. If we sort the sequence numerically we can generate a value, call it f, which is uniquely determined by the initial ordering of the samples. I.e., the act of sorting the samples will require shuffling entries and the sequence of shuffles will determine f.

The algorithm is as follows, 1.Set f = 0, r = t.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.