3 Discrete Random Variables

Consider the experiment of tossing a coin three times where the probability of a head on an individual toss is . Suppose that for each toss that comes up heads we win $1, but for each toss that comes up tails we lose $1. Clearly, a quantity of interest in this situation is our total winnings. Let denote this quantity. It is clear that can only be one of the values $3, $1, -\1-$3XX will be \3; while for the outcome HTH, will be $1. In the following table we list the values of (in dollars) corresponding to each of the eight possible outcomes.

ωX(ω)P{ω}
HHH3p³
HHT1p²(1-p)
HTH1p²(1-p)
THH1p²(1-p)
HTT-1p(1-p)²
THT-1p(1-p)²
TTH-1p(1-p)²
TTT-3(1-p)³

We can think of as a real-valued function on the probability space corresponding to the experiment. For each , is then one of the values, 3, 1, -1, -3. Consider, for example, the event . This set contains the three points , and corresponding to the outcomes HHT, HTH, and THH, respectively. The last column in the table gives the probabilities associated with the eight possible outcomes of our experiment. From that table we see that the event has probability . We usually abbreviate this by saying that has probability . Similar considerations, of course, apply to the other values that assumes. We see, therefore, that for each possible value of , there is a precisely defined probability for assuming that value. As we shall see in the next section, the quantity is an example of what is called a discrete random variable.

3.1. Definitions

Let be an arbitrary probability space, and let be a real-valued function on taking only a finite or countably infinite number of values . As in the example just given, we would certainly like to be able to talk about the probability that assumes the value , for each . For this to be the case we need to know that for each , is an event, i.e., is a member of . If, as in the previous example, is the -field of all subsets of then this is certainly the case. For in that case, no matter what might be, is a subset of and hence a member of , since contains every possible subset of . However, as was indicated in Section 1.2, in general does not consist of all subsets of , so we have no guarantee that is in . The only reasonable way out is to explicitly assume that is a function on such that this desired property holds. This leads us to the following.

Definition 1 A discrete real-valued random variable on a probability space is a function with domain and range a finite or countably infinite subset of the real numbers such that is an event for all .

By definition, then, is an event so we can talk about its probability. For brevity we usually write the event as and denote the probability of this event as rather than .

Let be a discrete real-valued random variable. Then for any real number , is an event. Indeed, if are the values that can assume, then is an event by the definition of a discrete real-valued random variable. If is not one of these numbers, then , which is also an event.

If the possible values of a discrete random variable consist only of integers or of nonnegative integers, we say that is respectively an integer-valued random variable or a nonnegative integer-valued random variable. Most of the discrete random variables that arise in applications are nonnegative integer-valued.

Definition 2 The real-valued function defined on by is called the discrete density function of . A number is called a possible value of if .

Whenever necessary, we will denote the density function of by to show that it is the density function for the random variable .

Example 1. Let be the random variable introduced at the beginning of this chapter in our discussion of tossing a coin three times with, say, . Then has the discrete density given by

and if . This density can be represented in terms of a diagram as illustrated in Figure 1.

Figure 1

Example 2. Binomial distribution. Consider independent repetitions of the simple success-failure experiment discussed in Section 1.5. Let denote the number of successes in the trials. Then is a random variable that can only assume the values 0, 1, 2, …, . In Chapter 1 we showed that for the integer , ,

hence the density of is given by

and elsewhere. This density, which is among the most important densities that occur in probability theory, is called the binomial density with parameters and . The density from Example 1 is a binomial density with parameters and .

One often refers to a random variable having a binomial density by saying that has a binomial distribution (with parameters and if one wants to be more precise). Similar phraseology is also used for other random variables having a named density.

As explained in Chapter 2, the binomial distribution arises in random sampling with replacement. For random sampling without replacement we have the following.

Example 3. Hypergeometric distribution. Consider a population of objects, of which are of one type and are of a second type. Suppose a random sample of size is drawn from the population. Let be the number of objects of the first type in the sample. Then is a random variable whose possible values are 0, 1, 2, …, . From the results in Section 2.4 we know that

Now we can write

Thus the density of can be written in the two forms

or

This density is called the hypergeometric density.

Here are a few more examples of random variables.

Example 4. Constant random variable. Let be a real number. Then the function defined by for all is a discrete random variable, since the set is the entire set and is an event. Clearly, , so the density of is simply and , . Such a random variable is called a constant random variable. It is from this point of view that a numerical constant is considered a random variable.

Example 5. Indicator random variable. Let be an event. Set if and if . Then the event occurs if and only if . This random variable is called the indicator random variable of because the value of tells whether or not the event occurs.

Conversely, if is a random variable on a probability space taking the values 1 or 0, then is the indicator random variable of the event

Let . The density of is then given by

Example 6. Consider the following game of chance. A circular target of radius 1 is zoned into concentric disks of radius , as illustrated in Figure 2 for the case . A dart is tossed at random onto the circle, and if it lands in the annular zone between the circles with radii and , dollars are won, . Let denote the amount of money won. Find the density of .

Figure 2

The probability space for this experiment will be chosen to be the uniform probability space on the disk of radius 1. Clearly is a discrete random variable on this space with the possible values 1, 2, …, . The event occurs if and only if the dart lands in the region bounded by the circles of radii and . According to our discussion in Section 1.2 the probability of is the area of divided by the area of the unit disk. Thus for

Setting we see that the density of is

The density of a discrete random variable has the following three important properties:

(i) . (ii) is a finite or countably infinite subset of . Let denote this set. Then (iii) .

Properties (i) and (ii) are immediate from the definition of the discrete density function of . To see that (iii) holds, observe that the events are mutually disjoint and their union is . Thus

Definition 3 A real-valued function defined on is called a discrete density function provided that it satisfies properties (i), (ii), and (iii) stated above.

It is easy to see that any discrete density function is the density function of some random variable . In other words, given we can construct a probability space and a random variable defined on whose discrete density is . Indeed, let be given and suppose is the set of values where . Take , all subsets of , and the probability measure defined on by if . The random variable defined by if is then such a random variable. To see this note that and thus

The above result assures us that statements like “Let be a random variable with discrete density ” always make sense, even if we do not specify directly a probability space upon which is defined. To save writing we will henceforth use the term density instead of discrete density throughout the remainder of this chapter.

The notion of a discrete random variable forms a convenient way of describing a random experiment that has a finite or countably infinite number of possible outcomes. We need not bother to set up a probability space for the experiment. Instead we can simply introduce a random variable taking values such that if and only if the experiment results in the th outcome. Thus, for example, in drawing a card at random from a deck of cards, we can let if the th card was drawn. Then , so we could describe the experiment by saying we observe a random variable taking integer values 1, 2, …, and having for , and elsewhere for its density function.

In general, conducting an experiment which has a finite or countably infinite number of possible outcomes can be described as observing the value of a discrete random variable . Many times, in fact, this is how the experiment already appears to us, and often it is easier to think of the experiment in these terms rather than in terms of a probability space.

As an illustration of this idea consider the experiment of picking a point at random from the finite subset of consisting of the distinct points . Then the function defined by

is clearly a discrete density function. A random variable having this density is said to be uniformly distributed on . Observing a value of corresponds to our intuitive notion of choosing a point at random from .

