Virtual Laboratories > Distributions > 1 [2] 3 4 5 6 7 8 9

2. Continuous Distributions


Continuous Distributions

As usual, suppose that we have a random experiment with a sample space and a probability measure P. A random variable X taking values in a subset S of Rn is said to have a continuous distribution if

P(X = x) = 0 for each x in S.

The fact that X takes any particular value with probability 0 might seem paradoxical at first, but conceptually it is the same as the fact that an interval of R can have positive length even though it is composed of points each of which has 0 length. Similarly, an region of R2 can have positive area even though it is composed of points (or curves) each of which has area 0.

Mathematical Exercise 1. Show that if C is a countable subset of S, then P(X in C) = 0.

Thus, continuous distributions are in complete contrast with discrete distributions, for which all of the probability mass is concentrated on a discrete set. For a continuous distribution, the probability mass is continuously spread over S. Note also that S itself cannot be countable.

Densities for a Continuous Distribution

Suppose again that X has a continuous distribution on a subset S of Rn. A real-valued function f defined on S is said to be a probability density function for X if f satisfies the following properties:

  1. f(x) gteq.gif (844 bytes) 0 for x in S.
  2. integralS f(x)dx = 1.
  3. integralA f(x)dx = P(X in A) for A subsetS.

If n > 1, the integrals in properties (b) and (c) are multiple integrals over subsets of Rn, and

dx = dx1 dx2 ··· dxn where x = (x1, x2, ..., xn).

In fact, technically, f is the density of X relative to n-dimensional measure mn, which we recall is given by

mn(A) = integralA 1dx for A subsetRn.

Note that mn(S) must be positive (perhaps infinite). In particular,

  1. if n = 1, S must be a subset of R with positive length;
  2. if n = 2, S must be a subset of R2 with positive area;
  3. if n = 3, S must be a subset of R3 with positive volume.

However, we recall that except for exposition, the low dimensional cases (n = 1, 2, 3) play no special role in probability. Interesting random experiments almost always involve several random variables (that is, a random vector); seldom do we have a single, isolated random variable. Finally, note that we can always extend f to a density on all of Rn by defining f(x) = 0 for x not in S. This extension sometimes simplifies notation.

Property (c) is particularly important since it implies that the probability distribution of X is completely determined by the density function. Conversely, any function that satisfies properties (a) and (b) is a probability density function, and then property (c) can be used to define a continuous distribution on S.

An element x in S that maximizes the density f is called a mode of the distribution. If there is only one mode, it is sometimes used as a measure of the center of the distribution.

Unlike the discrete case, the density function of a continuous distribution is not unique. Note that the values of f on a finite (or even countable) set of points could be changed to other nonnegative values, and properties (a), (b), and (c) would still hold. The key fact is that only integrals of f are important. Another difference is that f(x) can be larger than 1; indeed, f can be unbounded on S. Keep in mind that f(x) is not a probability; it is a probability density: f(x)dx is approximately the probability that X is in an n-dimensional box at x with side lengths dx1, ..., dxn, if these side lengths are small.

Examples

Mathematical Exercise 2. Let f(t) = r exp(-rt) for t > 0, where r > 0 is a parameter. Show that f is a probability density function.

The distribution defined by the density function in the previous exercise is called the exponential distribution with rate parameter r. This distribution is frequently used to model random times, under certain assumptions. The exponential distribution is studied in detail in the chapter on Poisson Processes.

Mathematical Exercise 3. The lifetime T of a certain device (in 1000 hour units) has the exponential distribution with parameter 1/2. Find P(T > 2).

Simulation Exercise 4. In the exponential experiment, set r = 1/2. Run the simulation 1000 times, updating every 10 runs, and note the apparent convergence of the empirical density function to the true density function.

Mathematical Exercise 5. In Bertrand's problem, a certain random angle A has density function f(a) = sin(a), 0 < a < pi / 2.

  1. Show that f really is a density function.
  2. Graph f and identify the mode.
  3. Find P(A < pi / 4).

Simulation Exercise 6. In Bertrand's experiment, select the model with uniform distance. Run the simulation 200 times, updating every run, and compute the empirical probability of the event {A < pi / 4}. Compare with the true probability in the previous exercise.

Mathematical Exercise 7. Let gn(t) = exp(-t) tn / n! for t > 0 where n is a nonnegative integer parameter.

  1. Show that gn is a probability density function for each n.
  2. Show that gn(t) is increasing for t < n and decreasing for t > n, so that the mode occurs at t = n.

Remarkably, we showed in the last section on discrete distributions, that ft(n) = gn(t) is a density function on the nonnegative integers for each t > 0. The distribution defined by the density gn is the gamma distribution; n + 1 is called the shape parameter. The gamma distribution is studied in detail in the chapter on Poisson Processes.

Mathematical Exercise 8. Suppose that the lifetime of a device T (in 1000 hour units) has the gamma distribution with n = 2. Find P(T > 3).

