## The mean and variance of the discrete uniform distribution

### The discrete uniform distribution

The uniform discrete distribution has range of n points in [a, b], or

Each point has a uniform pmf (probability mass function)

where

### Mean of the discrete uniform distribution

Let us compute the mean and variance. Intuitively, we feel that the mean is at the

midpoint We shall see that this intuition is correct.

But is just a sum of an arithmetic progression where the start value

and the last value is with common difference of 1. The sum is then

from which the mean or expectation is computed to b be

.

### The variance of the uniform discrete distribution.

Let us first translate the random variable range from [a,b] to the range[1,n]. Then we know that the variance is not affected by the translation.

Here we used the fact that and . These formulas are well known.

Substituting in the above formula yields

To recap: The mean and variance of a random variable X with domain

are given by

March 23rd, 2012 at 4:58 pm

I think the proof is not general because we cannot say that

\Sum_{x=0}^{n} x^2 = \Sum_{x=a}^{b} x^2

even if n = b - a + 1

From summation identities, we have

\Sum_{x=a}^{b} x^2 = \Sum_{x=0}^{b-a} (x+a)^2

March 23rd, 2012 at 5:53 pm

Thanks Rasoul, I will review this article when I have the time.