http://www.perlmonks.org?node_id=107530


in reply to Pi calculator

This is one method for testing your random number generator, too. I've seen checking code that along with distributions, chi-square, etc. also does this and sees if the value converges on the correct value. It's a very sensitive way of detecting biases.