Simulation Exercise 9. In the gamma experiment, set r = 1 and k = 3. Run the experiment 200 times, updating every run. Compute the empirical probability of the event {T > 3} and compare with the theoretical probability in the previous exercise.

Constructing Densities

Mathematical Exercise 10. Suppose that g is a nonnegative function on S. Let

c = integralS g(x)dx.

Show that if c is positive and finite, then f(x) = g(x) / c for x in S defines a probability density function on S.

Note that the graphs of g and f look the same, except of a change of scale on the vertical axis. Thus, the result in the last exercise can be used to construct density functions with desired properties (domain, shape, symmetry, and so on). The constant c is sometimes called the normalizing constant.

Mathematical Exercise 11. Let g(x) = x2(1 - x) for 0 < x < 1.

  1. Sketch the graph of g.
  2. Find the probability density function f proportional to g.
  3. Find P(1/2 < X < 1) where X is a random variable with the density in (b).

The distribution defined in the last exercise is an example of a beta distribution.

Mathematical Exercise 12. Let g(x) = 1 / xa for x > 1, where a > 0 is a parameter.

  1. Sketch the graph of g.
  2. For 0 < a <= 1, show that there is no probability density function proportional to g.
  3. For a > 1, show that the normalizing constant is 1 / (a - 1)..

The distribution defined in the last exercise is known as the Pareto distribution with shape parameter a.

Mathematical Exercise 13. Let g(x) = 1 / (1 + x2) for x in R.

  1. Sketch the graph of g.
  2. Show that the normalizing constant is pi.
  3. Find P(–1 < X < 1) where X has the density function proportional to g.

The distribution defined in the last exercise is known as the Cauchy distribution, named after Augustin Cauchy. It is a member of the Student t family of distributions.

Simulation Exercise 14. In the random variable experiment, select the student t distribution. Set n = 1 to get the Cauchy distribution. Run the simulation 1000 times, updating every 10 runs. Note how well the empirical density function fits the true density function.

Mathematical Exercise 15. Let g(z) = exp(-z2 / 2).

  1. Sketch the graph of g.
  2. Show that the normalizing constant is (2pi)1/2. Hint: If c denotes the normalizing constant, express c2 has a double integral and convert to polar coordinates.

The distribution defined in the last exercise is the standard normal distribution, perhaps the most important distribution in probability.

Simulation Exercise 16. In the random variable experiment, select the normal distribution (the default parameters give the standard normal distribution). Run the simulation 1000 times, updating every 10 runs. Note how well the empirical density function fits the true density function.

Mathematical Exercise 17. Let f(x, y) = x + y for 0 < x < 1, 0 < y < 1.

  1. Show that f is a probability density function
  2. Find P(Y > 2X) where (X, Y) has the density in (a).

Mathematical Exercise 18. Let g(x, y) = x + y for 0 < x < y < 1.

  1. Find the probability density function f that is proportional to g.
  2. Find P(Y > 2X) where (X, Y) has the density in (a).

Mathematical Exercise 19. Let g(x, y) = x2y for 0 < x < 1, 0 < y < 1.

  1. Find the probability density function f that is proportional to g.
  2. Find P(Y > X) where (X, Y) has the density in (a).

Mathematical Exercise 20. Let g(x, y) = x2y for 0 < x < y < 1.

  1. Find the probability density function f that is proportional to g.
  2. Find P(Y > 2X) where (X, Y) has the density in (a).

Mathematical Exercise 21. Let g(x, y, z) = x + 2y + 3z for 0 < x < 1, 0 < y < 1, 0 < z < 1.

  1. Find the probability density function f that is proportional to g.
  2. Find P(X < Y < Z) where (X, Y, Z) has the density in (a).

Continuous Uniform Distributions

The following exercises describe an important class of continuous distributions.

Mathematical Exercise 22. Suppose that S is a subset of Rn with positive, finite measure mn(S). Show that

  1. f(x) = 1 / mn(S) for x in S defines a probability density function on S.
  2. P(X in A) = mn(A) / mn(S) for A subsetS if X has the density function in (a).

A random variable X with the density function in Exercise 14 is said to have the continuous uniform distribution on S. The uniform distribution on a rectangle in the plane plays a fundamental role in Geometric Models.

Mathematical Exercise 23. Suppose that (X, Y) is uniformly distributed on the square S = (-6, 6)2. Find P(X > 0, Y > 0).

Simulation Exercise 24. In the bivariate uniform experiment, select square in the list box. Run the simulation 100 times, updating every run. Watch the points in the scatter plot. Compute the empirical probability of the event {X > 0, Y > 0} and compare with the true probability.

Mathematical Exercise 25. Suppose that (X, Y) is uniformly distributed on the triangle S = {(x, y): -6 < y < x < 6}. Find P(X > 0, Y > 0)

Simulation Exercise 26. In the bivariate uniform experiment, select triangle in the list box. Run the simulation 100 times, updating every run. Watch the points in the scatter plot. Compute the empirical probability of the event {X > 0, Y > 0} and compare with the true probability.

