A continuous r.v. has the Uniform distribution on interval if the PDF of is constant over and equals . We write .

  • The PDF is zero for any other intervals outside of .
  • We know the PDF has to integrate to 1, so this is one way we can calculate the PDF in case we forget.

Finding the CDF is also easy since the PDF is uniform over its interval. We have three cases:

Showing the general expectation and variance

While we could integrate over the PDF to find the variance and then use LOTUS to help get the variance, we can also perform a location-scale transformation: if , then let . We can show that as well because it has the same CDF.

By LOE, the Expectation is given by .

Using the definition of Variance, we have .


To calculate the MGF, apply LOTUS. We have

for . Notice that .

Standard Uniform distribution

Suppose . Then we have the following properties.

  • The PDF is given by . In other words, for all .
  • Then the expectation is given by
  • Using LOTUS, we have , and by the definition of variance, we have .

Universality of the Uniform

The fact that standard Uniform distributions are defined so nicely between gives us two nice results (given we meet some requirements, see below).

  1. We can start with a and transform into a r.v. that has any continuous distribution. This is called inverse transform sampling and is commonly use to generate pseudorandom numbers (e.g. sampling rays to calculate the LTE).
  2. We can also start with any continuous r.v. and transform it into a r.v. . This is called the probability integral transform.

In particular, let be a CDF that is strictly increasing on the support of its r.v.

  • Then, is a 1-to-1 function that maps the support to a value between . Furthermore, maps to .
  • This allows us to create a r.v. that has a CDF .

We can also do it in reverse: let be a r.v. with a continuous CDF that is strictly increasing on the support of . Then, the r.v. has the distribution.

  • Remember that is a transformation of random variables. We map the support of to using function , which is also the CDF of .