3.2 Discrete Uniform Distribution
3.2.1 Main Idea
The discrete uniform distribution applies when a random variable has a finite number of possible values and every value is equally likely.
Suppose
and all \(n\) values are equally likely. Then
Note
Discrete Uniform Distribution
The word uniform means that the probability is distributed equally over all possible values.
A discrete uniform PMF therefore has the same probability height at every allowed value. The possible values remain separate points, but none is more likely than another.
In the figure, each possible value receives the same probability \(1/(b-a+1)\). This equal-height pattern is the defining graphical feature of a discrete uniform distribution.
3.2.2 Example 1: Random Digit
Suppose one digit is selected at random from
Let \(X\) be the selected digit. There are
possible values and each is equally likely, so
The PMF therefore has the same height at every possible value.
3.2.3 Consecutive Integer Values
A common discrete uniform model uses consecutive integers
The number of possible values is
Therefore,
The formulas for the mean and variance can be derived directly from this PMF.
3.2.4 Deriving the Mean
For any discrete random variable,
For a discrete uniform random variable on \(\{a,a+1,\ldots,b\}\), every value has probability \(1/n\). Therefore,
To evaluate the sum, recall
Hence,
Using the sum-of-integers identity,
Substitute this into the expectation:
Expand the numerator:
Factor:
Because
we obtain
Thus,
Note
Mean of a Discrete Uniform Distribution
The mean is halfway between the smallest and largest possible values. This can also be interpreted as a balance point. Because all values carry equal probability weight, the loading is symmetric around the midpoint.
For a fair die, the equal probability weights at \(1,2,3,4,5,6\) balance at \(3.5\). The expected value does not need to be one of the possible outcomes; it represents the center of the probability loading.
3.2.5 Deriving the Variance
For a discrete random variable,
We already know
Therefore, we first derive \(E(X^2)\).
Because every value has probability \(1/n\),
Recall the sum-of-squares identity
Therefore,
Applying the identity gives
Hence,
Now substitute \(E(X^2)\) and \(E(X)=(a+b)/2\) into the variance formula:
Using \(n=b-a+1\) and simplifying the algebra gives
Since \(n=b-a+1\), this can also be written as
Thus,
Note
Variance and Standard Deviation
and
3.2.6 Example 2: Rolling a Fair Die
Roll one fair six-sided die and let
Then
so
Each value has probability
The PMF is flat because every die face is equally likely.
The six equal bars make the uniform assumption visible: changing the value of \(x\) from 1 to 6 does not change \(P(X=x)\).
Mean
Using the discrete-uniform mean formula,
The same result can be checked directly from the PMF:
Variance
Using \(n=6\),
The same result can also be obtained from \(E(X^2)-[E(X)]^2\):
Therefore,
Standard deviation
The expected outcome is 3.5. The standard deviation indicates that outcomes typically vary from this center by about 1.71 units.
For example,
3.2.7 When Should We Use It?
Use a discrete uniform model when:
there is a finite set of possible values;
each possible value has the same probability.
Typical examples include:
one fair die;
a randomly selected digit;
a randomly selected numbered tag;
one randomly selected integer from a specified finite set.
Do not use a discrete uniform distribution merely because the possible values are equally spaced.
Equal spacing does not imply equal probability.
3.2.8 Quick Practice
A box contains five tags labeled
One tag is selected at random and each tag is equally likely. Let \(X\) be the number on the selected tag.
Find:
\(P(X=4)\);
\(P(X>4)\);
\(E(X)\); and
\(\operatorname{Var}(X)\).
Answer
There are five equally likely values, so
For \(X>4\), the favorable values are 5 and 6:
Here,
Thus,
and
3.2.9 Common Mistakes
A common mistake is to assume that every discrete variable is uniform.
For two coin tosses, the number of heads has possible values \(0,1,2\), but their probabilities are not equal.
Another mistake is to count the integers from \(a\) through \(b\) as \(b-a\). Because both endpoints are included, the correct number is
When deriving the variance, do not forget that
not \(E(X^2)-E(X)\).
3.2.10 Summary
For a discrete uniform random variable on the consecutive integers
there are
possible values, each with probability
The mean is
The variance is
The standard deviation is
The key modeling question is:
Are all possible values equally likely?