(04-09-2012 04:42 PM)Tad Carlucci Wrote: But I realize that frand() has it's problems. And sometimes, after a very VERY large number of times used, it can develop into patterns. Those patterns will still hover close to the 50/50 split. But if we look at the results we see repetition. It might be "5 males, then 5 females, then 4 males, then 6 females, then 7 males ... " What's wrong with that? Well, there should be some "1 male" or "1 female" mixed in! It's still about 50/50 and it still wiggles around .. but there are NO short runs. Similarly, it might be ONLY short runs, and no long ones.
This is *exactly* what I'm talking about. I'd expect things to be pretty even overall, mostly short runs with the occasional longer runs thrown in. That's not what we see. And *we* have effect on this as well, because we pick and choose which boxes to birth. But if everything is truly random, then the boxes we pick should still, over a period of weeks, start to even out.
to KC: I was talking about a limiting function. Some code packages have a random number generator that allows you to set top and bottom limits, for example, or specify integer returns rather than double float. Depending on the code package, using those limits can greatly reduce the repeat period of the generator.