A continuous random variable has a uniform distribution if all the values belonging to its support have the same probability density.
The uniform distribution is characterized as follows.
Definition Let be a continuous random variable. Let its support be a closed interval of real numbers:We say that has a uniform distribution on the interval if and only if its probability density function is
A random variable having a uniform distribution is also called a uniform random variable. Sometimes, we also say that it has a rectangular distribution or that it is a rectangular random variable.
To better understand the uniform distribution, you can have a look at its density plots.
The expected value of a uniform random variable is
It can be derived as follows:
The variance of a uniform random variable is
We can use the variance formula as follows:
The moment generating function of a uniform random variable is defined for any :
Using the definition of moment generating function, we getNote that the above derivation is valid only when . However, when :Furthermore, it is easy to verify thatWhen , the integral above is well-defined and finite for any . Thus, the moment generating function of a uniform random variable exists for any .
The characteristic function of a uniform random variable is
Using the definition of characteristic function, we obtainNote that the above derivation is valid only when . However, when :Furthermore, it is easy to verify that
The distribution function of a uniform random variable is
If , thenbecause can not take on values smaller than . If , thenIf , thenbecause can not take on values greater than .
This section shows the plots of the densities of some uniform random variables, in order to demonstrate how the uniform density changes by changing its parameters.
The following plot contains the graphs of two uniform probability density functions:
the first graph (red line) is the probability density function of a uniform random variable with support ;
the second graph (blue line) is the probability density function of a uniform random variable with support .
The two random variables have different supports, but their two supports have the same length. Therefore, since the uniform density is constant and inversely proportional to the length of the support, the two random variables have the same constant density over their respective supports.
The following plot contains the graphs of two uniform probability density functions:
the first graph (red line) is the probability density function of a uniform random variable with support ;
the second graph (blue line) is the probability density function of a uniform random variable with support .
The two random variables have different supports, and the length of is twice the length of . Therefore, since the uniform density is constant and inversely proportional to the length of the support, the second random variable has a constant density which is half the constant density of the first one.
Below you can find some exercises with explained solutions.
Let be a uniform random variable with support Compute the following probability:
We can compute this probability by using the probability density function or the distribution function of . Using the probability density function, we obtainUsing the distribution function, we obtain
Suppose the random variable has a uniform distribution on the interval . Compute the following probability:
This probability can be easily computed by using the distribution function of :
Suppose the random variable has a uniform distribution on the interval . Compute the third moment of , that is,
We can compute the third moment of by using the transformation theorem:
Most of the learning materials found on this website are now available in a traditional textbook format.