Compute the variance of the exponential density function .

The variance requires us to compute

Using integration by parts, with

we find

This second integral can be done with integration by
parts again, or we can use the fact that this is almost the integral for
the expectation. Namely, we know

and so by dividing through by , we have

Putting this together, we have

Finally, then, the variance is

Find the expectation of , where is uniformly distributed on the interval .

Recall that the PDF associated with is given by for . Thus, the mean is given by