So I\'m testing an calculating the probabilities of certain dice rolls, for a game. The base case if that rolling one 10sided die.
I did a million samples of this,
I reran the OP's exercise with one billion iterations:
from collections import Counter
import random
n = 1000000000
c = Counter(random.randint(1, 10) for _ in xrange(n))
for i in range(1,11):
print '%2s %02.10f%%' % (i, c[i] * 100.0 / n)
Here's the (reformatted) result:
1 9.9996500000%
2 10.0011089000%
3 10.0008568000%
4 10.0007495000%
5 9.9999089000%
6 9.9985344000%
7 9.9994913000%
8 9.9997877000%
9 10.0010818000%
10 9.9988307000%
See the other answers to this question for their excellent analysis.