Simulation and Modelling - Old Questions

2.  Differentiate between true and pseudo random numbers. What are the basic properties of random numbers? The sequence of numbers 0.37, 0.29, 0.19, 0.88 0.44, 0.63, 0.77, 0.70 0.21, and 0.58 has been generated. Use K-S test to determine if the numbers are uniformly distributed (Dα = 0.41 for α = 0.05  (2 + 2 + 6)

10 marks | Asked in Model Question

Difference between true and pseudo random numbers

  • Pseudo random numbers are the random numbers that are generated by using some known methods (algorithms) so as to produce a sequence of numbers in [0,1] that can simulates the ideal properties of random numbers. They are not completely random as the set of random numbers can be replicated because of use of some known method.
  • True random numbers are gained from physical processes like radioactive decay or also rolling a dice and introduce it into a computer.
  • Pseudo random numbers have fast response  in generating numbers while true random have slow response.
  • In pseudo random number, sequence of numbers can be reproduced where as In true random number, sequence of numbers can't be reproduced.
  • In pseudo random number, sequence of number is repeated where as In true random number, sequence of numbers will or will not be repeated.

Properties of Random Numbers

1. Uniformity:

  • The random numbers generated should be uniform. That means a sequence of random numbers should be equally probable every where.
  • If we divide all the set of random numbers into several numbers of class interval then number of samples in each class should be same.
  • If ‘N’ number of random numbers are divided into ‘K’ class interval, then expected number of samples in each class should be equal to ei = N / K.

2. Independent:

  • Each random number should be independent samples drawn from a continuous uniform distribution between 0 and 1.
  • The probability density function is given by:
    f(x) = 1, 0 <= x <= 1
          = 0, otherwise

3. Maximum Density:

  • The large samples of random number should be generated in a given range.

4. Maximum Cycle:

  •  It states that the repetition of numbers should be allowed only after a large interval of time.

Now,

Given sequence of number,

    0.37, 0.29, 0.19, 0.88 0.44, 0.63, 0.77, 0.70 0.21, and 0.58 

Arranging the given number in ascending order:

    0.19, 0.21, 0.29, 0.37, 0.44, 0.58, 0.63, 0.7, 0.77, 0.88

Here, N = 10

Calculation table for Kolmogorov-Smirnov test :

i



10.190.1-0.19
20.210.2-0.11
30.290.30.010.09
40.370.40.030.07
50.440.50.060.04
60.580.60.020.08
70.630.70.070.03
80.70.80.1-
90.770.90.13-
100.881.00.12-


Now, calculating

\\begin{displaymath}D^+ = {\\rm max}_{1 \\le i \\le N} \\left\\{ \\frac{i}{N} - R_{(i)}
\\right\\} \\end{displaymath} = 0.13

\\begin{displaymath}D^- = {\\rm max}_{1 \\le i \\le N} \\left\\{ R_{(i)} -
\\frac{i-1}{N} \\right\\} \\end{displaymath} = 0.19

$D = {\\rm max} (D^+, D^-)$ = 0.19

Given, Critical value $D_\\alpha$ = 0.41

Since the computed value, D = 0.19, is less than the tabulated critical value, $D_\\alpha$ = 0.41, the hypothesis of no difference between the distribution of the generated numbers and the uniform distribution is not rejected.