Discrete Uniform Distribution
Notation:
$X \sim \mathcal{U}(a, b)$
Probability Mass Function:
$$
P(X=x) = \begin{cases}
\frac{1}{n} & \text{for x} \in \{a, a+1, \dots , b\} \\
0 & \text{otherwise}
\end{cases}
$$
where:
- $a \le b$
- $a, b, x \in \mathbb{N}$
- $n=b-a+1$
Mean:
$\mathrm{E}[X]=\dfrac{a+b}{2}$
Variance:
$\mathrm{Var}[X]=\dfrac{n^2-1}{12}$
References:
-
Discrete Uniform Distribution - Wikipedia
-
Discrete Uniform Distribution - Wolfram MathWorld