twovar is a program that allows you to create two sample means, based on two different randomizing routines. The resulting means are subtracted and compared to zero. The program displays an upper and lower limit with 95 percent confidence for the difference between the means.
The purpose of this program is to show that the random number generator in datagen compares favorably to one of the best pseudo-random number generators in existence.
The twovar program adds up the number of successes for each generator and divides by the number of observations to get a proportion close to the population probability.
twovar has the following parameters:
Examples of how to run the program.
twovar -p 0.5 -s 10000 -c 95.0
In these examples, the program makes 10 thousand observations for success with a probability of 50 percent and a confidence level of 95 percent.
The calculation of probabilities for the sample mean distribution is based on the following book:
Lincoln L. Chao
Statistics for Management
2nd Edition
Palo Alto: The Scientific Press, 1984
Chapter 9, Statistical Estimation
Section 3, Interval Estimation About Proportions
Lincoln L. Chao published his book while at California State University, Long Beach.
The ran2 random number generator is taken from:
Numerical Recipes in C
Chapter 7.1