Hacker News new | ask | show | jobs
by adium 3585 days ago
The first two times I ran it I got 0.298 and 0.286. Out of 20 attempts 5 were below 30%.
1 comments

1000 is a pretty small number of trials. Also note the docs on random.shuffle:

Note that for even rather small len(x), the total number of permutations of x is larger than the period of most random number generators; this implies that most permutations of a long sequence can never be generated.[1]

I don't know if we have any reason to believe that the small subset of all permutations that this library can generate is unbiased in terms of the size of the cycles.

https://docs.python.org/2/library/random.html#random.shuffle