Mathematical Exercise 27. Suppose that (X, Y) is uniformly distributed on the circle S = {(x, y): x2 + y2 < 36}. Find P(X > 0, Y > 0).

Simulation Exercise 28. In the bivariate uniform experiment, select circle in the list box. Run the simulation 100 times, updating every run. Watch the points in the scatter plot. Compute the empirical probability of the event {X > 0, Y > 0} and compare with the true probability.

Mathematical Exercise 29. Suppose that (X, Y, Z) is uniformly distributed on the cube (0, 1)3. Find P(X < Y < Z)

  1. Using the density function.
  2. Using a combinatorial argument. Hint: Argue that each of the 6 permutations of (X, Y, Z) should be equally likely.

Mathematical Exercise 30. The time T (in minutes) required to perform a certain job is uniformly distributed over the interval (15, 60).

  1. Find the probability that the job requires more than 30 minutes
  2. Given that the job is not finished after 30 minutes, find the probability that the job will require more than 15 additional minutes.

Conditional Densities

Suppose that X is a random variable taking values in S of Rn, with a continuous distribution that has density function f. The density function of X, of course, is based on the underlying probability measure P on the sample space of the experiment, which we will denote by R. This measure could be a conditional probability measure, conditioned on a given event E (a subset R), with P(E) > 0. The usual notation is

f(x | E), x in S.

Note, however, that except for notation, no new concepts are involved. The function above is a continuous density function. That is, it satisfies properties (a) and (b) while property (c) becomes

integralA f(x | E)dx = P(X in A | E) for A subsetS.

All results that hold for densities in general have analogues for conditional densities.

Mathematical Exercise 31. Suppose that B subset S with P(X in B) = integralB f(x)dx > 0. Show that the conditional density of X given X in B is

  1. f(x | X in B) = f(x) / P(X in B) for x in B.
  2. f(x | X in B) = 0 for x in Bc.

Mathematical Exercise 32. Suppose that S is a subset of Rn with positive, finite measure mn(S) and that B subset S with mn(B) > 0. Show that if X is uniformly distributed on S, then the conditional distribution of X given X in B is uniform on B.

Mathematical Exercise 33. Suppose that (X, Y) has density function f(x, y) = x + y for 0 < x < 1, 0 < y < 1. Find the conditional density of (X, Y) given X < 1/2, Y < 1/2.

Data Analysis Exercises

If {x1, x2, ..., xn}subset Rn is a data set from a continuous variable X, then an empirical density function can be computed by partitioning the data range into subsets of small size, and then computing the density of points in each subset. Empirical density functions are studied in more detail in the chapter on Random Samples.

Data Analysis Exercise 34. For the cicada data, BW denotes body weight, BL body length, and G gender. Construct an empirical density function for each of the following and display each as a bar graph:

  1. BW
  2. BL
  3. BW given G = female.

Data Analysis Exercise 35. For the cicada data, WL denotes wing length and WW wing width. Construct an empirical density function for (WL, WW).

Degenerate Continuous Distributions

Unlike the discrete case, the existence of a density function for a continuous distribution is an assumption that we are making. A random variable can have a continuous distribution on a subset S of Rn but with no density function; the distribution is sometimes said to be degenerate. In this subsection, we explore the common ways in such distributions can occur.

First, suppose that X is a random variable taking values in a subset S of Rn with mn(S) = 0. It is possible for X to have a continuous distribution, but X could not have a density relative to mn. In particular, property (c) in the definition could not hold, since the integral on the left would be 0 for any subset A of S. However, in many cases, X may be defined in terms of continuous random variables on lower dimensional spaces that do have densities.

For example, suppose that U is a random variable with a continuous distribution on subset T of Rk (where k < n), and that X = h(U) for some continuous function h from T into Rn. Any event defined in terms of X can be changed into an event defined in terms of U. The following exercise illustrates this situation

Mathematical Exercise 36. Suppose that U is uniformly distributed on the interval (0, 2). Let X = cos(U), Y = sin(U).

  1. Show that (X, Y) has a continuous distribution on the circle C = {(x, y): x2 + y2 = 1}.
  2. Show that (X, Y) does not have a density function on C (with respect to m2).
  3. Find P(Y > X).

Another situation occurs when a random vector X in Rn (n > 1) has some components with discrete distributions and others with continuous distributions. Such distributions with mixed components are studied in more detail in the section on mixed distributions; however, the following exercise gives an illustration.

Mathematical Exercise 37. Suppose that X is uniformly distributed on {0, 1, 2}, Y is uniformly distributed on (0, 2), and that X and Y are independent.

  1. Show that (X, Y) has a continuous distribution on {0, 1, 2} × (0, 2).
  2. Show that (X, Y) does not have a (2-dimensional) density function on S (with respect to m2).
  3. Find P(Y > X).

Finally, it is also possible to have a continuous distribution on a subset S of Rn with mn(S) > 0, yet still with no density function. Such distributions are said to be singular, and are rare in applied probability. For an example, however, see Bold Play in the chapter Red and Black.