"Jerry Coffin" <jcoffin@taeus.com> wrote:
> joe@iamnotathome.org.invalid says...
>
> [ ... ]
>
> > The two loops I used are not that important.
> > I just simulate 30 days with each day 500 rand's (ie. spins, draws etc.).
> > At the beginning of each day the frequency stats are cleared.
> > Ie. the tests are done for intraday stats only.
> > I hope this makes it clear.
> >
> > BTW, there is also a parallel discussion on this in sci.math
> > under the subject "Detecting biased random number generators".
>
> Out of curiosity, what exact code are you using to get from the original
> range of the generator to the 0-35 that you're using?
Jerry, it is 0 to 36.
As recommended in many books (for example Phillip Good
"Permutation, Parametric and Bootstrap Tests of Hypotheses")
I use the following:
int genrand(int lo, int hi)
{
int z = rand() % (hi - lo + 1) + lo;
return z;
}
....
int r = genrand(0, 36);