We will now introduce two more discrete densities that are very useful for solving certain classes of problems whose importance will become apparent later.

Example 7. Geometric densities. Let . Then the real-valued function defined on by

is a discrete density function called the geometric density with parameter .

To see that is a density, all that needs to be checked is that condition (iii) holds, for here conditions (i) and (ii) are obviously satisfied. But (iii) follows from the familiar fact that the sum of the geometric series is just .

Example 8. Negative binomial densities. Let be any positive real number and let . A density closely related to the geometric is the negative binomial density with parameters and defined by

To show that this is a density we must verify that properties (i)-(iii) hold. Here property (ii) is obviously true. That (i) holds may be seen as follows. For a nonnegative integer,

Thus

Since the right-hand side of (2) is clearly nonnegative we see that (i) holds. To verify (iii), recall that the Taylor series of for is

From (3) with , we see that

and hence that .

From (2) we see that we can write the negative binomial density in the alternate form

For some purposes this form is more useful than that given in (1). Observe that the geometric density with parameter is a negative binomial density with parameters and .

Example 9. Poisson densities. Let be a positive number. The Poisson density with parameter is defined as

It is obvious that this function satisfies properties (i) and (ii) in the definition of a discrete density function. Property (iii) follows immediately from the Taylor series expansion of the exponential function, namely,

Many counting type random phenomena are known from experience to be approximately Poisson distributed. Some examples of such phenomena are the number of atoms of a radioactive substance that disintegrate in a unit time interval, the number of calls that come into a telephone exchange in a unit time interval, the number of misprints on a page of a book, and the number of bacterial colonies that grow on a petri dish that has been smeared with a bacterial suspension. A full treatment of these models requires the notion of a Poisson process, which will be discussed in Chapter 9.

3.2. Computations with densities

So far we have restricted our attention to computing . Often we are interested in computing the probability of where is some subset of other than a one-point set.

Let be any subset of and let be a discrete random variable having distinct possible values . Then is an event. To see this, observe that

where by we mean the union over all such that . Usually the event is abbreviated to , and its probability is denoted by . If and is an interval with end points and say then we usually write instead of . Similar notation is used for the other intervals with these endpoints.

An abbreviated notation is also used for conditional probabilities. Thus, for example, if and are two subsets of we write for the conditional probability of the event given the event .

Let be the density of . We can compute directly from the density by means of the formula

where by we mean the sum over all such that . This formula follows immediately from (5) since the events , , are disjoint. The right side of (6) is usually abbreviated as . In terms of this notation (6) becomes

The function , , defined by

is called the distribution function of the random variable or of the density . It follows immediately from the definition of the distribution function that

If is an integer-valued random variable, then

where denotes the greatest integer less than or equal to (e.g., ). We see that is a nondecreasing function and that, for any integer , has a jump of magnitude at and is constant on the interval . Further properties of distribution functions will be obtained, from a more general viewpoint, in Chapter 5.

Example 10. Set and let be uniformly distributed on . Then for and , elsewhere. The distribution function of is given by for , for and

A graph of this distribution function is given in Figure 3. The probability can be calculated either as

or as

Similarly is obtained as

or as

Example 11. Let have a geometric distribution with parameter . Find the distribution function of and find for the nonnegative integer .

The density of , according to Example 7, is

Thus for and

Using the formula for the sum of a finite geometric progression we conclude that

In particular, for a nonnegative integer, and hence

Geometrically distributed random variables arise naturally in applications. Suppose we have a piece of equipment, such as an electrical fuse, that neither deteriorates nor improves in the course of time but can fail due to sporadic chance happenings that occur homogeneously in time. Let the object be observed at fixed time periods such as hours or days, and let be the number of time units up to and including the first failure, assuming that the object is new at time 0. Clearly is a discrete random variable whose possible values are found among the integers 1, 2, 3, … The event occurs if and only if the object first fails at the th time period. Our intuitive notion that the object neither deteriorates nor improves with time can be precisely formulated as follows. If we know that the object has not failed by time , i.e., the first failure is after time so , then the probability that it does not fail until after time , i.e., , should be the same as the probability of starting with an object which is new at time and having it not fail until after time . The fact that the failure causes occur homogeneously in time can be taken to mean that this probability depends only on the number of time periods that elapse between and , namely , but not on . Thus should satisfy the equation

Since

we see that satisfies the functional equation

The only solution to this equation with is for some constant . Indeed, let . Then by induction, . Since is a decreasing function of , . Setting we see that . Thus

for . If we let , then has the geometric distribution with parameter as given in Example 7.

3.3. Discrete random vectors

Suppose we are interested in two random variables and defined on the same probability space . For each , the two values and define a point in the plane . This defines a function , which we usually write as . In general, if are random variables defined on the same probability space, then for each , is one of the finite or countably infinite number of values that the random variable can assume.

Let denote the collection of all -tuples of real numbers. A point of is usually called an -dimensional vector. Thus for each , the values define a point

of . This defines an -dimensional vector-valued function on , , which is usually written . The function is called a discrete -dimensional random vector.

We have just defined an -dimensional random vector in terms of real-valued random variables. Alternatively, an -dimensional random vector can be defined directly as a function by extending the definition of a real-valued random variable almost verbatim.

Definition 4 A discrete -dimensional random vector is a function from to taking on a finite or countably infinite number of values such that

is an event for all .

The discrete density function for the random vector is defined by

or equivalently

The probability that belongs to the subset of can be found by using the analog of (7), namely,

As in the one-dimensional case, this function has the following three properties:

(i) (ii) is a finite or countably infinite subset of , which will be denoted by (iii)

Any real-valued function defined on having these three properties will be called a discrete -dimensional density function. The argument given in the one-dimensional case applies verbatim to show that any -dimensional discrete density function is the density function of some -dimensional random vector.

There is a certain amount of traditional terminology that goes along with random vectors and their density functions. Let be an -dimensional random vector with density . Then the function is usually called the joint density of the random variables . The density function of the random variable is then called the th marginal density of or of .

Let and be two discrete random variables. For any real numbers and the set is an event that we will usually denote by . Suppose that the distinct possible values of are , and that the distinct possible values of are . For each , the events , , are disjoint and their union is the event . Thus

This last expression results from using the same notational convention that was introduced for random variables in Section 3.2. Similarly,

In other words, if we know the joint density of two discrete random variables and then we can compute the density of by summing over and the density of by summing over . Thus, in terms of densities, if is the joint density of and , then

and

Example 12. Suppose two cards are drawn at random without replacement from a deck of 3 cards numbered 1, 2, 3. Let be the number on the first card and let be the number on the second card. Then the joint density of and is given by and elsewhere. The first marginal density, that is, the density of is given by

and similarly for and 3. Therefore , , and elsewhere, as it should be.

Example 13. Suppose and are random variables that assume the values and , where or 2 and , with probabilities given by the following table.

X \ Y1234
11/41/81/161/16
21/161/81/41/16

Then , and so has the uniform distribution on 1,2. Similarly

3.4. Independent random variables

