Most functions that generate random numbers are described as:
Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive)
If I use it to generate a number in the range [0..9]
, does uniformly distributed mean that the probability for 3
and 8
is the same?
As I understand it, if I run the function a sufficient number of times, I'll have the same number of occurrences for each number, 0 through 9. Is this correct?
Alternatively, would we instead have a normal distribution where we would get more occurrences of the numbers 4, 5, and 6, as they are closer to the mean and hence have a higher probability of occurring?