The uniform distribution on the interval [a,b] is the continuous probability distribution whose probability density function f is given by f(x) = 1/(b − a), where a ≤ x ≤ b. It has mean (a + b)/2 and variance (b − a)2/12. There is also a discrete form: on the set 1, 2, …, n, it is the probability distribution whose probability mass function is given by Pr(X = r) = 1/n, for 1 ≤ r ≤ n. For example, the random variable for the winning number in a lottery has a uniform distribution on the set of all the numbers entered in the lottery.