Consider the experiment of tossing a coin and rolling a die. Intuitively, we believe that whatever the outcome of the coin toss is, it should have no influence on the outcome of the die roll, and vice-versa. We now wish to construct a probability model that reflects these views. Let be a random variable that is 1 or 0 according as the coin lands heads or tails, i.e., such that the event represents the outcome that the coin lands heads and the event represents the outcome that the coin lands tails. In a similar way we represent the outcome of the die roll by a random variable that takes the value 1, 2, …, or 6 according as the die roll results in the face number 1, 2, …, or 6. The outcome of the combined experiment can then be given by the random vector . Our intuitive notion that the outcome of the coin toss and die roll have no influence on each other can be stated precisely by saying that if is one of the numbers 1 or 0 and is one of the numbers 1, 2, …, 6, then the events and should be independent. Thus, the random vector should have the joint density given by

In other words the joint density of and should be given by

Definition 5 Let be discrete random variables having densities respectively. These random variables are said to be mutually independent if their joint density function is given by

The random variables are said to be dependent if they are not independent. As in the case of the combined experiment of tossing a coin and rolling a die, the notion of independent random variables forms a convenient way to precisely formulate our intuitive notions that experiments are independent of each other.

Consider two independent discrete random variables having densities and , respectively. Then for any two subsets and of

To see this, note that

Formula (14) above extends easily from 2 to independent random variables. Thus if are any subsets of then

Example 14. Let and be independent random variables each geometrically distributed with parameter .

(a) Find the distribution of (b) Find (c) Find the distribution of (d) Find for

To solve (a) we observe that for a nonnegative integer

so by Example 11

It follows from Example 11 that has a geometric distribution with parameter

To solve (b) we observe that

To solve (c) we let be a nonnegative integer. Then

The solution to (d) is given by

Consider some experiment (such as rolling a die) that has only a finite or countably infinite number of possible outcomes. Then, as already explained, we can think of this experiment as that of observing the value of a discrete random variable . Suppose the experiment is repeated times. The combined experiment can be described as that of observing the values of the random variables , where is the outcome of the th experiment. If the experiments are repeated under identical conditions, presumably the chance mechanism remains the same, so we should require that these random variables all have the same density. The intuitive notion that the repeated experiments have no influence on each other can now be formulated by demanding that the random variables be mutually independent. Thus, in summary, independent random variables having a common discrete density can be used to represent an -fold independent repetition of an experiment having a finite or countably infinite number of outcomes.

The simplest random experiments are those that have only two possible outcomes, which we may label as success and failure. In tossing a coin, for example, we may think of getting a head as a success, while in drawing a card from a deck of cards we may consider getting an ace as a success. Suppose we make independent repetitions of our simple experiment. We can then describe the situation by letting be independent indicator random variables such that or 0 according as the th trial of the experiment results in a success or failure. In the literature, trials that can result in either success or failure are called Bernoulli trials, and the above situation is described by saying we perform Bernoulli trials with common probability for success. In this context a random variable that takes on the values 1 and 0 with probabilities and respectively is said to have a Bernoulli density with parameter .

The outcome of performing Bernoulli trials can be given by the random vector . The information conveyed in this vector tells exactly which trials were a success and which were a failure. Often, such precise information is not required, and all we want to know is the number of trials that yielded a success among the trials. In Example 2 we showed that was binomially distributed with parameters and . Observe that . Any random variable that is binomially distributed with these same parameters can be thought of as the sum of independent Bernoulli random variables each having parameter .

Let us now consider independent repetitions of an experiment that has a finite number of possible outcomes.

3.4.1. The multinomial distribution

Consider an experiment, such as rolling a die, that can result in only a finite number of distinct possible outcomes. We may represent this experiment by saying we observe a random variable that assumes the values , so that the event represents the fact that the experiment yielded the th outcome. Let . If we perform an -fold independent repetition of the experiment, we can represent the outcome of these trials as an -dimensional random vector , where the random variable corresponds to the th trial. Here the random variables are mutually independent and .

The random vector tells us the outcomes of these trials. As in the case of outcomes we often are not interested in such a detailed account, but only would like to know how many of the trials resulted in each of the various possible outcomes. Let , denote the number of trials that yield the th outcome. Then if and only if exactly of the random variables assume the value , i.e., exactly of the trials yield the th outcome.

For example, for , if

then

We will now compute the joint density of . To this end let be nonnegative integers with sum . A moment’s thought shows that since the random variables are independent with a common density, every specified choice of of them having value 1, of them having value 2, …, of them having value , has the same probability, namely

Thus letting denote the number of possible choices, we see that

The computation of is a problem in combinatorial analysis that can easily be solved by the methods of Chapter 2. The simplest way of doing this is to think of the values 1, 2, …, as boxes and the trials as balls. Then is the number of ways we can place the balls into the boxes in such a manner as to have exactly balls in box 1, …, exactly balls in box . If this is so, then box 1 has balls. These balls can be chosen from the balls in ways. The remaining balls must be placed into the boxes 2, …, in such a manner as to have balls in box 2, …, balls in box . Thus

It now follows by induction on that

Indeed, for there is nothing to prove. Assume that (17) holds for boxes. Then from (16) we see that

as desired.

The joint density of is therefore given by

This density is called the multinomial density with parameters and .

We observe at once that the random variables are not independent. In fact, since , any of them determine the th. This, plus the fact that , is sometimes used to express the multinomial distribution in a different form. Let be nonnegative integers such that . Then

This form is convenient when we are interested in the first outcomes and think of the th outcome as the outcome which is “not one of the outcomes.” Thus in rolling a die we might be interested in only knowing if a 2, 4, or 6 appeared. The experiment would then have four possible outcomes “2,” “4,” “6,” and “not (2, 4, 6).”

Let be a nonnegative integer, . A simple probability argument shows that for nonnegative integers such that ,

3.4.2. Poisson approximation to the binomial distribution

There is an important connection between the binomial distribution and the Poisson distribution. Suppose, for example, that we perform Bernoulli trials with success probability at each trial. Then the probability of having successes in the trials is given by

Now as , , , and . Consequently,

In the derivation of (21) we had . Actually (21) holds whenever as .

Equation (21) is used in applications to approximate the binomial distribution by the Poisson distribution when the success probability is small and is large. This is done by approximating the binomial probability by means of where is the Poisson density with parameter . The approximation is quite good if is small. The following example illustrates the use of this technique.

Example 15. A machine produces screws, of which are defective. Find the probability that in a box of 200 screws there are no defectives.

Here we have Bernoulli trials, with success probability . The probability that there are no defective screws is

The Poisson approximation to this is given by

The fact that the Poisson distribution can arise as a limit of binomial distributions has important theoretical consequences. It is one justification for developing models based on Poisson processes, which will be discussed in Chapter 9. The use of the Poisson approximation as a labor-saving device in computing binomial probabilities is of secondary importance, since the binomial probabilities themselves are readily computed.

3.5. Infinite sequences of Bernoulli trials

Consider repeatedly performing a success-failure experiment having probability of success until the first success appears. For any prescribed number of trials, there is the nonzero probability that no success occurs. Thus, in considering the number of trials until the first success, we cannot limit ourselves to any prescribed number of trials, but instead must consider an unending sequence of trials.

A given finite number of trials constitute Bernoulli trials, represented by independent Bernoulli random variables, . To represent an infinite sequence of Bernoulli trials we consider an infinite sequence , , of independent Bernoulli random variables having the same parameter .

