← 1. Continuous Random Variables Section 2 Exercises 3. Exponential, Normal, and Beta Distributions → All online text Español
Applied calculus on-line chapter: calculus applied to probability and statistics
Section 2. Probability Density Functions and the Uniform Distribution

We have seen that a histogram is a convenient way to picture the probability distribution associated with a continuous random variable X and that if we use subdivisions of 1 unit, the probability P(c \leq X \leq d) is given by the area under the histogram between X = c and X = d. But we have also seen that it is difficult to calculate probabilities for ranges of X that are not a whole number of subdivisions. To motivate the solution to this problem, let us look at the following example, based on Example 2 in Section 1:

Example 1 Car Rentals

Top of Page

Example 1 motivates the following:

Probability Density Function

A probability density function is a function f defined on an interval (a, b) and having the following properties.

    (a) f(x) \geq 0 for every x

    (b) \displaystyle \int_a^b f(x)\ dx = 1

We allow a, b, or both to be infinite, as in the above example. This would make the integral in (b) an improper one.

Using a Probability Density Function to Compute Probability

A continuous random variable X admits a probability density function f if, for every c and d,

    \displaystyle P(c \leq X \leq d) = \int_c^d f(x)\ dx.  

Example Let f(x) = \frac{2}{x^2} on the interval [a, b] = [1, 2]. Then property (a) holds, since \frac{2}{x^2} is positive on the interval [1, 2]. For property (b),

    \int_a^b f(x)\ dx = \int_1^2\frac{2}{x^2}\ dx = \Bigl[-\frac{2}{x}\Bigr]_1^2 = -1 + 2 = 1

If X admits this probability density function, then

    P(1.5 \leq X \leq 2) =        

Note If X admits a probability density function f, then

showing that there is a zero probability that X will assume any specified value.

Top of Page

Example 2 Normalizing

Top of Page

Uniform Density Function

A uniform density function f is a density function that is constant, making it the simplest kind of density function. Since we require f(x) = k for some constant k, requirement (b) in the definition of a probability density function tells us that

Thus we must have

In other words, a uniform density function must have the following form.

Uniform Density Function

The uniform density function on the interval \pmb{[a, b]} is the constant function defined by

    f(x) = \frac{1}{b-a}.

Its graph is a horizontal line:

If a random variable X admits a uniform density function, we say that X is uniformly distributed, or that X has the uniform distribution.

Calculating Probability with a Uniform Density Function

Because probability is given by area, it is not hard to compute probabilities based on a uniform distribution:

P(c \leq X \leq d) = \text{ Area of shaded rectangle } = \frac{d-c}{b-a}

Let X be a random real number between 0 and 5. Then X has a uniform distribution given by

    f(x) = \frac{1}{5-0} = \frac{1}{5}
    P(2 \leq X \leq 4.5) =          

Example 3 Spinning a Dial

Top of Page

Last Updated: March, 2008
Web materials copyright © 2008 Stefan Waner