Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
Vue Injector 3.3
Spectrum Analyzer pro Live 2019
Devart Excel Add-in for HubSpot 2.1
RentALLScript - Airbnb clone 2.2
SuiteCRM Theme Customization 7.11.6
iScripts NetMenus 3.1
iScripts EasyIndex 2.2
iScripts EasySnaps 2.0
Australia MyPost shipping For Magento 2 1.0.0
Australia Post eParcel For Magento 1.1.1
Source Control for SQL Server 2.0
Answers phpSoftPro 3.12
Exlcart 2.0
School College ERP 1.3.2
White-label Grocery Delivery App Solution 2.0
Top Code
IcrediBB Bulletin Board System 1.0
iScripts EasySnaps 1
iScripts EasyIndex 1
iScripts NetMenus 2.0
Azizi search engine script PHP 4.1.10
White-label Grocery Delivery App Solution 2.0
MP3 Player (GUI) (Sripts) 1.0
Vue Injector 3.3
JAT JADE Agent Testing framework 1.0.0
CamStudio 2.0
Faculty Evaluation System 1.1
inout Music Ultimate
Tradebit Download and Affiliate Shop 3.0.0
Readymade MLM Products 2.01
Classic HangMan Game 1.0
Top Rated
phpEnter 5.1.
Quick Maps For Dynamics CRM 3.1
Single Leg MLM 1.2.1
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Deals and Discounts Website Script 1.0.2
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
PRNG Test 
File ID: 64553






PRNG Test 
Download PRNG Test http://code.activestate.com/recipes/578069-ifs-fractals-using-automatic-probability-distribut/Report Error Link
License: Freeware
Downloads: 26
Submit Rating:
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.)

License: Freeware

Related: Math, Mathematics, Random

O/S:Windows

Downloads: 26



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
- required fields
     

Please enter text on the image