Discrete Uniform Distribution#

Univariate, Discrete, Bounded

The Discrete Uniform distribution is a probability distribution where each integer value between lower and upper (inclusive) has the same probability. This distribution is characterized by two parameters: lower and upper, defining the range of integers.

A simple example of the Discrete Uniform distribution is rolling a fair six-sided die, where each face has an equal probability of 1/6.

Key properties and parameters#

Support

\(x \in \{ \text{lower}, \text{lower} + 1, \ldots, \text{upper} \}\)

Mean

\(\dfrac{\text{lower} + \text{upper}}{2}\)

Variance

\(\dfrac{(\text{upper} - \text{lower} + 1)^2 - 1}{12}\)

Parameters:

  • lower : (int) Lower bound of the distribution.

  • upper : (int) Upper bound of the distribution, \(\text{upper} \geq \text{lower}\).

Probability Mass Function (PMF)#

\[ f(x \mid lower, upper) = \frac{1}{upper-lower+1} \]
Discrete Uniform Distribution PMF

Cumulative Distribution Function (CDF)#

\[ F(x \mid lower, upper) = = \frac{x - lower + 1}{upper - lower + 1} \]
Discrete Uniform Distribution CDF

See also

Common Alternatives:

  • Categorical - The Discrete Uniform distribution is a special case of the Categorical distribution where all elements of \(p\) are equal.

Related Distributions:

  • Uniform - The continuous version of the Discrete Uniform distribution.

References#