In general, random variables are said to be independent if for any positive integer , the random variables are mutually independent. It can be shown that, given any discrete density , there is a probability space upon which are defined mutually independent random variables each having the density .

As our model for performing an unlimited sequence of Bernoulli trials, we therefore take an infinite sequence , , of mutually independent Bernoulli random variables such that , . We interpret as meaning that the th trial results in success, and as meaning that it results in failure.

Consider the number of trials until the first success. The random variable can assume only the integer values . The event occurs if and only if the first trials are failures and the th trial is a success. Therefore

It follows that

Consequently

Thus is geometrically distributed with parameter .

Let be an integer and let denote the number of trials until the th success (so that the th success occurs at trial ). Then is a random variable that can assume only the integer values . The event occurs if and only if there is a success at the th trial and during the first trials there are exactly successes. Thus

Since the two events on the right are independent and has a binomial distribution with parameters and , we see that for

Consequently

We see from Equations (4) and (23) that has the negative binomial distribution with parameters and .

Let and for any integer let be as above. Define . Then is the number of trials after the st success until the th success. We will now show that for any integer the random variables are mutually independent and have the same geometric density with parameter .

To see this let be any positive integers. Then the event occurs if and only if among the first trials all are failures except for trials

which are successes. Since the trials are mutually independent with success probability we see that

Thus the random variables are independent, geometrically distributed with parameter .

Now clearly , so we see that is the sum of independent, geometrically distributed random variables. We have previously found that is negative binomially distributed with parameters and . We have thus established the interesting and important fact that the distribution of the sum of independent, identically distributed geometric random variables with parameter is negative binomially distributed with parameters and .

Further properties of infinite sequences of independent Bernoulli trials will be treated in the exercises.

3.6. Sums of independent random variables

In this section we discuss methods for finding the distribution of the sum of a finite number of independent discrete random variables. Let us start by considering two such variables and .

We assume, then, that and are independent discrete random variables. Let denote the distinct possible values of . For any , the event is the same as the event

Since the events are disjoint for distinct values of , it follows that

In other words

If and are integer-valued random variables, then is also integer-valued. In this case we can interpret (24) as being valid when is an integer and the variable in the right-hand side of (24) ranges over the integers. One further specialization is useful. Suppose that and assume only nonnegative integer values. Then also assumes only nonnegative integer values. If is a nonnegative integer, then unless is one of the values 0, 1, …, . Thus under these assumptions (24) can be written as

Although Equation (25) is useful for computing the density of , it is usually simpler to use probability generating functions. We will next describe such functions and then give several important applications of their use in computing the density of the sum of independent random variables.

Definition 6 Let be a nonnegative integer-valued random variable. The probability generating function of is defined as

We will now calculate in three specific cases.

Example 16. Binomial distribution. Let have a binomial distribution with parameters and . Then

and hence

From the binomial expansion formula

we conclude that

Example 17. Negative binomial distribution. Let have a negative binomial distribution with parameters and . Then

and hence

From the Taylor series expansion

with , it follows that

Example 18. Poisson distribution. Let have a Poisson distribution with parameter . Then

and hence

By setting in the Taylor series expansion

we see that

Let and be independent, nonnegative integer-valued random variables. Then

To see this, note that by (25)

which is the desired result.

It follows easily from (29) by induction that if are independent, nonnegative integer-valued random variables, then

The conclusions of the next theorem can be proven most easily by the “generating function technique,” which is based upon the fact that if

then we may equate the coefficients of in the two power series and conclude that . This shows that if two nonnegative integer-valued random variables have the same probability generating function, they must have the same distribution. In other words, the probability generating function of a nonnegative integer-valued random variable uniquely determines the distribution of that random variable.

Theorem 1 Let be independent random variables.

(i) If has the binomial distribution with parameters and then has the binomial distribution with parameters and .

(ii) If has the negative binomial distribution with parameters and , then has the negative binomial distribution with parameters and .

(iii) If has the Poisson distribution with parameter , then has the Poisson distribution with parameter .

Proof of (i). If the ‘s are as in (i), then by Example 16

Thus the probability generating function of is the same as that of a random variable having a binomial distribution with parameters and . This implies that must have that binomial distribution. For let

denote the corresponding binomial probabilities. Then

Thus by equating coefficients we see that

and hence that is binomially distributed as stated in (i).

Proof of (ii). If the ‘s are as in (ii), then by Example 17

Thus the probability generating function of is the same as that of a random variable having a negative binomial distribution with parameters and . It now follows by the same argument used in proving (i) that has that negative binomial distribution.

The proof of (iii) is similar to that of (i) and (ii) and is left as an exercise for the reader.

Suppose in statement (ii) of Theorem 1. Then are each geometrically distributed with parameter , and (ii) states that has a negative binomial distribution with parameters and . This provides an alternative proof to the result obtained in Section 3.5.

The next example illustrates the use of conditional probabilities.

Example 19 Let be independent nonnegative integer-valued random variables having a common density. Set and . Let be a nonnegative integer-valued random variable and suppose that are independent. Then is the sum of a random number of random variables. For an interpretation of suppose that at time 0 a random number of bacteria enters a system and that by time 1 the colony started by the th bacterium contains members. Then is the total number of bacteria present at time 1. Show that the probability generating function of is given by

To verify (31) we observe first that

Since is independent of , it is independent of , and hence . Thus

Consequently for

4 Expectation of Discrete Random Variables

4.1 Definition of expectation

The expected value is also called the mean of (or of the density of ) and is customarily denoted by . The mean is one way of trying to summarize a probability distribution by a single number that is supposed to represent a “typical value” of . How good this is depends on how closely the values of are clustered about the value . We will examine this question in more detail when we discuss the variance of in Section 4.3.

Example 1. Binomial distribution

Let have the binomial distribution with parameters and . Find .

For , assumes the two values 0 and 1 with probabilities and respectively. Hence

Since a random variable having a binomial density with parameters 1 and is just an indicator random variable, we see that we can find the probability of the event that by computing the expectation of its indicator.

We now compute for any . In this case assumes the values , and

To calculate this quantity we observe that

Thus

Making the change of variable we see that

By the binomial theorem

so we see that


Suppose now that is any discrete random variable having possible values . We would like to define the expectation of as

If has only a finite number of possible values , then (2) is just our previous definition. In the general discrete case, this definition is valid provided that the sum is well defined. For this to be the case we require that . This leads to the following.

Definition 1 Let be a discrete random variable having density . If then we say that has finite expectation and we define its expectation by (2). On the other hand if then we say does not have finite expectation and is undefined.

If is a nonnegative random variable, the fact that has finite expectation is usually denoted by .

Example 2. Poisson distribution

Let be Poisson distributed with parameter . Then

Example 3. Geometric distribution

Let have a geometric distribution with parameter . Find .

Now

Since a power series can be differentiated term by term, it follows that

Using the formula for the sum of a geometric progression, we see that

Example 4. A density without finite mean

Let be the function defined on by

and otherwise. The function obviously satisfies properties (i) and (ii) in the definition of density functions. To see that satisfies property (iii) we note that

and hence

Thus is a density. Now does not have finite mean because

and it is well known that the harmonic series does not converge.


4.2 Properties of expectation

