0
3.2kviews
Using appropriate test check whether the numbers are uniformly distributed in a random number generator

Using appropriate test check whether the numbers are uniformly distributed.

N=50, α= 0.05, χ0.05,9= 16.9.

{6,7,0,6,9,9,0,6,4,6,4,0,8,2,6,6,1,2,6,8,5,6,0,4,7,1,3,5,0,7,1,4,9,8,6,0,9,6,6,7,1,0,4,7,9,2,0,1,4,8}

1 Answer
0
79views

Solution:

  1. Define the hypothesis for testing uniformity

    H0:RiνU[0,1]

    H0:RiνU[0,1]

  2. Normalize the data points (single digit numbers) to (0,1) for chi-square test (here 50 digits are given so chi-square test is more relevant). This results in following 50 data points.

    0.6, 0.7, 0.0, 0.6, 0.9, 0.9, 0.0, 0.6, 0.4, 0.6, 0.4, 0.0,

    0.8, 0.2, 0.6, 0.6, 0.1, 0.2, 0.6, 0.8, 0.5, 0.6, 0.0,

    0.4, 0.7, 0.1, 0.3, 0.5, 0.0, 0.7, 0.1, 0.4, 0.9, 0.8,

    0.6, 0.0, 0.9, 0.6, 0.6, 0.7, 0.1, 0.0, 0.4, 0.7, 0.9,

    0.2, 0.0, 0.1, 0.4, 0.8

  3. Given that

    Degree of freedom = n1=90

    n=9+1=10

    Arrange the normalized data into n=10 intervals of equal length namely, [0, 0.1], [0,0.2], ..., [0, 0.9]

  4. Compute test statistics

Interval Oi E1=Nn=5010 (0iE+)2EJ
[0, 0.1] 8 5 1.8
[0.1, 0.2] 5 5 0
[0.2, 0.3] 3 5 0.8
[0.3, 0.4] 1 5 3.2
[0.4, 0.5] 6 5 0.2
[0.5, 0.6] 2 5 1.8
[0.6, 0.7] 11 5 7.2
[0.7, 0.8] 5 5 0
[0.8, 0.9] 4 5 0.2
[0.9, 1.0] 5 5 0

χ20=ni=1(0iEi)2Ej=152

  1. Given that the critical value = χ20.05,9=16.9

  2. Since α20=15.2<χ20.05,9=16.9

H0 is accepted i.e. set of random numbers are uniformly distributed.

Please log in to add an answer.