You are on page 1of 14

The Expected Value and Variance of a Discrete Random

Variable
Consider the following consumer-sampling situation. Draw a
random sample of n = 5 consumers from a very large number
–say, 10,000– and record the number x of consumers who favor
toothpaste brand A. Suppose 2,000 of the consumers actually
prefer brand A. Replace the five consumers in the population and
randomly draw a new sample of n = 5 consumers. Record the
value of x again. Repeat this process over and over again 100,000
times.

a) Construct a relative frequency distribution for the 100,000


values of x shown below:
x Frequency Relative p(x)
Frequency
0 32,891 0.32891 0.3277
1 40,929 0.40929 0.4096
2 20,473 0.20473 0.2048
3 5,104 0.05104 0.0512
4 599 0.00599 0.0064
5 4 0.00004 0.0003

100,000 1 1

How do we get p(x)?

In how many ways can x take on the values of 0 or 5?

0.8 0.8 0.8 0.8 0.8 = 5 subjects not preferring A


0.2 0.2 0.2 0.2 0.2 = 5 subjects preferring Brand A
p(0) = 1*(0.85) = 0.32768
p(5) = 1*(0.25) = 0.00032

In how many ways can x take on the value of 1?

1
0.2 0.8 0.8 0.8 0.8 |
0.8 0.2 0.8 0.8 0.8 |
0.8 0.8 0.2 0.8 0.8 |
0.8 0.8 0.8 0.2 0.8 In five ways.
0.8 0.8 0.8 0.8 0.2 |

p(1) = 5*(0.21 * 0.84) = 0.4096

In how many ways can x take on the value of 2?

0.2 0.2 0.8 0.8 0.8 |


0.2 0.8 0.2 0.8 0.8 |
0.2 0.8 0.8 0.2 0.8 |
0.2 0.8 0.8 0.8 0.2 |
0.8 0.2 0.2 0.8 0.8 |
0.8 0.2 0.8 0.2 0.8 |
0.8 0.2 0.8 0.8 0.2 |
0.8 0.8 0.2 0.2 0.8 |
0.8 0.8 0.2 0.8 0.2 In ten ways.
0.8 0.8 0.8 0.2 0.2 |

p(2) = 10*(0.22 * 0.83) = 0.2048

In how many ways can x take on the value of 3?

2
0.2 0.2 0.2 0.8 0.8 |
0.2 0.2 0.8 0.2 0.8 |
0.2 0.2 0.8 0.8 0.2 |
0.2 0.8 0.2 0.2 0.8 |
0.2 0.8 0.2 0.8 0.2 |
0.2 0.8 0.8 0.2 0.2 |
0.8 0.2 0.2 0.2 0.8 |
0.8 0.2 0.2 0.8 0.2 |
0.8 0.2 0.8 0.2 0.2 In ten ways.
0.8 0.8 0.2 0.2 0.2 |

p(3) = 10*(0.23 * 0.82) = 0.0512

In how many ways can x take on the value of 4?

0.2 0.2 0.2 0.2 0.8 |


0.2 0.2 0.2 0.8 0.2 |
0.2 0.2 0.8 0.2 0.2 |
0.2 0.8 0.2 0.2 0.2 In five ways.
0.8 0.2 0.2 0.2 0.2 |

p(4) = 5*(0.24 * 0.81) = 0.0064

Using the Binomial Table:

3
p(x) Cumulative
p(x)
0.3277 0.3277
0.4096 0.7373
0.2048 0.9421
0.0512 0.9933
0.0064 0.9997
0.0003 1

n = 5, p = 0.2

If the probability of a 0 or a 1 is 0.737, then the probability of a 1


is 0.737 - 0.328 = 0.409

Another example: n = 20, p = 0.01

What is the probability of 7 or fewer successes? 1.000

What is the probability of 7 successes?

1.000 - (six or less) = 1 - 1 = 0.000

Another example: n = 20, p = 0.25

4
x 0.25 Cumulative
0 0.0032 0.0032
1 0.0211 0.0243
2 0.0669 0.0912
3 0.1339 0.2251
4 0.1897 0.4148
5 0.2023 0.6171
6 0.1686 0.7857
7 0.1124 0.8981
8 0.0609 0.9590
9 0.0271 0.9861
10 0.0099 0.9960
11 0.0030 0.9990
12 0.0008 0.9998
13 0.0002 1
14 0 1

