• No results found

Continuous Random Variables

5 P ROBABILITY D ENSITIES

5.1 Continuous Random Variables

When we first introduced the concept of a random variable in Chapter 4, we pre-sented it as a real-valued function defined over the sample space of an experiment.

We illustrated this idea with the random variable giving the number of preferred at-tributes possessed by a used car, assigning the numbers 0, 1, 2, or 3 (whichever was appropriate) to the 18 possible outcomes of the experiment. In the continuous case, where random variables can assume values on a continuous scale, the procedure is very much the same. The outcomes of an experiment are represented by the points on a line segment or a line. Then, a random variable is created by appropriately assigning a number to each point by means of some rule or equation.

When the value of a random variable is given directly by a measurement or ob-servation, we usually do not bother to differentiate among the value of the random variable, the measurement which we obtain, and the outcome of the experiment, which is the corresponding point on the real axis. If an experiment consists of de-termining what force is required to break a given tensile-test specimen, the result itself, say, 138.4 pounds, is the value of the random variable, X , with which we are concerned. There is no real need in that case to add that the sample space of the experiment consists of all (or part of) the points on the positive real axis.

In general, we write P( a ≤ X ≤ b ) for the probability associated with the points of the sample space for which the value of a random variable falls on the interval from a to b. The problem of defining probabilities in connection with con-tinuous sample spaces and concon-tinuous random variables involves some complica-tions. To illustrate the nature of these complications, let us consider the following situation.

Suppose we want to know the probability that if an accident occurs on a free-way whose length is 200 miles, it will happen at some given location or, perhaps, some particular stretch of the road. The outcomes of this experiment can be looked upon as a continuum of points. Namely, those on the continuous interval from 0 to 200.

134

Sec 5.1 Continuous Random Variables 135

Next, suppose the probability that the accident occurs on any interval of length L is L/200, with L measured in miles. Note that this arbitrary assignment of prob-ability is consistent with Axioms 1 and 2 on page 70, since the probabilities are all nonnegative and less than or equal to 1, and P(S) = 200

200= 1.

So far, we are considering only events represented by intervals which form part of the line segment from 0 to 200. Using Axiom 3on page 120, we can also obtain probabilities of events that are not intervals but which can be represented by the union of finitely many or countably many intervals. Thus, for two nonoverlapping intervals of length L1and L2we have a probability of

L1+ L2 200

and for an infinite sequence of nonoverlapping intervals of length L1, L2, L3, . . . , we have a probability of

L1+ L2+ L3+ · · · 200

Note that the probability that the accident occurs at any given point is equal to zero because we can look upon a point as an interval of zero length. However, the prob-ability that the accident occurs in a very short interval is positive; for instance, for an interval of length 1 foot the probability is (5,280 × 200)−1 = 9.5 × 10−7.

Thus, in extending the concept of probability to the continuous case, we again use Axioms 1, 2, and 3, but we shall have to restrict the meaning of the term event.

So far as practical considerations are concerned, this restriction is of no conse-quence. We simply do not assign probabilities to some rather abstruse point sets, which cannot be expressed as the unions or intersections of finitely many or count-ably many intervals.

The way in which we assigned probabilities in the preceding example is, of course, very special; it is similar in nature to the way in which we assign equal probabilities to the six faces of a die, heads and tails, the 52 cards in a standard deck, and so forth. To treat the problem of associating probabilities with continuous random variables generally, suppose we are interested in the probability that a given random variable will take on a value on the interval from a to b, where a and b are constants with a ≤ b. Suppose, furthermore, that we divide the interval from a to b into m equal subintervals of widthx containing, respectively, the points x1, x2, . . . , xm, and that the probability that the random variable will take on a value in the subinterval containing xiis given by f (xi)· x. Then the probability that the random variable with which we are concerned will take on a value in the interval from a to b is given by

P( a≤ X ≤ b ) =

m i=1

f (xi)· x

When f is an integrable function defined for all values of the random variable with which we are concerned, we shall define the probability that the value of the random variable falls between a and b by lettingx → 0. Namely,

P( a≤ X ≤ b ) =

 b a

f (x) dx

As illustrated in Figure 5.1, this definition of probability in the continuous case presupposes the existence of an appropriate function f which, integrated from any constant a to any constant b ( with a≤ b ), gives the probability that the correspond-ing random variable takes on a value on the interval from a to b. Note that the value

Figure 5.1

Probability as area under f a b

