4.3 Uniform Distributions
4.3 Uniform Distributions
3: Uniform Distributions
Definition 4.3.1
A random variable X has a uniform distribution on interval [a, b], write X ∼ uniform[a, b] , if it has pdf given by
1
, for a ≤ x ≤ b
b−a
f (x) = {
0, otherwise
The uniform distribution is also sometimes referred to as the box distribution, since the graph of its pdf looks like a box. See
Figure 1 below.
Exercise 4.3.1
Verify that the uniform pdf is a valid pdf, i.e., show that it satisfies the first three conditions of Definition 4.1.1.
Answer
1. In looking either at the formula in Definition 4.3.1 or the graph in Figure 1, we can see that the uniform pdf is always
non-negative, i.e., f (x) ≥ 0 , for all x ∈ R .
2. Given that the uniform pdf is a piecewise constant function, it is also piecewise continuous.
3. Finally, we need to verify that the area under the uniform pdf is equal to 1. This is quickly seen from the graph in Figure
1, since we calculate the area of rectangle with width (b − a) and height 1/(b − a) . Thus, the area is
1
(b − a) × = 1.
(b − a)
A typical application of the uniform distribution is to model randomly generated numbers. In other words, it provides the
probability distribution for a random variable representing a randomly chosen number between numbers a and b .
The uniform distribution assigns equal probabilities to intervals of equal lengths, since it is a constant function, on the interval it is
non-zero [a, b]. This is the continuous analog to equally likely outcomes in the discrete setting.
We close the section by finding the expected value of the uniform distribution.
Example 4.3.1
If X has a uniform distribution on the interval [a, b], then we apply Definition 4.2.1 and compute the expected value of X:
4.3.1 https://stats.libretexts.org/@go/page/3269
b
2 2
1 b −a 1 (b − a)(b + a) 1 b +a
E[X] = ∫ x ⋅ dx = ⋅ = ⋅ = .
b −a 2 b −a 2 b −a 2
a
Thus, the expected value of the uniform[a, b] distribution is given by the average of the parameters a and b , or the midpoint of the
interval [a, b]. This is readily apparent when looking at a graph of the pdf in Figure 1 and remembering the interpretation of
expected value as the center of mass. Since the pdf is constant over [a, b], the center of mass is simply given by the midpoint.
This page titled 4.3: Uniform Distributions is shared under a not declared license and was authored, remixed, and/or curated by Kristin Kuter.
4.3.2 https://stats.libretexts.org/@go/page/3269