I have used programming languages which generate a random number in a given range.

Let's say we have a range of 1 to 10 each number has the probability of 1/10 to get selected. What is the criteria on the basis of which a random number is selected with uniform probability by a programming language.

  • 5
    $\begingroup$ I don’t understand your question. Are you asking how to convert the random bits generated by a PRNG to a uniform number from 1 to 10? $\endgroup$ – Yuval Filmus Feb 5 '19 at 7:02
  • 1
    $\begingroup$ @Yuval_Filmus I think he is asking how to prove the uniformity of a generator. $\endgroup$ – Optidad Feb 5 '19 at 12:50