Web site design and hosting - 3.3.2 EMPIRICAL TESTS 59 b 24. [4U] Experiment
3.3.2 EMPIRICAL TESTS 59 b 24. [4U] Experiment with various probability distributions (p, q, T) on three categories, where p + q + r = 1, by computing the exact distribution of the chi-square statistic V for various TL, thereby determining how accurate ari approximation the chi-square distribution with two degrees of freedom really is. 3.3.2. Empirical Tests In this section we shall discuss ten kinds of specific tests that have been applied to sequences in order to investigate their randomness. The discussion of each test has two parts: (a) a plug-in description of how to perform the test; and (b) a study of the theoretical basis for the test. (Readers lacking mathe- matical training may wish to skip over the theoretical discussions. Conversely, mathematically-inclined readers may find the associated theory quite interest- ing, even if they never intend to test random number generators, since some instructive combinatorial questions are involved here.) Each test is applied to a sequence KM = uo, Ul, u2,. . . (1) of real numbers, which purports to be independently and uniformly distributed between zero and one. Some of the tests are designed primarily for integer-valued sequences, instead of the real-valued sequence (1). In this case, the auxiliary sequence (Y,)=yo,K,yz,…, (2) which is defined by the rule K = LdUnJ, (3) is used instead. This is a sequence of integers that purports to be independently and uniformly distributed between 0 and d -1. The number d is chosen for convenience; for example, we might have d = 64 = 26 on a binary computer, so that Y, represents the six most significant bits of the binary representation of U,. The value of d should be large enough so that the test is meaningful, but not so large that the test becomes impracticably difficult to carry out. The quantities U,, Y,, and d will have the above significance throughout this section, although the value of d will probably be differenl in different tests. A. Equidistribution test (Frequency test). The first requirement that sequence (1) must meet is that its numbers are, in fact, uniformly distributed between zero and one. There are two ways to make this test: (a) Use the Kolmogorov- Smirnov test, with F(z) = 5 for 0 < II: 5 1. (b) Let d be a convenient number, e.g., 100 on a decimal computer, 64 or 128 on a binary computer, and use the sequence (2) instead of (1). For each integer T, 0 5 r < d, count the number of times that Y3 = r for 0 5 j < n, and then apply the chi-square test using Ic = d and probability p, = l/d for each category. The theory behind this test has been covered in Section 3.3.1.
Note: In case you are looking for affordable webhost to host and run your web application check Vision cheap hosting services