10.8. Statistics¶
The numbers generated by random
are supposed to be distributed
uniformly. That means that each value in the range should be equally
likely. If we count the number of times each value appears, it should be
roughly the same for all values, provided that we generate a large
number of values.
In the next few sections, we will write programs that generate a sequence of random numbers and check whether this property holds true.
Before you keep reading...
Making great stuff takes time and $$. If you appreciate the book you are reading now and want to keep quality materials free for other students please consider a donation to Runestone Academy. We ask that you consider a $10 donation, but if you can give more thats great, if $10 is too much for your budget we would be happy with whatever you can afford as a show of support.