For a<ba<b, the uniform distribution on the interval [a,b][a,b], written Unif[a,b]\operatorname{Unif}[a,b], is the with

f(x)=1ba1[a,b](x)f(x)=\frac{1}{b-a}\mathbf 1_{[a,b]}(x)

with respect to .

Properties

If XUnif[a,b]X\sim\operatorname{Unif}[a,b], then E[X]=(a+b)/2\mathbb E[X]=(a+b)/2 and Var(X)=(ba)2/12\operatorname{Var}(X)=(b-a)^2/12. The phrase “uniform distribution” can also refer to the uniform probability measure on a finite set; that discrete convention is stated when needed.

References
  1. Geoffrey Grimmett and David Stirzaker, Probability and Random Processes, 3rd ed., Oxford University Press, 2001, §3.4.