# Uniform Distribution.

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

• minimum, a.
• maximum, b.

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.

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).

## PDF and CDF

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:

## 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.”

1. […] digit (i.e., the digits 1 to 9) in a wide range of number collections doesn’t follow a uniform distribution as one would expect. Instead, the numbers follow the non-uniform Benford distribution, which is a […]

2. […] Uniform distribution: n = 1. […]

3. […] actuarial science, a de Moivre is another name for the uniform distribution. For example, the de Moivre distribution is often used in relation to the actuarial study of […]