The discrete uniform distribution assigns equal probability to each element of a finite nonempty set. It is also known as the "equally likely
outcomes" distribution. Let have
elements, where
is a positive integer,
and let
be the event consisting of its
th element. Then
|
(1)
| |||
|
(2)
| |||
|
(3)
| |||
|
(4)
|
so using
gives
|
(5)
|
Restricting the set to the set of positive integers 1, 2, ...,
, the probability distribution function and cumulative distributions
function for this discrete uniform distribution are therefore
|
(6)
| |||
|
(7)
|
for ,
...,
.
The discrete uniform distribution is implemented in the Wolfram Language as DiscreteUniformDistribution[1,
N
]
for
.
Its moment-generating function is
|
(8)
| |||
|
(9)
| |||
|
(10)
| |||
|
(11)
|
At ,
use the limiting value
. The moments about 0 are
|
(12)
|
so
|
(13)
| |||
|
(14)
| |||
|
(15)
| |||
|
(16)
|
and the moments about the mean are
|
(17)
| |||
|
(18)
| |||
|
(19)
|
The mean, variance, skewness, and kurtosis excess are
|
(20)
| |||
|
(21)
| |||
|
(22)
| |||
|
(23)
|
For ,
the variance is zero and the skewness
and kurtosis excess are undefined. The displayed
formulas for these two standardized quantities require
.
The mean deviation for the discrete uniform distribution on 1, 2, ..., is given by
|
(24)
|
To do the sum, consider separately the cases of odd and
even. For
odd,
|
(25)
| |||
|
(26)
| |||
|
(27)
| |||
|
(28)
|
Similarly, for even,
|
(29)
| |||
|
(30)
| |||
|
(31)
| |||
|
(32)
|
The complete solution is therefore
|
(33)
|
For ,
2, ..., the first few values are 0, 1/2, 2/3, 1, 6/5, 3/2, 12/7, ... (OEIS A086111
and A086112).