Discrete Uniform Distribution

A discrete random variable taking values in a finite set follows the Discrete Uniform distribution with integer endpoints , if every outcome in the set is equally likely. Formally, the Discrete Uniform distribution of a random variable is given by the probability mass function

so that each of the possible values has the same probability .

The cumulative distribution function of is

which increases in equal steps of size at each integer.

The Discrete Uniform distribution models outcomes of experiments with finite, equally likely results—die rolls, random selection from a list, or any scenario where no outcome is preferred over another. It is the discrete analogue of the Continuous Uniform distribution.

Special cases:

  • If and , then is equivalent to a Bernoulli trial with (a fair coin flip).

  • If and , then models the outcome of rolling a fair -sided die.

Uniformity and Independence , then each die is uniform, but the sum is not uniform—it follows a triangular distribution on with mode at .

Uniformity of a single random variable says nothing about joint behavior. If

Intuition

The Discrete Uniform distribution encodes maximum ignorance over a finite set of outcomes. When you have no reason to believe any value in is more likely than any other, the Discrete Uniform is the natural choice. It assigns equal probability to every outcome, making it the discrete version of “I don’t know, so I’ll treat everything the same.”

This makes it the starting point for many counting arguments in combinatorics and probability: if all outcomes in a sample space are equally likely, then , which is precisely the Discrete Uniform assumption at work.

Properties

(Mean) .

The mean is the midpoint of the support, which follows from symmetry: values below the midpoint are balanced exactly by values above it.

(Variance) , where .

\text{Var}(X) &= \mathbb{E}[X^2] - \mathbb{E}[X]^2 = \frac{1}{n}\sum_{k=a}^{b}k^2 - \left(\frac{a+b}{2}\right)^2. \end{align}$$ Using the identity $\sum_{k=1}^{n}k^2 = \frac{n(n+1)(2n+1)}{6}$ and shifting indices, this simplifies to $\frac{n^2-1}{12}$. #### (*MGF*) $\mathbb{E}[e^{tX}] = \dfrac{e^{ta} - e^{t(b+1)}}{(b-a+1)(1 - e^t)}$ for $t \neq 0$. This follows from summing the geometric series $\sum_{k=a}^{b} e^{tk}$. #### (*Symmetry*) The distribution is symmetric about its mean $(a+b)/2$. That is, $p_X(a + k) = p_X(b - k)$ for all valid $k$. #### (*Entropy*) Among all discrete distributions on $n$ outcomes, the Discrete Uniform has **maximum entropy** $H(X) = \log n$. This formalizes the intuition that it represents the state of greatest uncertainty. # Examples >[!example] Rolling a Fair Die > >Let $X \sim \text{DUnif}(1, 6)$ represent the outcome of rolling a standard fair die. >>[!example]- What is $\mathbb{P}(X \geq 4)$ and $\mathbb{E}[X]$? >>Since every face has probability $1/6$, we have >>$$\mathbb{P}(X \geq 4) = \mathbb{P}(X = 4) + \mathbb{P}(X = 5) + \mathbb{P}(X = 6) = \frac{3}{6} = \frac{1}{2}.$$ >>The expected value is >>$$\mathbb{E}[X] = \frac{1 + 6}{2} = 3.5,$$ >>and the variance is $\text{Var}(X) = \frac{6^2 - 1}{12} = \frac{35}{12} \approx 2.92$. >[!example] Random Selection and Conditioning > >A number $X$ is chosen uniformly at random from $\{1, 2, \dots, 100\}$, so $X \sim \text{DUnif}(1, 100)$. >>[!example]- Given that $X$ is even, what is the conditional distribution of $X$? >>The even numbers in $\{1, \dots, 100\}$ form the set $\{2, 4, 6, \dots, 100\}$, which has $50$ elements. Since $X$ was originally uniform over $100$ values, each even value is equally likely given the event $A = \{X \text{ is even}\}$: >>$$p_{X \mid A}(x) = \frac{p_X(x)}{\mathbb{P}(A)} = \frac{1/100}{50/100} = \frac{1}{50}, \qquad x \in \{2, 4, \dots, 100\}.$$ >>So $X \mid A$ is uniform over the $50$ even values. The conditional mean is >>$$\mathbb{E}[X \mid A] = \frac{2 + 100}{2} = 51,$$ >>which is slightly above the unconditional mean of $50.5$ because the even subset is shifted upward (it starts at $2$ rather than $1$).