Uniform Distribution.

< List of probability distributions

uniform distribution U(a, b), also called a rectangular distribution, is defined by two parameters:

  • minimum, a.
  • maximum, b.
uniform distribution
The uniform distribution with a = 1 and b = 4.

The area under the curve of the uniform distribution is always equal to 1. In the above graph, the area is:
A = l x h = 3 * 0.333… = 1.

Continuous and Discrete Uniform Distribution

The continuous uniform distribution is shaped like a rectangle – like the example above. The discrete uniform distribution is also rectangular shaped, but a series of dots represents a known, finite number of outcomes.

A discrete uniform distribution.

As an example, one roll of a die roll has six possible outcomes: 1,2,3,4,5, or 6. There is an equal probability for each number (1/6).


The general formula for the probability density function (pdf) is:
f(x) = 1/ (B-A) for A ≤ x ≤B.

  • A, the location parameter, defines the center of the graph.
  • B, the scale parameter, stretches the graph on the x-axis.

Note: A and B shouldn’t be confused with lowercase (a, b), which refer to the interval (min, max).

The uniform cumulative distribution function adds up all of the probabilities and plots a linear graph:

CDF of a uniform distribution from a to b.

Expected Value &Variance

The expected value (or mean) of a uniform random variable X is:

E(X) = (1/2) (a + b)

or, equivalently:

E(X) = (b + a) / 2.

For example, with a = 2 and b = 4, the expected value is E(X) = (4 + 2) / 2 = 3.

The variance of a uniform random variable is:

Var(x) = (1/12)(b – a)2

For example, with a = 2 and b = 4, the variance is Var(x) = (1/12)(4 – 2)2 = 1/3.

3 responses to “Uniform Distribution.”