What is the probability of 7 or fewer successes? 0.8981

What is the probability of 7 successes?


0.898 - (six or less) = 0.8981 - 0.7857 = 0.1124

The mean m (or expected value) of a discrete random variable x is


equal to the sum of the products of each value of x and the
corresponding value of p(x): m = Sxp(x)

The variance s2 of a discrete random variable x is equal to the


sum of the products of (x - m)2 and the corresponding value of
p(x):
s2 = S(x - m)2 p(x) = Sx2 p(x) - m2

5
The standard deviation s of a random variable x is equal to the
positive square root of the variance.

Go back to the toothpaste example:

a) Find the value for m –i.e., the expected value– for the
distribution:

x p(x) xp(x)

0 0.3277 0
1 0.4096 0.4096
2 0.2048 0.4096
3 0.0512 0.1536
4 0.0064 0.0256
5 0.00032 0.0016

sum[xp(x)] = 1

b) Interpret the value of m:

The value m = 1 implies that over a long series of surveys


similar to the one described above, the average number of
consumers in the sample of 5 who favor toothpaste brand A
will equal 1.

The key to the interpretation of m is to think in terms of


repeating the experiment over a long series of trials; in the
long run the value will approach 1.

6
c) Find the standard deviation of x:
x p(x) xp(x) (x - )^2 * p(x)

0 0.3277 0 1 0.3277
1 0.4096 0.4096 0 0
2 0.2048 0.4096 1 0.2048
3 0.0512 0.1536 4 0.2048
4 0.0064 0.0256 9 0.0576
5 0.00032 0.0016 16 0.00512

sum[xp(x)] = 1 Variance = 0.8 Ü Sum

St. Dev. = (0.8) = 0.894427

CASE: Insurance companies rely heavily on probability


theory when they compute the premiums to be
charged for various life insurance and annuity products.
Probabilities are often computed on the basis of life tables like the
accompanying table, which tabulates the average number of
American males per 100,000 who will die during various age
intervals. For example, out of 100,000 male babies born alive,
1,527 will die before their first birthday, and 29,721 will live to the
age of 80. Answer the following questions based on this life table.

a) What is the probability that a newborn male will reach the


age of 50?
… the age of 70?
b) What is the probability that an American male will reach the
age of 70, given that he has just turned 50?
c) What is the probability that an American male will reach the
age of 70, given that he has just turned 60?
AGE NUMBER OF

7
INTERVAL. DEATHS

0-1 1,527 1,527


1-10 495 2,022
10-20 927 2,949
20-30 1,901 4,850
30-40 2,105 6,955
40-50 4,502 11,457 < P(dying before 50)
50-60 10,330 21,787
60-70 19,954 41,741
70-80 28,538 70,279
80 and over 29,721 100,000

P(reaching the age of 50) = 1 - 0.11457 = 0.88543

P(reaching the age of 70) = (28,538 + 29,721) / 100,000 = 0.58259

P(reaching 70|just turned 50) = (28,538 + 29,721) / 88,543 = 0.657974

P(reaching 70|just turned 60) = (28,538 + 29,721) / 78,213 = 0.744876

CASE Continued: Earlier in the case it was noted that


insurance companies rely heavily on
probability theory when they compute the premiums to charge for
various life insurance and annuity products. Suppose a 40-year-old
male purchases a $100,000 10-year term life policy from an
insurance company, meaning that the insurance company must pay
out $100,000 if the insured male dies within the next 10 years.

8
a) Use the accompanying life table (above) to determine the
insurance company's expected payout on this policy

P(dying when 40-50| lived to 40) =

4,502 / (4,502 + 10,330 + 19,954 + 28,538 + 29,721) =

0.04838519

E(X) = (100,000*0.04838519) + (0*[1- 0.04838519]) =

$4,838.519

b) What would the expected payout be if the same policy were


taken out by a 50-year-old male?

10,330 / (10,330 + 19,954 + 28,538 + 29,721) =

0.116666478

E(X) = (100,000*0.116666478) + (0*[1- 0. 0.116666478]) =

$11,666.65

9
Combinations and Permutations

Permutations: An arrangement of a set of n objects in a given


order is called a permutation of the n objects.

n Pn = n!

