chapter 7 · 2019. 8. 16. · probability is approximately 0.60 that on a randomly selected day the...
TRANSCRIPT
Chapter 7
Random Variables
Lesson 7-1, Part 1
Discrete and Continuous
Random Variables.
Random Variable
A numerical variable whose value depends on the outcome of a chance experiment is called random variable.
A random variable associates a numerical value with each outcome of a chance experiment.
We use a capital letter like X, to denote a random value.
The probability distribution of a random variable Xgives the probability associated with each possible X value .
A random variable can be discrete or continuous.
Discrete and Continuous
Random Variables
A discrete variable is a variable whose values are obtained by counting. Example
Number of students present
Number of heads when flipping three coins
Student’s grade level
A continuous variable is a variable whose values are obtained by measuring. Example
Height of students in class
Time it takes to get to school
Distance traveled between classes
Discrete Random Variable
Example: Let X represents the sum of two dice
Then the probability distribution of X is as follows:
2 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 5 4 3 2 1( )
36 36 36 36 36 36 36 36 36 36 36
X
P X
To graph the probability distribution of a discrete random
variable, construct a probability histogram.
Probability Histogram
0
0.05
0.1
0.15
0.2
2 3 4 5 6 7 8 9 10 11 12
Probability Distribution of X
Outcome
Pro
ba
bili
ty
Example – Page 396, #7.2
A couple plans to have three children. There are 8 possible arrangements
of girls and boys. For example GGB means the first two children are
girls and the child is a boy. All 8 arrangements are (approximately equally
likely.
A). Write down all 8 arrangements of the sexes of three
children. What is the probability of any one of these
arrangements?
GGG
GGB
GBB
GBG
BBB
BGG
BBG
BGB
P GGB1 1 1 1
( )2 2 2 8
Example – Page 396, #7.2
GGG
GGB
GBB
GBG
BBB
BGG
BBG
BGB
P GGB1 1 1 1
( )2 2 2 8
B). Let X be the number of girls the couple has. What is
the probability that X = 2?
P X
1 3( 2) 3
8 8
Example – Page 396, #7.2
GGG
GGB
GBB
GBG
BBB
BGG
BBG
BGB
C). Starting from your work in (A), find the distribution of
X. That is what values can X take, and what are the
probabilities for each value.
Value of X:
Probability:
0 1 2 3
1/ 8 3 / 8 3 / 8 1/ 8
Lesson 7-1, Part 2
Discrete and Continuous
Random Variables.
Continuous Random Variable
A continuous random variable X takes all values in a given interval of numbers.
The probability distribution of a continuous random variable is shown by a density curve.
The probability that X is between an interval of numbers is the area under the density curve between the endpoints.
The probability that a continuous random variable X is exactly equal to a number is zero.
Example – Page 401, #7.6
Let X be a random number between 0 and 1 produced by
the idealized uniform random number generator describe
in Example 7.3 and Figure 7.5. Find the following probabilities.
A). P X(0 0.4)
0 1
1
0.4
A (0.4 0)1
0.4
B) P X(0.4 1)
A (1 0.4)1
0.6
Example – Page 401, #7.6
C). P X(0.3 0.5)
0 1
1A (0.5 0.3)1
0.2
D) P X(0.3 0.5)
A (0.5 0.3)1
0.2
E) P X(0.226 0.713)
A (0.713 0.226)1
0.487
F) What important fact about continuous random variables
does comparing your answer to (c) and (d).
Example – Page 401, #7.6
F) What important fact about continuous random variables
does comparing your answer to (c) and (d).
Continuous distribution assign probabilities 0 to every
individual outcome. In this case, the probabilities in (c) and
(d) are the same because the events differ by 2 individual
values, 0.3 and 0.5, each of which has a probability 0.
Example – Uniform Density Curve
A certain probability density function is made up of two straight line
Segments. The first segment begins at the origin and goes to point
(1,1). The second segment goes from (1,1) to the point (1.50, 1).
A). Sketch the distribution function,
and verify that it is a legitimate
density curve.
1TA A A
Example – Uniform Density Curve
B). Find (0 0.5)P X
C). Find ( 1)P X
(0.5)(0.50)
2 2
bhA
0
0.125
Example – Uniform Density Curve
D). Find (0 1.25)P X
E). Is X an example of discrete random variable or a continuous
random variable.
(1)(1)0.50
2 2
bhA
(1.25 1)1 0.25A bh
0.50 0.250.75
TA A A
0.75
Continuous
Normal Distributions
Normal distributions are
probability distributions
N(μ, σ) is a normal
distribution with mean μ and
standard deviation σ
If X has the N(μ, σ)
distribution then
xz
μ
σ
Example – Page 402, #7.8
An SRS of 400 American adult is asked, “What do you think the most
serious problem facing our schools?” Suppose that in fact 40% of all
adults would answer “violence” if asked this question. The proportion
of the sample who answered “violence” will vary in repeated sampling. In
fact, we can assign probabilities to values of using the normal density
curve with mean 0.4 and standard deviation 0.023. Use the density curve
to find the probabilities of the following events.
p̂
p̂
A). At least 45% of the sample believes that violence is the schools
most serious problem.
ˆ ˆlet violence in schools, where 0.45, 0.40, 0.023p p
Example – Page 402, #7.8
A). At least 45% of the sample believes that violence is the schools
most serious problem.
P p̂( 0.45)
0.4 0.45 p̂
xz
μ 0.45 0.42.17
σ 0.023
0 2.17 Z
P z( 2.17) .0150
normalcdf E(2.17, 99,0,1)
normalcdf E(0.45, 99,0.40,0.023)
0.0149
Example – Page 402, #7.8
B). Less than 35% of the sample believes that violence is the most
serious problem.
P p̂( 0.35)
0.40.35 p̂
xz
μ 0.35 0.42.17
σ 0.023
0-2.17 Z
P z( 2.17) .0150
normalcdf E( 99, 2.17,0,1)
normalcdf E( 99,0.35,0.40,0.023)
0.0149
Example – Page 402, #7.8
C). The sample proportion is between 0.35 and 0.45
P p̂(0.35 0.45)
0.40.35 p̂
0-2.17 Z
P z( 2.17 2.17) .9700
normalcdf ( 2.17,2.17,0,1)
normalcdf (0.35,0.45,0.40,0.023)
0.9700
0.45
2.17
Example 1
Some areas of California are particularly earth-quake-prone.
Suppose that in one such area, 20% of all homeowners are
insured against earthquake damage. Four homeowners are
selected at random; let X denote the number among the four
who have earthquake insurance.
a) Find the distribution of X. (Hint: Let S denotes a
homeowner who has insurance and F one who dose not.
Then one possible outcome is SFSS, with probability
(0.2)(0.8)(0.2)(0.2) and associated x value of 3. There are
15 other outcomes.)
Example 1
Outcomes and Probabilities
Outcome Probability X Value Outcome Probability X Value
SSSS 0.0016 4 SFFS 0.0256 2
FSSS 0.0064 3 SFSF 0.0256 2
SFSS 0.0064 3 SSFF 0.0256 2
SSFS 0.0064 3 SFFF 0.1024 1
SSSF 0.0064 3 FSFF 0.1024 1
FFSS 0.0256 2 FFSF 0.1024 1
FSFS 0.0256 2 FFFS 0.1024 1
FSSF 0.0256 2 FFFF 0.4096 0
Example 1
Probability Distribution of X
(Homeowners with Earthquake Insurance)
X Value 0 1 2 3 4
P(X) Probability Value 0.4096 0.4096 0.1536 0.0256 0.0016
b) What is the most likely value of x?
0 and 1
c) What is the probability that at least two of the four selected
homeowners have earthquake insurance?
( 2) (2) (3) (4) 0.1536 0.0256 0.0016 0.1808P X P P P
Example 2
Let the random variable X represent the profit made on a
randomly selected day by a certain store. Assume that X is
normal with mean $460 and standard deviation $75. What
is the value of P(X > $525)
Let x = store profit, where x = $525, = $460, = $75
525
( 525) 0.1931
(525, 99,460,75)
P x
normalcdf E
460
Example 3
Let the random variable X represent the profit made on
randomly selected day by a certain store. Assume X is normal
with a mean of $427 and standard deviation $35. The
probability is approximately 0.60 that on a randomly selected
day the store will make less than Xo amount of profit. Find Xo.
Let x = store profit, where x = _____, = $427, = $35
427 Xo
xo = 435.87
invnorm(0.60, 427, 35)
We have a 60% chance of
selecting a day when the store
profit will be less than $438.87
Lesson 7.2, Part 1
Means and Variance of Random Variable
Mean of a Random Variable
Is the long-run average outcome of a
experiment.
As the number of trials of the experiment
increases, the average result of the experiment
gets closer to the mean of the random variable.
Use the notation μX for the mean.
The mean of a random variable is also called
the expected mean of X.
Mean of Discrete Random Variable
The mean of a discrete random variable X, is its weighted
average. Each value of X is weighted by its probability.
Value of X:
Probability:
k
k
x x x x
p p p p
1 2 3
1 2 3
....
....
To find the mean of X, multiply each possible value by
its probability, then add all the products:
X k k
i i
x p x p x p
E X x p
1 1 2 2μ ....
( )
Example – Page 411, #7.22
Example 7.1 gives the distribution of grades (A = 4, B = 3, and so on)
in a large class as
Grade : 0 1 2 3 4
0.10 0.15 0.30 0.30 0.15Prob:
Find the average (that is, the mean) grade in this course.
Xμ 0(0.10) 1(0.15) 2(0.30) 3(0.30) 4(0.15) 2.25
Variance of a Discrete
Random Variable
If X is a discrete random variable with mean μ, then
the variance of X is
Value of X:
Probability:
k
k
x x x x
p p p p
1 2 3
1 2 3
....
....
X X X k X k
i x i
x p x p x p
x u p
2 2 22
1 1 2 2
2
σ μ μ .... μ
The standard deviation (σX) is the square root of the variance
Example – Page 411, #7.26
Example 7.1 gives the distribution of grades (A = 4, B = 3, and so on)
in a large class as
Grade : 0 1 2 3 4
0.10 0.15 0.30 0.30 0.15Prob:
Find the standard deviation σX of the distribution of grades
in Exercise 7.22.
X
2 2 22
2 2
σ 0 2.25 0.10 1 2.25 0.15 2 2.25 0.30
3 2.25 0.30 4 2.25 0.15 1.3875
Example – Page 411, #7.26
X
2 2 22
2 2
σ 0 2.25 0.10 1 2.25 0.15 2 2.25 0.30
3 2.25 0.30 4 2.25 0.15 1.3875
Xσ 1.3875 1.178
Example – Page 412, #7.24
The Tri-State Pick 3 lottery game offers a choice of several bets. You
choose a three-digit number. The lottery commission announces
the winning three-digit number, chosen at random, at the end of each
day. The “box” pays $83.33 if the number you choose has the same
digits as the winning number, in any order. Find the expected payoff
for $1 bet on the box. (Assume that you chose a number having
three different digits.)
If my number is abc, then of the (10)3 = 1000 three-digit
numbers, there are six – abc, acb, bac, bca, cab, cba – for
Which you will win the box.
P W6
( ) 0.0061000
P L( ) 1 0.006 0.994
Example – Page 412, #7.24
The Tri-State Pick 3 lottery game offers a choice of several bets. You
choose a three-digit number. The lottery commission announces
the winning three-digit number, chosen at random, at the end of each
day. The “box” pays $83.33 if the number you choose has the same
digits as the winning number, in any order. Find the expected payoff
for $1 bet on the box. (Assume that you chose a number having
three different digits.)
P W6
( ) 0.0061000
P L( ) 1 0.006 0.994
Payoff X $0 $83.33
Probability 0.994 0.006
Example – Page 412, #7.24
Payoff X $0 $83.33
Probability 0.994 0.006
Find the expected payoff on a $1 bet
Xμ 0 0.994 83.33 0.006 $0.50
The casino keeps 50 cents from each dollar bet in the long
run, since the expected payoff is 50 cents.
Payoff X $ – 1 $83.33
Probability 0.994 0.006 Xμ 0.50
Law of Large Numbers
As the number of observations
increases, the mean of the observed
values of, , approaches the mean of
the population, μ.
The more variation in the outcomes,
the more trials are need to ensure
that is close to μ.
x
x
Example – Page 417, #7.32
A). A gambler knows that red and black are equally likely to occur on
each pin of a roulette wheel. He observes five consecutive reds
and bets heavily on red at the next spin. Asked why, he says that
“red is hot” and that the run of reds is likely to continue. Explain
to the gambler what is wrong with this reasoning.
The wheel is not affected by it past outcomes – it has
no memory; outcomes are independent. So on any
one spin, black and red remain equally likely
Example – Page 417, #7.32
B). After hearing you explain why red and black remain equally probable
after five reds on the roulette wheel, the gambler moves to poker game.
He is dealt five straight red cards. he remembers what you said
and assume that the next card dealt in the same hand it equally likely
to red or black. Is the gambler right or wrong? Why?
Removing a card changes the composition of the
remaining deck, so successive draws are not independent.
If you hold 5 red cards, the deck now contains
5 fewer reds cards, so your chance of another red
decreases.
Lesson 7.2, Part 2
Rules for Means and Variance
Rules for Means
a bX Xa bμ μ
If X is a random variable and a and b are
fixed numbers, then
If X and Y are random variables, then
X Y X Yμ μ μ
Rules for Variances
a bX Xb2 2 2σ σ
If X is a random variable and a and b are
fixed numbers, then
If X and Y are independent random variables, then
X Y X Y
X Y X Y
2 2 2
2 2 2
σ σ σ
σ σ σ
Example 1 – Page Rules for
Means and Variance
Given independent random variables with mean and standard deviations
are shown, find the means and standard deviations of each of these
variables.Mean SD
X 120 12
Y 300 16A) 0.8Y
0.8
2 22
0.8
0.8
0.8(300) 240
0.8 16 163.84
163.84 12.80
Y
Y
Y
B) 2X – 100
2 100
2 22
2 100
2 100
2(120) 100 140
2 12 576
576 24
X
X
X
Example 1 – Page Rules for
Means and Variance
Given independent random variables with mean and standard deviations
are shown, find the means and standard deviations of each of these
variables.Mean SD
X 120 12
Y 300 16C) X + 2Y
D) 3X – Y
2
2 2 22
2
2
120 2(300) 720
12 2 16 1168
1168 34.18
X Y
X Y
X Y
3
2 2 22
3
3
3(120) 300 60
3 12 16 1552
1552 39.40
X Y
X Y
X Y
Example 1: Rules for Means
Suppose the equation Y = 20 + 10X converts a PSAT math
score, X, into an SAT math score, Y. Suppose the average
PSAT math score is 48. What is the average SAT math
score?
48X
a bx Xa b
20 100 20 10(48)
500
X
Example 2: Rules for Means
Let μX = 625 represents the average SAT math score.
X Y X Y
Let μy = 590 represents the average SAT verbal score.
represents the average combined
SAT score. Then 625 590 1215X Y X Y
is the average combined total SAT score.
Example 3
Rules for Variances
Suppose the equation Y = 20 + 10X converts a PSAT math
score, X, into an SAT math score, Y. Suppose the standard
deviation for the PSAT math score is 1.5 points. What is the
standard deviation for the SAT math score?
2 2
2 2 2
(1.5) 2.25X
a bX Xb
2 2
20 100 (10) (2.25)
225
15
X
X
Example – Page 425, #7.36
Laboratory data show that the time required to complete two chemical
reactions in a production process varies. The first reaction has a mean
time of 40 minutes and a standard deviation of 2 minutes: the second
has a mean time of 25 minutes and a standard deviation of 1 minute. The
reactions are run in sequence during production. There is fixed period
of 5 minutes between them as the product of the first reaction is pumped
into the vessel where the second reaction will take place. What is the
mean time required for the entire process?
X X1 25 40 5 25 70 minutesTotal Mean
Example – Page 426, #7.40
Use Examples 7.7 (Page 411) and 7.10 (Page 419) concerning a
probabilistic projection of sales and profits by an electronic firm,
Gain Communications.
A). Find the variance and standard deviation of the estimated sales Y
of Gain’s civilian unit, using the distribution and mean from Example
7.10
Yμ 445 unitsY = Units sold 300 500 750
Probability 0.4 0.5 0.1
Y
Y
2 2 22σ 300 445 0.4 500 445 0.5 750 445 0.1 19225
σ 19225 138.65 units
Example – Page 426, #7.40
B). Because the military budget and the civilian economy are not closely
linked, Gain is willing to assume that its military and civilian sales
vary independently. Combine you results from (a) with the results
for the military unit from Example 7.10 to obtain the standard deviation
of total sales X + Y
Y
Y
μ 445
σ 138.65
units X = Units sold 1000 3000 5000 10000
Probability 0.1 0.3 0.4 0.2
X
X
2 2 22
2
σ 1000 5000 0.1 3000 5000 0.3 5000 5000 0.4
10000 5000 0.2 7,800,000
σ 7800000 2792.85
units
units
Xμ 5000 units
Example – Page 426, #7.40
B). Because the military budget and the civilian economy are not closely
linked, Gain is willing to assume that its military and civilian sales
vary independently. Combine you results from (a) with the results
for the military unit from Example 7.10 to obtain the standard deviation
of total sales X + Y
Y
Y
μ 445
σ 138.65
units
unitsunits
Xμ 5000 units
Xσ 2792.85
X Y X Y
2 2 2 2 2σ σ σ 138.65 2792.85 7,819,225
σ 7819234.95 2796.29
Example – Page 426, #7.40
C). Find the standard deviation of the estimated profit, Z = 2000X + 3500Y
Y
Y
μ 445
σ 138.65
units
unitsunitsXμ 5000 units
Xσ 2792.85
X Y X Y X Yb b2 2 2 2 2 2 2
2000 3500 2000 3500
2 2 2 2
13
σ σ σ σ σ
(2000) 2792.85 (3500) 138.65
3.1434 10
13σ 3.144 10 $5,606,738