P (a # X # b)

f (x) does not give the probability that the corresponding random variable takes on the value x. In the continuous case, probabilities are given by integrals and not by the values f (x).

To obtain the probability that a random variable will actually take on a given value x, we might first determine the probability that it will take on a value on the interval from x−x to x+x, and then let x → 0. However, if we did this it would become apparent that the result is always zero. The fact that the probability is always zero that a continuous random variable will take on any given value x should not be disturbing. Indeed, our definition of probability for the continuous case provides a remarkably good model for dealing with measurements or observations. Owing to the limits of our ability to measure, experimental data never seem to come from a continuous sample space. Thus, while temperatures are productively thought of as points on a continuous scale, if we report a temperature measurement of 74.8 degrees centigrade, we really mean that the temperature lies in the interval from 74.75 to 74.85 degrees centigrade, and not that it is exactly 74.800. . . .

It is important to add that when we say that there is a zero probability that a ran-dom variable will take on any given value x, this does not mean that it is impossible that the random variable will take on the value x. In the continuous case, a zero prob-ability does not imply logical impossibility, but the whole matter is largely academic since, owing to the limitations of our ability to measure and observe, we are always interested in probabilities connected with intervals and not with isolated points.

As an immediate consequence of the fact that in the continuous case probabil-ities associated with individual points are always zero, we find that if we speak of the probability associated with the interval from a to b, it does not matter whether either endpoint is included. Symbolically,

P( a≤ X ≤ b ) = P( a ≤ X < b ) = P( a < X ≤ b ) = P( a < X < b ) Drawing an analogy with the concept of a density function in physics, we call the functions f , whose existence we stipulated in extending our definition of probabil-ity to the continuous cases, probabilprobabil-ity densprobabil-ity functions, or simply probabilprobabil-ity densities. Whereas density functions are integrated to obtain weights, probability density functions are integrated to obtain probabilities. We will follow the common practice of also calling f (x) the probability density function with the understanding that we are referring to the function f which assigns the value f (x) to x, for each x that is a possible value for the random variable X .

Since a probability density, integrated between any two constants a and b, gives the probability that a random variable assumes a value between these limits, f cannot be just any real-valued integrable function. However, imposing the conditions that

f (x)≥ 0 for all x

and 

−∞ f (x) dx= 1

Sec 5.1 Continuous Random Variables 137

insures that the axioms of probability (with the modification about events discussed on page 135) are satisfied. Note the similarity between these conditions and those for probability distributions given on page 96.

As in the discrete case, we let F (x) be the probability that a random variable with the probability density f (x) takes on a value less than or equal to x. We again refer to the corresponding function F as the cumulative distribution function or just the distribution function of the random variable. Thus, for any value x, F(x) = P( X ≤ x ) is the area under the probability density function over the interval −∞

to x. In the usual calculus notation for the integral, F (x)=

 x

−∞ f (t ) dt

Consequently, the probability that the random variable will take on a value on the interval from a to b is F ( b)− F( a), and according to the fundamental theorem of integral calculus it follows that

dF (x)

dx = f (x) wherever this derivative exists.

EXAMPLE 1 Calculating probabilities from the probability density function If a random variable has the probability density

f (x)=

2 e−2x for x> 0

0 for x≤ 0

find the probabilities that it will take on a value (a) between 1 and 3;

(b) greater than 0.5.

Solution Evaluating the necessary integrals, we get

(a)  3

1

2 e−2xdx= e−2− e−6= 0.133

(b)



0.5 2 e−2xdx= e−1 = 0.368 j

Note that in the preceding example we make the domain of f include all the real numbers even though the probability is zero that x will be negative. This is a practice we shall follow throughout the book. It is also apparent from the graph of this function in Figure 5.2 that it has a discontinuity at x= 0; indeed, a probability density need not be everywhere continuous, as long as it is integrable between any two limits a and b (with a≤ b).

Figure 5.2

Graph of probability density f ( x ) = 2 e−2 x, x > 0

f (x) 2

0 1 2 3 4

x

EXAMPLE 2 Determining a distribution function from its density function

With reference to the preceding example, find the distribution function and use it to determine the probability that the random variable will take on a value less than or equal to 1.

Solution Performing the necessary integrations, we get

F (x)=

⎧⎪

⎪⎩

0 for x≤ 0

 x 0

2 e−2tdt= 1 − e−2x for x> 0 and substitution of x= 1 yields

F (1)= 1 − e−2= 0.865 j

Note that the distribution function of this example is nondecreasing and that F (−∞) = 0 and F(∞) = 1. Indeed, it follows by definition that these properties are shared by all distribution functions.

EXAMPLE 3 A probability density function assigns probability one to (−∞, ∞) Find k so that the following can serve as the probability density of a random variable:

f (x)=

0 for x≤ 0

kxe−4x2 for x> 0

Solution To satisfy the first of the two conditions on page 136, k must be nonnegative, and to satisfy the second condition we must have



−∞ f (x) dx=

 0

kxe−4x2dx=

 0

k

8· e−udu= k 8 = 1

so that k= 8. j

To describe probability densities, we define statistical measures that are very similar the ones that describe probability distributions. The first moment about the origin is again called the mean, and it is denoted byμ. Alternatively, it is also called the expected value of a random variable having the probability density f (x) and denoted by E ( X ).

Mean of a probability

density μ = E( X ) =



−∞ x f (x) dx

This expected value is analogous to that for the discrete case introduced in Sec-tion 4.4 but with an integral replacing the summaSec-tion.

The kth moment about the origin is E ( Xk) or μk=



−∞xk· f (x) dx analogous to the definition we gave on page 113.

Further, the kth moment about the mean is E ( X− μ )k, or μk =



−∞( x− μ )k· f (x) dx

Sec 5.1 Continuous Random Variables 139

In particular, the second moment about the mean is again referred to as the variance and it is written asσ2. As before, it measures the spread of a probability density in the sense that it gives the expected value of the squared deviation from the mean.

σ2 = Again,σ is referred to as the standard deviation.

EXAMPLE 4 Determining the mean and variance using the probability density function

With reference to Example 1, find the mean and the variance of the given probability density.

Solution Performing the necessary integrations, using integrations by parts, we get μ = Alternatively, the expectation of x is E (X )= 0.5

σ2=

5.1 Verify that the function of Example 1 is, in fact, a prob-ability density.

5.2 If the probability density of a random variable is given by f (x)=



(k+ 2)x3 0< x < 1

0 elsewhere

find the value k and the probability that the random variable takes on a value

(a) greater than 3

4; (b) between1 3 and2

3.

5.3 With reference to the preceding exercise, find the cor-responding distribution function and use it to deter-mine the probabilities that a random variable having this distribution function will take on a value

(a) between 0.45 and 0.75; (b) less than 0.6.

5.4 If the probability density of a random variable is given by

find the probabilities that a random variable having this probability density will take on a value

(a) between 0.2 and 0.8; (b) between 0.6 and 1.2.

5.5 With reference to the preceding exercise, find the cor-responding distribution function, and use it to deter-mine the probabilities that a random variable having the distribution function will take on a value

(a) greater than 1.8;

(b) between 0.4 and 1.6.

5.6 Given the probability density f (x)= k 1+ x2 for

−∞ < x < ∞, find k.

5.7 If the distribution function of a random variable is given by

find the probabilities that this random variable will take on a value

(a) less than 3; (b) between 4 and 5.

5.8 Find the probability density that corresponds to the distribution function of Exercise 5.7. Are there any points at which it is undefined? Also sketch the graphs of the distribution function and the probability density.

5.9 Let the phase error in a tracking device have probabil-ity densprobabil-ity

f (x)=

cos x 0< x < π/2

0 elsewhere

Find the probability that the phase error is (a) between 0 andπ/4; (b) greater than π/3.

5.10 The length of satisfactory service (years) provided by a certain model of laptop computer is a random variable having the probability density

Find the probabilities that one of these laptops will pro-vide satisfactory service for

(a) at most 2.5 years;

(b) anywhere from 4 to 6 years;

(c) at least 6.75 years.

5.11 At a certain construction site, the daily requirement of gneiss (in metric tons) is a random variable having the

probability density

If the supplier’s daily supply capacity is 25 metric tons, what is the probability that this capacity will be inad-equate on any given day?

5.12 Prove that the identity σ2= μ2− μ2 holds for any probability density for which these moments exist.

5.13 Find μ and σ2 for the probability density of Exer-cise 5.2.

5.14 Find μ and σ2 for the probability density of Exer-cise 5.4.

5.15 Findμ and σ for the probability density obtained in Exercise 5.8.

5.16 Findμ and σ for the distribution of the phase error of Exercise 5.9.

5.17 Findμ for the distribution of the satisfactory service of Exercise 5.10.

5.18 Show thatμ2and, hence,σ2do not exist for the prob-ability density of Exercise 5.6.