# Proof: Probability mass function of the discrete uniform distribution

**Index:**The Book of Statistical Proofs ▷ Probability Distributions ▷ Univariate discrete distributions ▷ Discrete uniform distribution ▷ Probability mass function

**Theorem:** Let $X$ be a random variable following a discrete uniform distribution:

Then, the probability mass function of $X$ is

\[\label{eq:duni-pmf} f_X(x) = \frac{1}{b-a+1} \quad \text{where} \quad x \in \left\lbrace a, a+1, \ldots, b-1, b \right\rbrace \; .\]**Proof:** A discrete uniform variable is defined as having the same probability for each integer between and including $a$ and $b$. The number of integers between and including $a$ and $b$ is

and because the sum across all probabilities is

\[\label{eq:1} \sum_{x=a}^{b} f_X(x) = 1 \; ,\]we have

\[\label{eq:duni-pmf-qed} f_X(x) = \frac{1}{n} = \frac{1}{b-a+1} \; .\]**∎**

**Sources:**

**Metadata:**ID: P140 | shortcut: duni-pmf | author: JoramSoch | date: 2020-07-28, 04:57.