Often we want to compute the expectation of a random variable such as or that is itself a function of the random vector . Of course, if we know the density of , this can be done by using (2). Quite frequently, however, the density of may not be known, or the computation of from a known density of may be quite difficult. Our next result will give us a way of deciding if has finite expectation and, if it does, of computing directly in terms of the density and the function .

Before stating this result we introduce a notational convention. Let be a discrete -dimensional random vector having possible values and density , and let be any real-valued function defined on . Then is defined as

Theorem 1 Let be a discrete random vector having density and let be a real-valued function defined on . Then the random variable has finite expectation if and only if

and, when (4) holds,

Proof. Let denote the distinct possible values of and let denote the distinct possible values of . For any there is at least one such that , but there may be more than one such . Let denote the collection of such ‘s, that is,

Then and denote exactly the same events. Thus

Consequently,

Since for in , it follows that

By their definition, the sets are disjoint for distinct values of , and their union is the set of all possible values of . Therefore

This shows that has finite expectation if and only if (4) holds. If does have finite expectation, then by repeating the above argument with the absolute signs eliminated, we conclude that (5) holds. ∎

Let be a random variable having density and let . Then by Theorem 1, has finite expectation if and only if . But, according to our definition of expectation, has finite expectation if and only if the same series converges. We see therefore that has finite expectation if and only if .

We shall now use Theorem 1 to establish the following important properties of expectation.

Theorem 2 Let and be two random variables having finite expectation.

(i) If is a constant and , then .

(ii) If is a constant, then has finite expectation and .

(iii) has finite expectation and

(iv) Suppose . Then ; moreover, if and only if .

(v) .

Proof. The proof of (i) is quite simple. If , then has density for and . Thus by (2)

To prove (ii) let and observe that

so has finite expectation. Thus by (5)

To establish (iii) set and let denote the joint density of and . Then

and hence has finite expectation. Applying (5) we see that

To prove (iv) observe that , and by (ii) and (iii) we see that

Since , the values that assumes must all be nonnegative. Thus and hence . This yields the first part of (iv). If , then . But then

Now the sum of nonnegative terms can equal zero only if all the individual terms equal zero. Since it must be that . Thus the only possible value of is 0 and consequently .

Finally, (v) follows from (iv) and (ii) because and hence . This completes the proof of the theorem. ∎

It easily follows from (ii) and (iii) that if are any random variables having finite expectation, and are any constants, then

It is useful to know that a bounded random variable always has finite expectation. More precisely,

Theorem 3 Let be a random variable such that for some constant , . Then has finite expectation and .

Proof. Let be the possible values of . Then for all . Indeed, if for some possible value , then

which contradicts the fact that . Consequently

so has finite expectation. Moreover by (v) of Theorem 2,

∎

It follows easily from Theorem 3 and (iii) of Theorem 2 that if and are two random variables such that has finite expectation and for some constant , , then also has finite expectation and . We leave the proof of this fact for the reader.

Since the expectation of the sum of two random variables is the sum of their expectations, one might suppose that the expectation of a product is the product of the expectations. That this is not true in general can be seen by considering the random variable taking values 1 and each with probability and setting . Then but .

There is an important case when this product rule is valid, namely, when and are independent random variables. We state this more formally as follows.

Theorem 4 Let and be two independent random variables having finite expectations. Then has finite expectation and

Proof. Observe that since and are independent, the joint density of and is . Thus

so has finite expectation. Using Theorem 1, we conclude that

∎

The converse of this property does not hold; two random variables and may be such that even though and are not independent.

Example 5

Let assume the values , , , and with equal probabilities. Then . Since it follows that and hence . To see that and are not independent observe, for example, that whereas . Thus

It is often easier to compute expectations by using the properties given in Theorem 2 than by using the definition directly. We now illustrate this technique with several examples.

Example 6. Binomial distribution

We already know from Example 1 that the mean of the binomial distribution with parameters and is . We can also derive this fact in a very simple manner by using the property that the expectation of a sum is the sum of the expectations (iii) of Theorem 2. To this end, let be independent Bernoulli random variables having parameter and set . Then has the binomial distribution with parameters and . By the first part of Example 1, for , and hence

Example 7. Hypergeometric distribution

Suppose we have a population of objects, of which are of type one and of type two. A sample of size is drawn without replacement from this population. Let denote the number of objects of type one that are obtained. Compute .

We know that has the hypergeometric distribution, so we could compute by using (2). It is far simpler, however, to proceed by introducing indicator random variables as follows. The random variable if and only if the th element in the sample is of type one. Then

But , so using (iii) of Theorem 2 we see that

Note that the random variables are not independent.

Example 8

Suppose we have a population of distinct objects labeled . Objects are drawn with replacement until exactly distinct objects have been obtained. Let denote the size of the sample required. Compute .

It is clear that and hence . Assume and let , . Then clearly . Now is the number of objects that must be drawn after the th new object enters the sample and until the st new object enters the sample. A moment’s thought shows that the event occurs if and only if the first objects drawn after the th new object enters the sample duplicate one of the previous objects, and the th object drawn after the th new object enters is different from the previous objects. Thus, as the trials are independent,

This shows that the random variable is geometric with parameter . Hence by Example 3, , and

Consequently,

We point out for later use that it is clear from the construction of the that they are mutually independent random variables.

In the previous chapter we have seen that nonnegative integer-valued random variables play a prominent role. For these random variables the following theorem can frequently be applied both to decide if has finite expectation and to compute the expectation of .

Theorem 5 Let be a nonnegative integer-valued random variable. Then has finite expectation if and only if the series converges. If the series does converge, then

Proof. We will show that

from which the theorem follows immediately. To this end we first write the left side of (10) as

It is permissible to interchange the order of summation and rewrite this expression as

Replacing the dummy variable by the dummy variable in the right side of this equality, we obtain the right side of (10). This shows that (10) holds, as desired. ∎

For an elementary application of this theorem, suppose that is a geometrically distributed random variable having parameter . Then and thus by the theorem

This agrees with the result found in Example 3.


4.3 Moments

Let be a discrete random variable, and let be an integer. We say that has a moment of order if has finite expectation. In that case we define the th moment of as . If has a moment of order then the th moment of , where is the mean of , is called the th central moment (or the th moment about the mean) of . By Theorem 1 we can compute the th moment and the th central moment of directly from the density by the formulas

and

In view of (11) and (12), the th moment and th central moment are determined by the density , and it therefore makes perfectly good sense to speak of them as the th moment and th central moment of this density.

Suppose has a moment of order ; then has a moment of order for all . To see this, observe that if , then

while for

Thus in either case it is always true that

Thus, by the comparison theorem for the convergence of series, we see that

so has finite expectation.

On the other hand, as was shown in Example 4, a random variable may not have even a first moment. A simple modification of this example shows that a random variable may have a moment of order but possess no higher order moment. (See Exercise 9.)

The first moment is just the mean of . In general, the more moments of that we know the more information we have gained about the distribution of ; however, in applications it is the first two moments that are usually of major interest.

By property (iii) of Theorem 2 we know that if and both have a finite first moment, then so does . We will now show that this desirable property holds true for moments of order as well.

Theorem 6 If the random variables and have moments of order , then also has a moment of order .

Proof. This theorem rests on the following simple inequality. For any nonnegative integer ,

