• No results found

The Mean and the Variance of a Probability Distribution

4 P ROBABILITY D ISTRIBUTIONS

Enter 7 in Number of trials and .33 in Probability of success

4.4 The Mean and the Variance of a Probability Distribution

Besides the binomial and hypergeometric distributions, there are many other prob-ability distributions that have important engineering applications. However, before we go any further, let us discuss some general characteristics of probability distributions.

One such characteristic, that of the symmetry or skewness of a probability dis-tribution, was illustrated in Figure 4.4; two other characteristics are apparent in Fig-ure 4.6, which shows the probability histograms of two binomial distributions. One of these binomial distributions has the parameters n= 4 and p = 1/2, and the other has the parameters n= 16 and p = 1/2. Essentially, these two probability distribu-tions differ in two respects. The first probability distribution is centered about x= 2, whereas the other (whose histogram is shaded) is centered about x= 8, and we say

Figure 4.6

Probability histograms of two binomial distributions

12

0.4

0.3

0.2

0.1

0

n 5 16 p 5

12

n 5 4 p 5

x 0 1 2 3 4 5 6

b(x)

7 8 9 10 11 12 13 14 15 16

that the two distributions differ in their location. Another distinction is that the his-togram of the second distribution is broader, and we say that the two distributions differ in variation. To make such comparisons more specific, we shall introduce in this section two of the most important statistical measures, describing the loca-tion and the varialoca-tion of a probability distribuloca-tion—the mean and the variance, respectively.

The mean of a probability distribution is simply the mathematical expectation of a random variable having that distribution. If a random variable X takes on the values x1, x2, . . . , or xk, with the probabilities f (x1), f (x2), . . . , and f (xk), its mathemat-ical expectation or expected value is

x1· f (x1)+ x2· f (x2)+ · · · + xk· f (xk) = 

(value)× (probability) using the

notation.

The mean of a probability distribution is denoted by the Greek letterμ (mu).

Alternatively, the mean of a random variable X , or its probability distribution, is called its expected value and is denoted by E ( X ). Bothμ and E ( X ) refer to the same quantity.

Mean of discrete probability distribution

μ = E ( X )

= 

all x

x· f ( x )

The mean of a probability distribution measures its center in the sense of an average, or by analogy to physics, in the sense of a center of gravity. Note that the above formula for μ is, in fact, that for the first moment about the origin of a discrete system of masses f (x) arranged on a weightless straight line at distances x

Sec 4.4 The Mean and the Variance of a Probability Distribution 109

from the origin. We do not have to divide here by

 all x

f (x)

as we do in the usual formula for the x-coordinate of the center of gravity, since the sum equals 1 by definition.

EXAMPLE 10 The mean number of heads in three tosses of a fair coin

Find the mean of the probability distribution of the number of heads obtained in 3 flips of a balanced coin.

Solution The probabilities for 0, 1, 2, or 3 heads are 1 8,3

8,3 8, and 1

8 as can easily be verified by counting equally likely possibilities or by using the formula for the binomial distribution with n= 3 and p = 1

2. Thus, μ = 0 · 1

8+ 1 ·3 8+ 2 · 3

8+ 3 · 1 8 = 3

2 j

EXAMPLE 11 The mean number of preferred used car attributes

With reference to the used car example and the probabilities given on page 105, find the mean of the probability distribution of the number of preferred attributes.

Solution Substituting x= 0, 1, 2, and 3 and the corresponding probabilities into the formula forμ, we get

μ = 0 (0.18) + 1 (0.50) + 2 (0.29) + 3 (0.03)

= 1.17 j

Returning to the second probability distribution of Figure 4.6, we could find its mean by calculating all the necessary probabilities (or by looking them up in Table 1) and substituting them into the formula forμ. However, if we reflect for a moment, we might argue that there is a 50-50 chance for a success on each trial, there are 16 trials, and it would seem reasonable to expect 8 heads and 8 tails (in the sense of a mathematical expectation). Similarly, we might argue that if a binomial distribution has the parameters n= 200 and p = 0.20, we can expect a success 20% of the time and, hence, on the average 200(0.20) = 40 successes in 200 trials. These two values are, indeed, correct, and it can be shown in general that

Mean of binomial

distribution μ = n · p

