Transcript Document
Chapter 5
Discrete Random
Variable
1
Chapter 5 Discrete Random Variable
5.1 Introduction
5.2 Random Variables
5.3 Expected Value
5.4 Variance of Random Variables
5.5 Binomial Random Variables
5.6 Hypergeometric Random Variables
5.7 Poisson Random Variables
2
Introduction
The National Basketball Association (NBA) draft (選秀) lottery involves the 11 teams that
had the worst won–lost records during the preceding year.
Sixty-six Ping-Pong balls are placed in an urn.
Each of these balls is inscribed (刻印) with the name of a team; 11 have the name of the
team with the worst record, 10 have the name of the team with the second-worst record,
9 have the name of the team with the third-worst record, and so on (with 1 ball having the
name of the team with the 11th-worst record).
A ball is then chosen at random, and the team whose name is on the ball is given the first
pick in the draft of players about to enter the league (球隊).
All the other balls belonging to this team are then removed, and another ball is chosen.
The team to which this ball “belongs” receives the second draft pick.
Finally, another ball is chosen, and the team named on this ball receives the third draft pick.
The remaining draft picks, 4 through 11, are then awarded to the 8 teams that did not “win
the lottery (樂透),” in inverse order of their won–lost records.
For instance, if the team with the worst record did not receive any of the 3 lottery picks,
then that team would receive the fourth draft pick.
The outcome of this draft lottery is the order in which the 11 teams get to select players.
3
Introduction
However, we are sometimes interested in the values of certain specified quantities.
For instance, we may be interested in finding out which team gets the first choice or in
learning the draft number of our home team.
These quantities of interest are known as discrete random variables will be studied in
this chapter.
The first ball drawn in the 1993 NBA draft lottery belonged to the Orlando Magic,
even though the Magic had finished the season with the 11th-worst record and so had
only 1 of the 66 balls!
4
Random Variables
When a probability experiment is performed, we may be interested in the
value of some numerical quantity determined by the result.
For example:
◦ The outcome of the NBA draft lottery experiment is the specification of
the teams that are to receive the first, second, and third picks in the draft.
◦ (3, 1, 4) : the team with the third-worst record received pick number 1, the
team with the worst record received pick number 2, and the team with the
fourth-worst record received pick number 3.
◦ If we let X denote the team that received draft pick 1,
5
Example 5.2
Suppose we are about to learn the sexes of the three children of a certain family.
The sample space of this experiment consists of the following 8 outcomes:
{(b, b, b), (b, b, g), (b, g, b), (b, g, g), (g, b, b), (g, b, g), (g, g, b), (g, g, g)}
◦ (g, b, b) : the youngest child is a girl, the next youngest is a boy, and the oldest
is a boy.
◦ Suppose that each of these 8 possible outcomes is equally likely, and so each
has probability 1/8.
If we let X denote the number of female children in this family,
then X is a random variable whose value will be 0, 1, 2, or 3.
P{X = 0} = P{(b, b, b)} = 1/8
P{X = 1} = P({(b, b, g), (b, g, b), (g, b, b)}) = 3/8
P{X = 2} = P({(b, g, g), (g, b, g), (g, g, b)}) = 3/8
P{X = 3} = P({(g, g, g)}) = 1/8
6
Probability Distribution
7
Example 5.3
Solution
8
Example 5.4
A saleswoman has scheduled two appointments to sell encyclopedias (百科全書).
She feels that her first appointment will lead to a sale with probability 0.3.
She also feels that the second will lead to a sale with probability 0.6 and that the
results from the two appointments are independent.
What is the probability distribution of X, the number of sales made?
Solution
The random variable X can take on any of the values 0, 1, or 2.
P{X = 0} = P{no sale on first, no sale on second}
= P{no sale on first}P{no sale on second}
by independence
= (1 − 0.3)(1 − 0.6) = 0.28
P{X = 1} = P{sale on first, no sale on second}+P{no sale on first, sale on second}
= P{sale on first}P{no sale on second}+ P{no sale on first}P{sale on second}
= 0.3(1 − 0.6) + (1 − 0.3)0.6 = 0.54
P{X = 2} = P{sale on first, sale on second} = P{sale on first}P{sale on second}
= (0.3) (0.6) = 0.18
P{X = 0} + P{X = 1} + P{X = 2} = 0.28 + 0.54 + 0.18 = 1
9
Exercise (p. 215, 4)
Suppose a pair of dice is rolled. Let X denote their sum.
(a) What are the possible values of X?
(b) Assuming that each of the 36 possible outcomes of the
experiment is equally likely, what is the probability distribution of
X?
10
Expected Value
The expected value of X is a weighted average of the possible
values of X.
◦ For example,
if
then
11
Expected Value
Suppose that we play N games, where N is a very large number.
The proportion of games in which we win xi will approximately equal p(xi).
We will win xi in approximately Np(xi) of the N games.
The total winnings in the N games will be approximately equal to
Therefore, the average winning per game will be
If X is a random variable associated with some experiment, then the
average value of X over a large number of replications of the experiment is
approximately E[X].
12
Example 5.5
Suppose we roll a die that is equally likely to have any of its 6 sides
appear face up.
Find E[X], where X is the side facing up.
Solution
If we continually roll a die, then after a large number of rolls the
average of all the outcomes will be approximately 3.5.
13
Example 5.6
Consider a random variable X that takes on either the value 1 or 0
with respective probabilities p and 1 − p.
That is, P{X = 1} = p and P{X = 0} = 1 − p
Find E[X].
Solution
The expected value of this random variable is
E[X] = 1(p) + 0(1 − p) = p
14
Center of Gravity
The concept of expected value is analogous to the physical concept
of the center of gravity of a distribution of mass.
For example,
15
Properties of Expected Values
Let X be a random variable with expected value E[X].
If c is a constant, then the quantities cX and X + c are
also random variables and so have expected values.
The following useful results can be shown:
E[cX] = cE[X]
E[X + c] = E[X] + c
16
Example 5.8
A married couple works for the same employer.
The wife’s Christmas bonus (獎金) is a random variable whose expected value
is $1500.
(a) If the husband’s bonus is set to equal 80 percent of his wife’s, find the
expected value of the husband’s bonus.
(b) If the husband’s bonus is set to equal $1000 more than his wife’s, find its
expected value.
Solution
Let X denote the bonus (in dollars) to be paid to the wife.
(a) Since the bonus paid to the husband is equal to 0.8X, we have
E[bonus to husband] = E[0.8X] = 0.8E[X] = $1200
(b) In this case the bonus to be paid to the husband is X + 1000, and so
E[bonus to husband] = E[X + 1000] = E[X] + 1000 = $2500
17
Example 5.9
The following are the annual incomes of
7 men and 7 women who are residents (居住)
of a certain community (社區).
Suppose that a woman and a man are
randomly chosen.
Find the expected value of the sum of
their incomes.
Solution
Let X be the man’s income and Y the woman’s income.
18
Properties of Expected Values
The expected value of the sum of random variables is equal to the
sum of the expected values holds for not only two but any number
of random variables.
19
Example 5.11
A building contractor (承包商) has sent in bids (投標) for three jobs.
If the contractor obtains these jobs, they will yield respective profits of 20,
25, and 40 (in units of $1000).
On the other hand, for each job the contractor does not win, he will incur
a loss (due to time and money already spent in making the bid) of 2.
If the probabilities that the contractor will get these jobs are, respectively,
0.3, 0.6, and 0.2, what is the expected total profit (總營利)?
Solution
Let Xi denote the profit from job i, i = 1, 2, 3.
P{X1 = 20} = 0.3
P{X1 = −2} = 1 − 0.3 = 0.7
E[X1] = 20(0.3) − 2(0.7) = 4.6
E[X2] = 25(0.6) − 2(0.4) = 14.2
E[X3] = 40(0.2) − 2(0.8) = 6.4
E[total profit] = E[X1 + X2 + X3] = E[X1] + E[X2] + E[X3]
= 4.6 + 14.2 + 6.4 = 25.2
Therefore, the expected total profit is $25,200.
20
Exercise (p. 226, 6)
21
Variance of Random Variables
One measure of a random variable is the expected value.
However, it does not tell us anything about the variation of a random
variable .
Since we expect a random variable X to take on values around its mean
E[X], a reasonable way of measuring the variation of X is to consider how far
X tends to be from its mean on the average.
We could consider E[|X − μ|], where μ = E[X] and |X − μ| is the absolute
value of the difference between X and μ.
However, it is more convenient to consider not the absolute value but the
square of the difference.
22
Example 5.12
Solution
23
Example 5.13
Solution
24
Properties of Variances
The variance of the product of a constant and a random variable is
equal to the constant squared times the variance of the random
variable.
The variance of the sum of a constant and a random variable is
equal to the variance of the random variable.
25
Properties of Variances
Definition
Random variables X and Y are independent if knowing the value of
one of them does not change the probabilities of the other.
26
Example 5.14
Determine the variance of the sum obtained when a pair of fair
dice is rolled.
Solution
From Example 5.5,
27
Standard Deviation
The positive square root of the variance is called the
standard deviation (SD).
28
Example 5.15
The annual gross earnings (年收入) of a certain rock singer are a
random variable with an expected value of $400,000 and a standard
deviation of $80,000.
The singer’s manager receives 15 percent of this amount.
Determine the expected value and standard deviation of the amount
received by the manager.
Solution
Let X denote the earnings (in units of $1000) of the singer, then the
manager earns 0.15X.
E[0.15X] = 0.15E[X] = 60
Var(0.15X) = (0.15)2Var(X)
SD(0.15X) = 0.15 SD(X) = 12
The amount received by the manager is a random variable with an
expected value of $60,000 and a standard deviation of $12,000.
29
Exercises (p. 238, 17, 18, 19)
If Var(X) = 4, what is SD(3X)?
Hint: First find Var(3X).
If Var(2X+3) = 16, what is SD(X)?
If X and Y are independent random variables, both
having variance 1, find Var(X+Y) and Var(X−Y).
30
Exercises (p. 237, 9)
(Take home)
31
Binomial Random Variables
Suppose that n independent subexperiments (or trials) are performed, each
of which results in either a “success” with probability p or a “failure” with
probability 1 − p.
If X is the total number of successes that occur in n trials, then X is said to be
a binomial random variable with parameters n and p.
The Bernoulli distribution is a special case of the binomial distribution, where n = 1.
Suppose we are interested in the probability that 3 independent trials, each of
which is a success with probability p, will result in a total of 2 successes.
To determine this probability, consider all the outcomes that give rise to
exactly 2 successes: (s, s, f ), (s, f, s), (f, s, s)
The outcome (s, f, s) means that the first trial is a success, the second a
failure, and the third a success.
By the assumed independence of the trials, each of these outcomes has
probability p2(1 − p).
The probability of a total of 2 successes in the 3 trials is 3p2(1 − p).
32
Binomial Random Variables
where
For example, the probability that there are no successes in n trials
is
33
Binomial Random Variables
The probabilities of three binomial random variables with
respective parameters n = 10, p = 0.5, n = 10, p = 0.3, and n = 10, p
= 0.6 are presented in Fig. 5.3.
http://en.wikipedia.org
34
Example 5.16
Three fair coins are flipped.
If the outcomes are independent, determine the probability that
there are a total of i heads, for i = 0, 1, 2, 3.
Solution
Let X denote the number of heads (“successes”), then X is a
binomial random variable with parameters n = 3, p = 0.5
35
Example 5.17
Suppose that a particular trait (特徵) (such as eye color or handedness)
is determined by a single pair of genes, and suppose that d represents a
dominant gene (顯性基因) and r a recessive gene (隱性基因) .
A person with the pair of genes (d, d) is said to be pure dominant, one
with the pair (r, r) is said to be pure recessive, and one with the pair (d,
r) is said to be hybrid.
The pure dominant and the hybrid are alike in appearance.
When two individuals mate(配對), the resulting offspring receives one
gene from each parent, and this gene is equally likely to be either of the
parent’s two genes.
(a) What is the probability that the offspring of two hybrid parents has
the opposite (recessive) appearance?
(b) Suppose two hybrid parents have 4 offsprings. What is the
probability 1 of the 4 offspring has the recessive appearance?
36
Example 5.17
Solution
(a) The offspring will have the recessive appearance if it receives a recessive gene
from each parent.
By independence, the probability of this is (1/2)(1/2) = 1/4.
(b) Assuming the genes obtained by the different offspring are independent, then
the number of offspring having the recessive appearance is a binomial random
variable with parameters n = 4 and p = 1/4.
37
Binomial Random Variables
Suppose that X is a binomial random variable with parameters n and
p, and suppose we want to calculate the probability that X is less
than or equal to some value j.
In principle, we could compute this as follows:
The amount of computation called for in the preceding equation
can be rather large.
Table D.5 (in App. D, p. 749) gives the values of P{X ≤ j} for n ≤ 20
and for various values of p.
38
Expected Value and Variance of a
Binomial Random Variable
A binomial (n, p) random variable X is equal to the number of
successes in n independent trials when each trial is a success with
probability p.
Xi is equal to 1 if trial i is a success and
is equal to 0 if trial i is a failure.
◦ PS. The variance of the sum of independent random variables is equal to the sum
of their variances.
39
Example 5.19
Suppose that each screw (螺釘) produced is independently
defective(有缺陷的) with probability 0.01.
Find the expected value and variance of the number of defective
screws in a shipment (裝載貨物) of size 1000.
Solution
The number of defective screws in the shipment of size 1000 is a
binomial random variable with parameters n = 1000, p = 0.01.
The expected number of defective screws
E[number of defectives] = np = 1000(0.01) = 10
The variance of the number of defective screws
Var(number of defectives) = np(1-p) = 1000(0.01)(0.99) = 9.9
40
Exercises (p. 247, 19, 23)
The probability that a fluorescent(螢光的) bulb burns for at least 500 hours is
0.90. Of 8 such bulbs, find the probability that
(a) All 8 burn for at least 500 hours.
(b) Exactly 7 burn for at least 500 hours.
(c) What is the expected value of the number of bulbs that burn for at least
500 hours?
(d) What is the variance of the number of bulbs that burn for at least 500
hours?
If X is a binomial random variable with expected value 4 and
variance 2.4, find
(a) P{X=0}
(b) P{X=12}
Hint: E(X) = np = 4, and Var(X) = np(1-p) = 2.4. Find n and p first.
41
Hypergeometric Random Variables
Suppose that n batteries are to be randomly selected from a bin of N batteries, of
which Np are functional and the other N(1 − p) are defective.
◦ The random variable X, equal to the number of functional batteries in the
sample, is then said to be a hypergeometric random variable with parameters
n, N, p.
◦ For instance, suppose that two batteries are to be withdrawn from a bin of
five batteries, of which one is functional and the others defective. (n = 2, N = 5,
p = 1/5.)
Then the probability that the second battery withdrawn is functional is 1/5.
However, if the first one withdrawn is functional, then the conditional
probability that the second one is functional is 0.
When the selections of the batteries are made without replacing the
previously chosen ones, the trials are not independent, so X is not a
binomial random variable.
The trials of a hypergeometric random variable are not independent.
42
Hypergeometric Random Variables
43
Example 5.20
If 6 people are randomly selected from a group consisting of 12
men and 8 women, then the number of women chosen is a
hypergeometric random variable with parameters
n = 6, N = 20, p = 8/20 = 0.4.
Its mean and variance are
Similarly, the number of men chosen is a hypergeometric random
variable with parameters n = 6, N = 20, p = 0.6.
44
Poisson Random Variables
Poisson distribution是一種統計與機率學裡常見到的離散機率分佈,由
Poisson distribution適合於描述單位時間內隨機事件發生的次數的
機率分佈。
法國數學家西莫恩·德尼·卜瓦松(Siméon-Denis Poisson)在1838年時發
表。
◦ 如某一服務設施在一定時間內受到的服務請求的次數,電話交換機
接到呼叫的次數、汽車站台的候客人數、機器出現的故障數、自然
災害發生的次數、DNA序列的變異數、放射性原子核的衰變數等等
。
◦ Poisson distribution的參數λ是單位時間(或單位面積)內隨機事件的平
均發生率。
45
Poisson Random Variables
Poisson random variables arise as approximations to binomial random
variables.
Consider n independent trials, each of which results in either a success with
probability p or a failure with probability 1 − p.
If the number of trials (n) is large and the probability of a success on a trial
(p) is small, then the total number of successes will be approximately a
Poisson random variable with parameter λ = np.
Some examples of random variables whose probabilities are approximately
given, for some λ, by Poisson probabilities are the following:
1. The number of misprints on a page of a book
2. The number of people in a community who are at least 100 years old
3. The number of people entering a post office on a given day
Each of these is approximately Poisson because of the Poisson
approximation to the binomial.
46
Poisson Random Variables
e = 2.718
A graph of the probabilities of a
Poisson random variable having
parameter λ = 4 is presented in
Fig. 5.4.
http://en.wikipedia.org/wiki/Poisson_distribution
47
Example 5.21
If X is a Poisson random variable with parameter λ = 2,
find P{X = 0}.
Solution
where
The Poisson distribution is sometimes called the law of small numbers
because it is the probability distribution of the number of occurrences of
an event that happens rarely but has very many opportunities to happen.
◦ Approximate to the binomial distribution: n is very large and p is very
small.
http://en.wikipedia.org/wiki/Poisson_distribution
48
Example 5.22
Suppose that items produced by a certain machine are independently
defective with probability 0.1.
What is the probability that a sample of 10 items will contain at most
1 defective item?
What is the Poisson approximation for this probability?
Solution
Let X denote the number of defective items, then X is a binomial
random variable with parameters n = 10, p = 0.1.
Since np = 10(0.1) = 1, the Poisson approximation yields the value
49
Poisson Random Variables
Suppose the average number of accidents occurring weekly on a
particular highway is equal to 1.2.
Approximate the probability that there is at least one accident this
week.
Solution
There is approximately a 70 percent chance that there will be at
least one accident this week.
50
Exercises (p. 258, 14, 15)
51
KEY TERMS
Random variable: A quantity whose value is determined by the outcome of a
probability experiment.
Discrete random variable: A random variable whose possible values constitute
a sequence of disjoint points on the number line.
Expected value of a random variable: A weighted average of the possible
values of a random variable; the weight given to a value is the probability that the
random variable is equal to that value. Also called the expectation or the mean of
the random variable.
Variance of a random variable: The expected value of the square of the
difference between the random variable and its expected value.
Standard deviation of a random variable: The square root of the variance.
Independent random variables: A set of random variables having the property
that knowing the values of any subset of them does not affect the probabilities of
the remaining ones.
Binomial random variable with parameters n and p: A random variable equal
to the number of successes in n independent trials when each trial is a success with
probability p.
52