To see this, observe that if , then ; while if , then . Thus (13) holds. Using (13) and the binomial theorem we now see that

But

because

Consequently

Let be the joint density of and . Then

Hence by Theorem 1, has finite expectation. ∎

It follows easily by induction that if all have a moment of order , then so does .

Let be a random variable having a finite second moment. Then the variance of , denoted by or , is defined by

By expanding the right-hand side we see that

One often denotes by and by . The nonnegative number is called the standard deviation of or of .

According to our previous discussion, the mean is the average value of the random variable . One use of the variance is as a measure of the spread of the distribution of about the mean. The more tends to deviate from its mean value , the larger tends to be, and hence the larger the variance becomes.

On the other hand, if and only if is a constant. To see this, observe that if for some constant , then and . Conversely, if , then and hence . Consequently .

An alternative use of the mean and variance is provided by the following problem, which is of interest in statistics. Let be a random variable having a finite second moment, and suppose we want to choose the value of that minimizes . Such a value would provide the best fit to by a constant if the error were measured by the mean square deviation.

One way of solving this problem is to use calculus. Note that

If we differentiate with respect to and set the derivative equal to zero, we see that . Since the second derivative is positive (in fact, it equals 2), the point corresponds to a minimum, and the minimum value is .

There is a second way of solving this problem that is also important to understand. Note that

Since , it follows that the cross-product term has zero expectation and hence

It is now clear from (15) that is at a minimum when and this minimum value is .

We can often find the moments of a nonnegative integer-valued random variable most simply by differentiating its probability generating function . Suppose for simplicity that

for some . Then we can regard as being defined on by

We can differentiate any number of times by differentiating the corresponding power series term by term. In particular

and

By our assumptions on , we can let in these formulas, obtaining

and

Thus the mean and variance of can be obtained from by means of the formulas

and

Similar formulas, in terms of the higher derivatives of at can be developed for the other moments of .

We now illustrate the use of these formulas with the following examples.

Example 9. Negative binomial distribution

Let be a random variable having a negative binomial distribution with parameters and . Find the mean and variance of .

From Example 17 of Chapter 3, we know that the generating function of is given by . Consequently,

and

Thus

and

Hence,

and

In particular, if has a geometric distribution with parameter , then (as we have already seen) and .

Example 10. Poisson distribution

Let have a Poisson distribution with parameter . Find the mean and variance of .

In Example 18 of Chapter 3 we found that . Thus

and

Consequently and . It follows immediately that

which agrees with the answer found in Example 2, and

This shows that if has a Poisson distribution with parameter , then the mean and variance of both equal .


4.4 Variance of a sum

Let and be two random variables each having finite second moment. Then has finite second moment and hence finite variance. Now

Thus, unlike the mean, the variance of a sum of two random variables is, in general, not the sum of the variances. The quantity

is called the covariance of and and written . Thus we have the important formula

Now

and hence taking expectations we see that

From this form, it is clear that whenever and are independent. (Example 5 shows that the converse is false.) We see from (16) that if and are independent random variables having finite second moments, then .

In particular if for some constant , then and are independent and the variance of equals zero; consequently

More generally, if are random variables each having a finite second moment, then

and, in particular, if are mutually independent, then

These formulas can be derived by a direct computation similar to (but more complicated than) that used for the case , or they can be established from the case by induction on .

In particular, if are independent random variables having a common variance (for example, if they each had the same density), then

Another elementary but quite useful fact is that . We leave the verification of this fact to the reader.

Example 11. Binomial distribution

Let be independent Bernoulli random variables each having the same probability of assuming the value 1. Then (see Example 6) the sum is binomially distributed with parameters and . We have previously shown that . Using (21) we find at once that

Now because is either 0 or 1. Thus and hence

Consequently .

In summary then, the mean of a binomially distributed variable is and its variance is .

Example 12. Hypergeometric distribution

Consider the situation in Example 7. We now want to compute , so as to obtain the variance of a hypergeometric distribution. To this end we will use Equation (19).

For the dependent indicators , we previously found that

Since we see that

Next we must compute the covariances. Assume that . Now unless both and are 1, so

Thus

Hence

It now follows from (19) that

It is interesting to compare the mean and variance for the hypergeometric distribution with those of the binomial distribution having the same success probability . Suppose we have a population of objects of which are of type one and are of type two. A random sample of size is drawn from the population. Let denote the number of objects of type one in the sample.

If the sampling is done with replacement then is binomially distributed with parameters and , and hence

On the other hand, if the sampling is done without replacement, then has a hypergeometric distribution,

The mean is the same in the two cases, but in sampling without replacement the variance is smaller. Intuitively, the closer is to the more deterministic becomes when we sample without replacement. Indeed, if then the variance is zero and . But if is large compared to , so that is close to zero, the ratio of the variances obtained in sampling with and without replacement is close to one. This is as it should be, since for fixed and large there is little difference between sampling with replacement and sampling without replacement.


4.5 Correlation coefficient

Let and be two random variables having finite nonzero variances. One measure of the degree of dependence between the two random variables is the correlation coefficient defined by

These random variables are said to be uncorrelated if . Since if and are independent, we see at once that independent random variables are uncorrelated. It is also possible for dependent random variables to be uncorrelated, as can be seen from Example 5.

It is important for applications in statistics to know that the correlation coefficient is always between and , and that if and only if for some constant . These facts are easy consequences of the following basic inequality called the Schwarz inequality.

Theorem 7 (Schwarz Inequality) Let and have finite second moments. Then

Furthermore, equality holds in (23) if and only if either or for some constant .

Proof. If , then , , and ; thus in this case (23) holds with equality. Also, if , then a simple computation will show that both sides of (23) are equal to .

We now show that (23) always holds. From the above discussion we can assume that and hence . The proof is based on a simple but clever trick. Observe that for any real number

This is a quadratic function of . Since the coefficient of is positive, the minimum is achieved for some value of , say , that can be found by the usual calculus method of setting the derivative equal to zero and solving. The answer is . Since the corresponding function value is

it follows that (23) holds. If equality holds in the Schwarz inequality (23), then from (24) we see that , so that

∎

Applying the Schwarz inequality to the random variables and we see that

that is,

Thus by the definition of

We also see from Theorem 7 that if and only if for some constant .

The correlation coefficient is of limited use in probability theory. It arises mainly in statistics and further discussion of it will be postponed to Volume II.


4.6 Chebyshev’s inequality

Let be a nonnegative random variable having finite expectation, and let be a positive real number. Define the random variable by setting if and if . Then is a discrete random variable having the two possible values 0 and which it assumes with probabilities and respectively. Thus

Now clearly and hence . Thus

or

Quite a variety of useful inequalities can be deduced from (25). The most important of these is the Chebyshev inequality.

Chebyshev’s Inequality. Let be a random variable with mean and finite variance . Then for any real number

To prove (26), we apply (25) to the nonnegative random variable and the number . We conclude that

Since if and only if we see that (26) holds.

Chebyshev’s inequality gives an upper bound in terms of and for the probability that deviates from its mean by more than units. Its virtue lies in its great generality. No assumption on the distribution of is made other than that it has finite variance. This inequality is the starting point for several theoretical developments. For most distributions that arise in practice, there are far sharper bounds for than that given by Chebyshev’s inequality; however, examples show that in general the bound given by Chebyshev’s inequality cannot be improved upon (see Exercise 26).