for the mean of a binomial distribution. To prove this formula, we substitute the expression that defines b(x; n, p) into the formula for μ, and we get

μ =

n x=0

x· n!

x!(n− x)! px(1− p)n−x Then, making use of the fact that

x

x! = 1

(x− 1)!

and n!= n(n − 1)!, we factor out n and p to obtain μ = np

n x=1

(n− 1)!

(x− 1)!(n − x)! px−1(1− p)n−x

where the summation starts with x= 1 since the original summand is zero for x = 0.

If we now let y= x − 1 and m = n − 1, we obtain μ = np

m y=0

m!

y!(m− y)! py(1− p)m−y

and this last sum can easily be recognized as that of all the terms of the binomial distribution with the parameters m and p. Hence, this sum equals 1 and it follows thatμ = np.

EXAMPLE 12 Usingμ = np to find the mean number of heads in three tosses Find the mean of the probability distribution of the number of heads obtained in 3 flips of a balanced coin.

Solution For a binomial distribution with n= 3 and p = 1

2, we getμ = 3 · 1 2 = 3

2, and this

agrees with the result obtained on page 109. j

The formula μ = np applies, of course, only to binomial distributions. For other special distributions, we can express the mean in terms of their parameters.

For instance, for the mean of the hypergeometric distribution with the parameters n, a, and N, we can write

Mean of hypergeometric

distribution μ = n · a

N

In Exercise 4.43, the reader will be asked to derive this formula by a method similar to the one we used to derive the formula for the mean of a binomial distribution.

EXAMPLE 13 Using the formula for the mean of a hypergeometric distribution With reference to Example 8 in which 5 of 20 cell phone chargers are defective, find the mean of the probability distribution of the number of defectives in a sample of 10 randomly chosen for inspection.

Solution Substituting n= 10, a = 5, and N = 20 into the above formula for μ, we get μ = 10 · 5

20 = 2.5

In other words, if we inspect 10 of the chargers, we can expect 2.5 defectives, where expect is to be interpreted in the sense, it represents the long-run average number of defectives if 10 chargers are repeatedly selected from 20 chargers of which 5 are

defective. j

To study the second of the two properties of probability distributions mentioned on page 118, their variation, let us refer again to the two probability distributions of Figure 4.6. For the one where n= 4, there is a high probability of getting values close to the mean, but for the one where n= 16, there is a high probability of getting values scattered over considerable distances away from the mean. Using this property, it

Sec 4.4 The Mean and the Variance of a Probability Distribution 111

may seem reasonable to measure the variation of a probability distribution with the quantity

 all x

(x− μ) · f (x)

namely, the average amount by which the values of the random variable deviate from the mean. Unfortunately,

 all x

( x− μ ) · f (x) = all x

x· f (x) − all x

μ · f (x)

= μ − μ · all x

f (x)= μ − μ = 0

so that this expression is always equal to zero. However, since we are really inter-ested in the magnitude of the deviations x−μ and not in their signs, it suggests itself that we average the absolute values of these deviations from the mean. This would, indeed, provide a measure of variation, but on purely theoretical grounds we prefer to work instead with the squares of the deviations from the mean. These quantities are also nonnegative, and their average is indicative of the spread or dispersion of a probability distribution. We thus define the variance of a probability distribution

f (x), or that of the random variable X which has that probability distribution, as

Variance of probability distribution

σ2= all x

( x− μ)2· f (x)

whereσ is the lowercase Greek letter for s. This measure is not in the same units (or dimension) as the values of the random variable, but we can adjust for this by taking the square root. This results in a measure of variation that is expressed in the same units in which the random variable is expressed. The standard deviation is defined as

Standard deviation of

probability distribution σ = 

all x

( x− μ)2· f (x)

EXAMPLE 14 Calculating the standard deviations of two probability distributions Compare the standard deviations of the two probability distributions of Figure 4.6, on page 118.

Solution Sinceμ = 4 · 1

2 = 2 for the binomial distribution with n = 4 and p = 1

2, we find that the variance of this probability distribution is

σ2= (0 − 2)2· 1

16+ (1 − 2)2· 4

16+ (2 − 2)2· 6 16 + (3 − 2)2· 4

16+ (4 − 2)2· 1 16 = 1

and, hence, that its standard deviation isσ = 1. Similarly, it can be shown that for the other distributionσ = 2, and we find that the second (shaded) distribution with the greater spread also has the greater standard deviation. j

