Two random number generators with uniform distributions having min, max as (0,8) The first generates all integers between 0 and 8 uniformly. But the second generates only [0,2,4,6,8] uniformly.

What is the difference between the second generator and the first? Smaller range, but scaled up? A discrete vs. continuous distribution? Higher variance? How would one model the second distribution?

  • $\begingroup$ Could you explain what you mean by "model" a distribution? $\endgroup$ – whuber Apr 25 '13 at 0:13
  • $\begingroup$ Wouldn't the second distribution be just a multinomial distribution? $\endgroup$ – Robert Smith Apr 25 '13 at 4:14

They are both discrete uniform distributions. That is they both have constant probabilities for a finite number of values ($P(X=c) =1/k$ where $k$ is the number of values the variable can take and $c$ is a possible value of $X$.) They both have the same range and mean.

They have a different $k$ (i.e., number of values the variable can take).

A common representation of discrete uniform variables is $[1, 2, ..., n]$. Thus, $[0,1,..., 8]$ is just $[1,2,...,9] - 1$, and $[0, 2, ..., 8]$ is just $2 \times ([1,2,3,4,5] - 1)$

$[0,2,4,6,8]$ has larger variance. The variance of a $[1,2,3,...,n]$ uniform variable is $\frac{n^2 - 1}{12}$. Thus, the variance of $[0,1,...,8]$ is $\frac{9^2 - 1}{12} \approx 6.66$. The variance of $[0,2,4,6,8]$ is just $\textrm{Var}(2(X - 1)))$ where $X$ is $[1,2,3,4,5]$ which is $2^2 \times \textrm{Var}(X) = 4 \times \frac{5^2 - 1}{12} = 4 \times 2 = 8$.


The second generator is somewhat unusual, so I don't think it has its own name. Your first suggestion seems accurate but rather indirect, your second description is wrong as both are discrete, your third description does not really capture the key difference.

I would just say they are both samples from a multinomial distribution. The first draws from values [0,1,2,3,4,5,6,7,8] with probabilities 1/9 while the second draws from values [0,2,4.6,8] with probabilities 1/5.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.