Combinations: In many applications the particular ordering of


objects is not a consideration. When this is the
case, we need to determine the number of
combinations of n items taken r at a time.

nCr = n! / r! (n – r)!

Example: Things have been good at Dewey, Scroughem, and


Howe –a lawfirm in Pittsburgh– who at the
present has more potential new cases than they can accept.
General human-power is not a problem, but only five members of
the firm have the necessary experience to handle the twelve
possible new issues being considered. 1. How many possible
groupings of five new issues can the firm handle? 2. Once the five
are selected, how many possible ways can they be arranged among
the five experienced firm members?

Order not important in first part: 12C5 = 12! / 5!(12 - 5)!

479001600 / (120*5040) = 792

In the second part order is important: 5P5 = 5! / (5-5)! = 5! / 0! =

120

10
Example: A local company has been in trouble recently over
hiring male applicants rather than female
applicants. The last three employees hired were all male, even
though the six applicants for the three positions included three
females.
Is this process rigged?
P(A) =
# of ways to hire three males

# of ways to hire three from six applications


Elementary event Outcomes
1 M1 M2 M3
2 M1 M2 F1
3 M1 M2 F2
4 M1 M2 F3
5 M1 M3 F1
6 M1 M3 F2
7 M1 M3 F3
8 M2 M3 F1
9 M2 M3 F2
10 M2 M3 F3
11 M1 F1 F2
12 M1 F1 F3
13 M1 F2 F3
14 M2 F1 F2
15 M2 F1 F3
16 M2 F2 F3
17 M3 F1 F2
18 M3 F1 F3
19 M3 F2 F3
20 F1 F2 F3
P(A) = 1/20 = 0.05
So, the problem boils down to the following:

11
Should 0.05 be viewed as a very small probability?
Listing the entire sample space is a bit tedious! For example, if
there are 12 applicants –five male and seven female– now, what is
the probability that all three positions go to men if the selection
process is fair?
P(A) = 5C3 / 12C3 = [5! / 3!2!] / [12! / 3!9!] =
=((120/(6*2)) / ((479001600 / (6*362880)) = 0.045455

THE POISSON DISTRIBUTION

CASE: A tollbooth operator has observed that cars arrive


randomly at an average rate of 360 cars per hour.

a) Using the formula, calculate the probability that only two


cars will arrive during a specified one-minute period.

m (often called l = lambda) = 360/60 = 6

P(X = 2) = (e-6) (62) / 2! = (0.002479 * 36) / 2 » 0.0446

In EXCEL you can compute e (2.718282) as follows:

=(EXP(1) , and the factorial of any number as

=(FACT(x))

b) Using Table 7 (p. A-20), find the probability that only two
cars will arrive during a specified one-minute period.

P(X = 2) = 0.0446

c) Using Table 7 (p. A-20), find the probability that at least four
cars will arrive during a specified one-minute period.

12
P(X ³ 4) = 1 - P(X £ 3) =
1 – (0.0025+0.0149+0.0446+0.0892) = 1 – 0.1512 = 0.8488
CASE: Assume that you are responsible for scheduling
airplane crews for the many different airports
that your company serves. FAA regulations as well as unions are
very strict in enforcing the proper crew size. Knowing that crew
members from time to time get sick, are delayed flying in to the
hub, etc., you need to keep a few extras around at Hub X. You
don't want to keep too many, because of the cost, but you are not
willing to take more than a 2% risk of being short-staffed. Past
history tells you that the average number of "absent" crew
members per day is 3. Assume that the Poisson process applies.
How many standby crew members should you keep on duty?
m=3
not willing to take more than a 2% risk of being short-staffed:
Cumulate backwards from the "decumulated" probability vector
until you reach/surpass 0.02 (the risk you are willing to take)
m=3 k Probability Cumulative
0 0.0498
1 0.1494
2 0.2240
3 0.2240
4 0.1680
5 0.1008
6 0.0504
7 0.0216 0.0335
8 0.0081 0.0119
9 0.0027 0.0038
10 0.0008 0.0011
11 0.0002 0.0003
12 0.0001 0.0001
Should we keep 7 or 8 crew members on standby?

13
7: If seven are absent and we have 7 on standby, we are
not short! If 8 are absent we are, but p = 0.0119
< 0.02

14

You might also like