An alternative formula for variance, that the reader is asked to verify in Exer-cise 4.49, sometimes simplifies the calculation of variance.

Computing formula for variance

σ2= 

all x

x2· f ( x ) − μ2

= E [ X2] − μ2

where E [ X2] is defined as  all x

x2· f ( x ) .

EXAMPLE 15 Calculating variance using the alternative computing formula

Use the preceding computing formula to determine the variance of the probability distribution of the number of points rolled with a balanced die.

Solution Since f (x)= 1

6for x= 1, 2, 3, 4, 5, and 6, we get μ = 1 ·1

6+ 2 ·1 6 + 3 ·1

6+ 4 · 1 6+ 5 · 1

6+ 6 · 1 6

= 7 2 E ( X2)= 12· 1

6+ 22·1

6 + 32· 1

6+ 42· 1

6+ 52·1

6+ 62· 1 6

= 91 6 and, hence,

σ2= 91 6 −

7 2

2

= 35 12

j

EXAMPLE 16 The mean and variance of the number of incorrect addresses

As part of a quality-improvement project focused on the delivery of mail at a depart-ment office within a large company, data were gathered on the number of different addresses that had to be changed so the mail could be redirected to the correct mail stop. The distribution, given in the first two columns of the table below, describes the number of redirects per delivery. Compute the mean and variance.

Solution We determine the columns x f (x) and x2f (x)

x f (x) x f (x) x2f (x)

0 .05 .0 0.0

1 .20 .2 0.2

2 .45 .9 1.8

3 .20 .6 1.8

4 .10 .4 1.6

Total 2.1 5.4

soμ = 2.1 and σ2= 5.4 − (2.1)2= 0.990. j

Sec 4.4 The Mean and the Variance of a Probability Distribution 113

Given any probability distribution, we can always calculateσ2by substituting the corresponding probabilities f (x) into the formula which defines the variance. As in the case of the mean, however, this work can be simplified to a considerable extent when we deal with special kinds of distributions. For instance, it can be shown that the variance of the binomial distribution with the parameters n and p is given by the formula

Variance of binomial

distribution σ2= n · p · (1 − p)

EXAMPLE 17 Using the formula for variance of the binomial distribution

Verify the result stated in the preceding example, thatσ = 2 for the binomial distri-bution with n= 16 and p = 1

2. Solution Substituting n= 16 and p =1

2into the formula for the variance of a binomial distri-bution, we get

σ2= 16 ·1 2· 1

2 = 4 and, hence,σ =

4= 2. j

The variance of the hypergeometric distribution with the parameters n, a, and N is Variance of

hypergeometric distribution

σ2= n a N

 1− a

N

 N− n N− 1



The factor (N− n)/(N − 1) adjusts for the finite population.

EXAMPLE 18 Using the formula for variance of the hypergeometric distribution With reference to Example 8 in which 5 of 20 cell phone chargers are defective, find the standard deviation of the probability distribution of the number of defectives in a sample of 10 randomly chosen for inspection.

Solution Substituting n= 10, a = 5, and N = 20 into the formula for the variance of a hyper-geometric distribution, we get

σ2= 10 5 20

 1− 5

20

 20− 10 20− 1



= 75 76 and, hence,σ =

75/76 = 0.99. j

When we first defined the variance of a probability distribution, it may have occurred to the reader that the formula looked exactly like the one which we use in physics to define second moments, or moments of inertia. Indeed, it is customary in statistics to define the kth moment about the origin as

μk= all x

xk· f (x)

and the kth moment about the mean as μk =

all x

(x− μ)k· f (x)

Thus, the meanμ is the first moment about the origin, and the variance σ2is the sec-ond moment about the mean. Higher moments are often used in statistics to give fur-ther descriptions of probability distributions. For instance, the third moment about the mean (divided by σ3 to make this measure independent of the scale of mea-surement) is used to describe the symmetry or skewness of a distribution; the fourth moment about the mean (divided byσ4) is, similarly, used to describe its “peaked-ness,” or kurtosis. To determine moments about the mean, it is usually easiest to express moments about the mean in terms of moments about the origin and then to calculate the necessary moments about the mean. For the second moment about the mean we thus have the important formulaσ2= μ2− μ2.