© Copyright 2000-2020 Source Code Online. Free Source Code and Scripts Downloads.
PRNG Test Description
Description: This is a pseudo-random number generator test.
(There are many known tests for pseudo-random generators
but I came up w/ this one on my own. I don't know
if it is an already known method or not.)
Idea is this:
Imagine if you generate a 1000-bit binary number using any
PRNG (as 1-bit at a time) what is the probability that
all bits will be 0 in the number?
If you had a true number generator then there is a real
probability (=1/(2**1000)) but if you use a PRNG then I would say the
probability is really 0!
If you had generated 2**1000 1000-bit numbers using a hypothetical
True-Random Number Generator, assuming perfectly uniform probability
distribution, then TRNG would generate 1 number that contains 1000 zeros.
That is C(1000, 1000) = 1
Assuming perfectly uniform probability distribution,
C(n,k) gives you how many n-digit binary numbers would contain k zeros.
This code generates 2**n n-bit binary numbers (one bit at a time)
using the given PRNG and compares the actual distribution to the perfect
distribution of a hypothetical True-Random Number Generator.
(I used n=20 in the code because the calculation takes too long.)
Related: Math, Mathematics, Random
|More Similar Code|
In Model-in-the-Loop for Embedded System Test (MiLEST) the developed signal-feature d-deOCt oriented paradigm allows the abstract description of signals and their properties. It addresses the problem of missing reference signal flows as well as the issue of systematic test data selection. Numerous signal features are identified. Furthermore, predefined test patterns help build hierarchical test specifications, which enables a construc-tion of...
It can perform a one or two sided test.
The script outputs the probability of observing the resulting value of "s" or "a" value, given "n" total outcomes with a probability of success of "p".
migration_test_helper makes testing your migrations easier by adding helper methods to Test::Unit::TestCase for asserting the current state of the schema and executing migrations against the test database.
DTR is a distributed test runner to run tests on distributed computers for decreasing build time. The SCM on rubyforge is not update to date anymore, please visit http://github.com/xli/dtr/tree/master to get latest version source code of DTR
The Netscape Server Push Test is a script which is written using Perl with which you can animate images using the server push method. An example can be viewed on the website which is created using this script. It works by pushing the gif files...
SCEA Certification Test Simulator is a mock test application of SCEA Part-I. It supports 6 mock tests of 288 questions. All the questions are supported with complete explanation. After every test it can produce detailed reports on all subjects,...
This java application is a test simulator based on the latest pattern of SCJP2 Upgrade exam. It contains 11 Mock tests having 363 questions and an interactive quiz having 100 questions. The Diagnostic Test, which is a part of the 11 Mock tests,...
A split test is a way to make more than one version of your Web site and to see what version converts more visitors into sales. Perhaps you want to test one headline vs. another headline, or maybe you want to see if putting the order form on the...
Stress-Test Web Forms and Services With ACT (Continued) is a web based tutorial through which users can learn about testing methods using ACT. Here author describes about testing the stress in several ASP.NET application andd reports whether the...
Test Web Service Interoperability with .NET is an online ASP.NET reference article emphasizing the interoperability of web services on a .NET platform. This article is intended to guide and provide a simple windows form application to exercise web...
|User Review for PRNG Test
All files and free downloads are copyright of their respective owners. We do not provide any hacked, cracked, illegal, pirated version of scripts, codes, components downloads. All files are downloaded from the publishers website, our file servers or download mirrors. Always Virus check files downloaded from the web specially zip, rar, exe, trial, full versions etc. Download links from rapidshare, depositfiles, megaupload etc not published.