It's a fun little visualization but it's also worth noting that a chi square test would achieve the same result but in a much more quantitative manner. Using his example, we'll generate N integers ranging from 0-9. Let n(0) denote the number of 0's we get, n(1) the number of 1's, and so on. Then our expected value for n(0) is N/10 and likewise for each of the other n(i). The distribution of n(0) will be Gaussian for sufficiently large N and the standard deviation will be sqrt(N/10). Then if we take the sum over i from 0 to 9 of [(n(i)-N/10)^2]10/N and call this quantity Q then it can be shown that Q will follow a chi-square distribution with k=9 degrees of freedom (one less than ten because the tenth is determined by N and the other 9). If we then take [(Q/k)-1]/sqrt(2k) then this tells us how many standard deviations away from our expected chi-square value we fall. If there's a mistake with the distribution of numbers then the number of standard deviations will tend to drift farther and farther from 0 as N gets bigger, a rule of thumb being that if you're more than two or three sigma out you might want to run a few more times to double check and if you fall five or more sigmas out then there's most probably a mistake in your algorithm.<p>EDIT: I tried to figure out how to make an asterisk and not just <i>italics</i> but couldn't do it.