Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I came into computers from a liberal arts background so my math-fu is very weak but isn't something random or not random? How can you have gradations of randomness?

    Maybe I should just FTFL or some such slashdot acronym.

    • Gradations of randomness are quite meaningful. The degree of randomness is how accurately you can guess what value is coming next. A two-headed coin is non-random, since you know it always comes up heads. A regular coin potentially provides one bit of randomness, since it can come up either heads or tails, and you don't know which. But, it the coin is lopsided it could have a greater tendency to come up on one side than the other, say 50.1% heads and 49.9% tails. That is no longer absolutely random, but it is still quite close. Make the coin curved so that one side is concave and the other is convex and the probabilities could get even more imbalanced.

      With a random number generator, you can test its output for similar imbalances. Do you get a reasonably even distribution of values? Is there any inconsistancy in the way one value follows another? (Perhaps whenever the value 65535 comes up, the next value is always even.) Are there any longer term trends? Does the sequence of values match the decimal expansion of pi? (Any software based random number generator has the potential to be guessed exactly. If there is hardware involved, it might be predictable too, but there is at least the potential for it to be unpredictable.)