Let be independent random variables having the same distribution. These random variables may be thought of as independent measurements of some quantity that is distributed according to their common distribution. In this sense we sometimes speak of the random variables as constituting a random sample of size from this distribution.

Suppose that the common distribution of these random variables has finite mean . Then for sufficiently large we would expect that their arithmetic mean should be close to . If the also have finite variance, then

and thus as . As discussed in Section 4.3, this implies that as gets large the distribution of becomes more concentrated about its mean . More precisely, by applying Chebyshev’s inequality to we obtain the inequality

In particular, it follows from (27) that for any

We may interpret (28) in the following way. The number can be thought of as the desired accuracy in the approximation of by . Equation (28) assures us that no matter how small may be chosen the probability that approximates to within this accuracy, that is, , converges to 1 as the number of observations gets large. This fact is called the Weak Law of Large Numbers. We have proven the weak law only under the assumption that the common variance of the is finite. Actually this is not necessary; all that is needed is that the have a finite mean. We state this more general result in the following theorem. The proof will be given in Chapter 8.

Theorem 8 (Weak Law of Large Numbers) Let be independent random variables having a common distribution with finite mean and set . Then for any

Whenever the have finite mean, the weak law holds. However, when they also have finite variance, then (27) holds. This is a more precise statement since it gives us an upper bound for in terms of . We now illustrate the use of (27) by applying it to binomially distributed random variables.

Let be independent Bernoulli random variables assuming the value 1 with common probability . Then and . Thus (27) shows that

Since if (because by the usual calculus methods it can easily be shown that has its maximum value at ), it follows that regardless of what may be,

Equation (29) is useful when we know the value of , while (30) gives us a bound on that is valid for any value of . If is near , (29) and (30) do not differ by much, but if is far from the estimate given by (29) may be much better. (Actually even the bounds given by (29) are quite poor. We shall discuss another method in Chapter 7 that yields much better estimates.)

Suppose and are given. We may use (29) or (30) to find a lower bound on the number of trials needed to assure us that

Indeed, from (29) we see that this will be the case if . Solving for we find that . If we use (30), then trials will do. We state again that these bounds on given by Chebyshev’s inequality are poor and that in fact a much smaller number of trials may be sufficient.

As an illustration of the difference between these two estimates for , choose and . Then and from (30) we see that to guarantee that

we would need observations. Suppose, however, we knew that . Then since we see from (29) that observations will suffice. For , (29) gives the same estimate as (30), namely 2500.

To illustrate that the Chebyshev bounds are really poor in the case of the binomial distribution, suppose and . From (29) we then obtain

This should be compared with the exact value for this probability which is .038.

4 Expectation of Discrete Random Variables

4.1 Definition of Expectation

The expected value is also called the mean of (or of the density of ) and is customarily denoted by . The mean is one way of trying to summarize a probability distribution by a single number that is supposed to represent a “typical value” of . How good this is depends on how closely the values of are clustered about the value . We will examine this question in more detail when we discuss the variance of in Section 4.3.

Example 1: Binomial Distribution

Problem: Let have the binomial distribution with parameters and . Find .

Solution:

Case 1: For , assumes the two values and with probabilities and respectively.

Since a random variable having a binomial density with parameters and is just an indicator random variable, we see that we can find the probability of the event that by computing the expectation of its indicator.

Case 2: General In this case assumes the values .


Suppose now that is any discrete random variable having possible values . We would like to define the expectation of as:

If has only a finite number of possible values , then (2) is just our previous definition. In the general discrete case, this definition is valid provided that the sum is well defined. For this to be the case we require that . This leads to the following.

Definition 1: Let be a discrete random variable having density .

  1. If , then we say that has finite expectation and we define its expectation by (2).
  2. On the other hand, if , then we say does not have finite expectation and is undefined.

If is a nonnegative random variable, the fact that has finite expectation is usually denoted by .

Example 2: Poisson Distribution

Problem: Let be Poisson distributed with parameter . Find .

Solution:

Example 3: Geometric Distribution

Problem: Let have a geometric distribution with parameter . Find .

Solution:

(Note: The original text uses a slightly different indexing for the geometric series sum . If the sum starts at , . If the derivation follows the text’s specific steps:)

Example 4: A Density Without Finite Mean

Problem: Let be the function defined on by for and otherwise. Show is a density but does not have a finite mean.

Solution: Step 1: Verify is a density. We check if the sum of probabilities equals 1 using partial fraction decomposition.

Thus is a valid density.

Step 2: Check for finite mean. We examine the sum .

This is the harmonic series (minus the first term), which is well known to diverge (). Therefore, does not have finite expectation.


4.2 Properties of Expectation

Often we want to compute the expectation of a random variable such as or that is itself a function of the random vector . Of course, if we know the density of , this can be done by using (2). Quite frequently, however, the density of may not be known, or the computation of from a known density of may be quite difficult. Our next result will give us a way of deciding if has finite expectation and, if it does, of computing directly in terms of the density and the function .

Before stating this result we introduce a notational convention. Let be a discrete -dimensional random vector having possible values and density , and let be any real-valued function defined on . Then is defined as:

Theorem 1: Let be a discrete random vector having density and let be a real-valued function defined on . Then the random variable has finite expectation if and only if:

and, when (4) holds:

Proof: Let denote the distinct possible values of and let denote the distinct possible values of . For any there is at least one such that , but there may be more than one such . Let denote the collection of such ‘s, that is:

Then and denote exactly the same events. Thus:

Consequently, considering the absolute sum for expectation:

Since for in , it follows that:

By their definition, the sets are disjoint for distinct values of , and their union is the set of all possible values of . Therefore:

This shows that has finite expectation if and only if (4) holds. If does have finite expectation, then by repeating the above argument with the absolute signs eliminated, we conclude that (5) holds.

Let be a random variable having density and let . Then by Theorem 1, has finite expectation if and only if . But, according to our definition of expectation, has finite expectation if and only if the same series converges. We see therefore that has finite expectation if and only if .

We shall now use Theorem 1 to establish the following important properties of expectation.

Theorem 2: Let and be two random variables having finite expectation.

  1. If is a constant and , then .
  2. If is a constant, then has finite expectation and .
  3. has finite expectation and .
  4. Suppose . Then ; moreover, if and only if .
  5. .

Proof: (i) If , then has density for and . Thus by (2):

(ii) Let . Observe that:

so has finite expectation. Thus by (5):

(iii) Set and let denote the joint density of and . Then:

Hence has finite expectation. Applying (5) we see that:

(iv) Observe that . By (ii) and (iii) we see that:

Since , the values that assumes must all be nonnegative. Thus and hence . If , then . But then:

Now the sum of nonnegative terms can equal zero only if all the individual terms equal zero. Since it must be that . Thus the only possible value of is 0 and consequently .

(v) This follows from (iv) and (ii) because and hence .

It easily follows from (ii) and (iii) that if are any random variables having finite expectation, and are any constants, then:

It is useful to know that a bounded random variable always has finite expectation. More precisely:

Theorem 3: Let be a random variable such that for some constant , . Then has finite expectation and .

Proof: Let be the possible values of . Then for all . Indeed, if for some possible value , then:

which contradicts the fact that . Consequently:

So has finite expectation. Moreover by (v) of Theorem 2:

It follows easily from Theorem 3 and (iii) of Theorem 2 that if and are two random variables such that has finite expectation and for some constant , , then also has finite expectation and .

Since the expectation of the sum of two random variables is the sum of their expectations, one might suppose that the expectation of a product is the product of the expectations. That this is not true in general can be seen by considering the random variable taking values and each with probability and setting . Then but .

There is an important case when this product rule is valid, namely, when and are independent random variables. We state this more formally as follows.

Theorem 4: Let and be two independent random variables having finite expectations. Then has finite expectation and:

Proof: Observe that since and are independent, the joint density of and is . Thus:

So has finite expectation. Using Theorem 1, we conclude that:

The converse of this property does not hold; two random variables and may be such that even though and are not independent.

Example 5

Problem: Let assume the values , , , and with equal probabilities. Show but are not independent.

Solution: Step 1: Compute Expectations. Each outcome has probability .

Thus .

Step 2: Check Independence.

Since (as ), and are not independent.

It is often easier to compute expectations by using the properties given in Theorem 2 than by using the definition directly. We now illustrate this technique with several examples.

Example 6: Binomial Distribution (Revisited)

Problem: Derive the mean of the binomial distribution using linearity of expectation.

Solution: Let be independent Bernoulli random variables having parameter . Set . Then has the binomial distribution with parameters and . By Example 1 (Case 1), for .

Example 7: Hypergeometric Distribution

Problem: Suppose we have a population of objects, of which are of type one and of type two. A sample of size is drawn without replacement. Let denote the number of objects of type one obtained. Compute .

Solution: Introduce indicator random variables . The random variable if and only if the th element in the sample is of type one.

But . Using linearity (Theorem 2 iii):

(Note: The random variables are not independent, but linearity holds regardless.)

Example 8: Coupon Collector Problem Variant

Problem: Suppose we have a population of distinct objects labeled . Objects are drawn with replacement until exactly distinct objects have been obtained. Let denote the size of the sample required. Compute .

Solution: It is clear that and hence . Assume and let for . Then clearly . Now is the number of objects that must be drawn after the th new object enters the sample and until the st new object enters the sample. The event occurs if and only if the first objects drawn after the th new object enters the sample duplicate one of the previous objects, and the th object drawn is different from the previous objects. Thus, as the trials are independent:

This shows that the random variable is geometric with parameter . (Note: The text says is geometric, but based on the PMF , itself is geometric starting at 1). Using the mean of a geometric distribution ():

Consequently:

In the previous chapter we have seen that nonnegative integer-valued random variables play a prominent role. For these random variables the following theorem can frequently be applied both to decide if has finite expectation and to compute the expectation of .

Theorem 5: Let be a nonnegative integer-valued random variable. Then has finite expectation if and only if the series converges. If the series does converge, then:

Proof: We will show that:

To this end we first write the left side of (10) as:

It is permissible to interchange the order of summation and rewrite this expression as:

Replacing the dummy variable by the dummy variable in the right side of this equality, we obtain the right side of (10).

Application: Suppose that is a geometrically distributed random variable having parameter .

This agrees with the result found in Example 3.


4.3 Moments

Let be a discrete random variable, and let be an integer. We say that has a moment of order if has finite expectation. In that case we define the th moment of as . If has a moment of order then the th moment of , where is the mean of , is called the th central moment (or the th moment about the mean) of . By Theorem 1 we can compute the th moment and the th central moment of directly from the density by the formulas:

and

Suppose has a moment of order ; then has a moment of order for all . To see this, observe that if , then , while for , . Thus in either case it is always true that . Thus, by the comparison theorem for the convergence of series:

so has finite expectation.

Theorem 6: If the random variables and have moments of order , then also has a moment of order .

Proof: This theorem rests on the following simple inequality. For any nonnegative integer :

To see this, observe that if , then ; while if , then . Thus (13) holds. Using (13) and the binomial theorem we now see that:

Let be the joint density of and . Then:

Hence by Theorem 1, has finite expectation.

Let be a random variable having a finite second moment. Then the variance of , denoted by or , is defined by:

By expanding the right-hand side we see that:

One often denotes by and by . The nonnegative number is called the standard deviation of .

Optimization Property: Let be a random variable having a finite second moment. We want to choose the value of that minimizes .

It is now clear that is at a minimum when and this minimum value is .

We can often find the moments of a nonnegative integer-valued random variable most simply by differentiating its probability generating function .

Differentiating term by term:

Thus:

Example 9: Negative Binomial Distribution

Problem: Let be a random variable having a negative binomial distribution with parameters and . Find the mean and variance of .

Solution: The generating function is . Step 1: First Derivative.

Evaluate at :

So .

Step 2: Second Derivative.

Evaluate at :

Step 3: Variance.

Example 10: Poisson Distribution

Problem: Let have a Poisson distribution with parameter . Find the mean and variance of .

Solution: The generating function is . Step 1: Derivatives.

Step 2: Evaluate at .

Step 3: Mean and Variance.


4.4 Variance of a Sum

Let and be two random variables each having finite second moment. Then has finite second moment and hence finite variance.

The quantity is called the covariance of and and written . Thus we have the important formula:

Now:

Taking expectations:

From this form, it is clear that whenever and are independent. We see from (16) that if and are independent random variables having finite second moments, then .

In particular if for some constant , then and are independent and the variance of equals zero; consequently:

More generally, if are random variables each having a finite second moment, then:

And, in particular, if are mutually independent, then:

In particular, if are independent random variables having a common variance , then:

Example 11: Binomial Distribution Variance

Problem: Let be independent Bernoulli random variables each having probability . Let . Find .

Solution: Using (21):

Now because is either 0 or 1.

Consequently .

Example 12: Hypergeometric Distribution Variance

Problem: Compute for the hypergeometric distribution (sampling without replacement from Example 7).

Solution: We use Equation (19). Step 1: Variance of Indicators. For the dependent indicators :

Since :

Step 2: Covariance. Assume .

Thus:

Step 3: Sum of Covariances. There are pairs.

Step 4: Total Variance.


4.5 Correlation Coefficient

Let and be two random variables having finite nonzero variances. One measure of the degree of dependence between the two random variables is the correlation coefficient defined by:

These random variables are said to be uncorrelated if .

Theorem 7 (Schwarz Inequality): Let and have finite second moments. Then:

Furthermore, equality holds in (23) if and only if either or for some constant .

Proof: Observe that for any real number :

This is a quadratic function of . Since the coefficient of is positive, the minimum is achieved for . Since the corresponding function value is non-negative:

It follows that .

Applying the Schwarz inequality to the random variables and :


4.6 Chebyshev’s Inequality

Let be a nonnegative random variable having finite expectation, and let be a positive real number. Define by setting if and if .

Since , . Thus:

Chebyshev’s Inequality: Let be a random variable with mean and finite variance . Then for any real number :

Proof: Apply (25) to the nonnegative random variable and the number .

Since , (26) holds.

Weak Law of Large Numbers: Let be independent random variables having a common distribution with finite mean and set . Then for any :

If the also have finite variance :

Applying Chebyshev’s inequality to :

Application to Binomial: Let be Bernoulli(). Then and .

Since :