Uniform distribution

A continuous random variable x is said to be evenly distributed over the interval [a; b] if it possesses the probability density of

  1 / (b – a), if a <= x <= b

f(x) =

 
  0, otherwise

This means that the probability P(X) of a certain event X : x <= X < x+dx occurs, is

P[x <= X < x+dx] = 1 / (b - a) dx.

The expected value is calculated as E(X) = (a + b) / 2. It can be mathematically proven that these calculations apply not only for continuous random variables but they are pretty much true for discrete random variables as well.

Reference: Christian Schiestl, Pseudozufallszahlen in der Kryptographie, in Klagenfurt, 1999.

See: Uniformly distributed random sequences.