Statistical Analysis of Pseudorandom Number Generators

  • Aleksandar Keleč Elektrotehnički fakultet, Univerzitet u Banjoj Luci
  • Nikola Obradović
  • Igor Dujlović
  • Zoran Mitrović
Keywords: Random numbers, Pseudorandom numbers, Pseudorandom number generators, Statistical tests, Chi-square, Uniformity, Randomness

Abstract

The paper describes the concept of random numbers and their multiple applications. The types of pseudorandom number generators are described as well as the main characteristics that a good generator should have. In addition, the mechanisms and statistical tests that determine the quality of generated pseudorandom sequences produced by individual algorithms are described. Furthermore, the paper deals with statistical tests that show how random and uniform the generated sequences are. As the practical work of the paper, a test scenario was created that aims to show the quality of the sequences generated by several known algorithms, whose implementations are given by standard Python libraries. The algorithms uniform, randint, and betavariate from standard Python libraries were analyzed. Additionally, the algorithm rand_22 is implemented, which has been proven to generate sequences that follow a uniform distribution and can be used equally in applications that require long sequences of pseudorandom numbers with a uniform distribution. The following tests were conducted and documented within the test scenario: Chi-square test, Graphic test, Poker test, and Runs test. The graphical test visually showed that the uniform, randint, and rand_22 generate uniformly distributed random numbers, while the same cannot be said for the betavariate algorithm. On the other hand, other tests confirmed this fact through numerical results.

Published
2022-02-08
Section
Software engineering