Professional Documents
Culture Documents
Chapter 3
Random Variables
3-2
3 Random Variables
Using Statistics
Expected Values of Discrete Random Variables
Sum and Linear Composite of Random Variables
Bernoulli Random Variable
The Binomial Random Variable
The Geometric Distribution
The Hypergeometric Distribution
The Poisson Distribution
Continuous Random Variables
Uniform Distribution
The Exponential Distribution
3-3
3 LEARNING OBJECTIVES
After studying this chapter you should be able to:
Distinguish between discrete and continuous random variables
Explain how a random variable is characterized by its probability
distribution
Compute statistics about a random variable
Compute statistics about a function of a random variable
Compute statistics about the sum or a linear composite of a random
variable
Identify which type of distribution a given random variable is most
likely to follow
Solve problems involving standard distributions manually using
formulas
Solve business problems involving standard distributions using
spreadsheet templates.
3-4
If girl and boy are each equally likely [P(G) = P(B) = 1/2], and the
gender of each child is independent of that of the previous child,
then the probability of each of these 16 possibilities is:
(1/2)(1/2)(1/2)(1/2) = 1/16.
3-5
Random Variables
Now count the number of girls in each set of four sequential births:
Notice that:
• each possible outcome is assigned a single numeric value,
• all outcomes are assigned a numeric value, and
• the value assigned varies over the outcomes.
BBBB 0
BGBB
GBBB 1
BBBG
BBGB
GGBB
GBBG X
BGBG 2
BGGB
GBGB
BBGG
BGGG
GBGG 3
GGGB
GGBG
GGGG 4 Points on the
Real Line
Sample Space
3-7
Since the random variable X = 3 when any of the four outcomes BGGG,
GBGG, GGBG, or GGGB occurs,
P(X = 3) = P(BGGG) + P(GBGG) + P(GGBG) + P(GGGB) = 4/16
The probability distribution of a random variable is a table that lists the
possible values of the random variables and their associated probabilities.
x P(x)
0 1/16 TheGraphical
GraphicalDisplay
Displayfor
forthis
this
1 4/16 The
2 6/16
ProbabilityDistribution
Probability Distribution
3 4/16 isisshown
shownon
onthe
thenext
nextSlide.
Slide.
4 1/16
16/16=1
3-8
ProbabilityDistribution
Probability Distributionof
ofthe
theNumber
Numberof
ofGirls
Girlsin
inFour
FourBirths
Births
0.4
0.4 6/16
6/16
0.3
0.3
P(X)
4/16 4/16
Probability,P(X)
4/16 4/16
Probability,
0.2
0.2
0.1
0.1
1/16 1/16
1/16 1/16
0.0
0.0
00 11 22 33 44
Numberof
Number ofGirls,
Girls,XX
3-9
Example 3-1
Consider the experiment of tossing two six-sided dice. There are 36 possible
outcomes. Let the random variable X represent the sum of the numbers on
the two dice: x P(x)** Probability Distribution of Sum of Two Dice
2 1/36
3 2/36 0.17
2 3 4 5 6 7 4 3/36
5 4/36 0.12
1,1 1,2 1,3 1,4 1,5 1,6 8 6 5/36
p(x)
2,1 2,2 2,3 2,4 2,5 2,6 9 7 6/36
0.07
3,1 3,2 3,3 3,4 3,5 3,6 10 8 5/36
4,1 4,2 4,3 4,4 4,5 4,6 11 9 4/36
10 3/36 0.02
5,1 5,2 5,3 5,4 5,5 5,6 12 11 2/36 2 3 4 5 6 7 8 9 10 11 12
x
6,1 6,2 6,3 6,4 6,5 6,6 12 1/36
1
* Note that: P ( x ) ( 6 ( 7 x ) 2 ) / 36
3-10
Example 3-2
Probability Distribution of the Number of Switches
The Probability Distribution of the Number of Switches
x P(x)
0.4
0 0.1
1 0.2 0.3
2 0.3
P(x)
3 0.2 0.2
4 0.1
0.1
5 0.1
1 0.0
0 1 2 3 4 5
x
AAcontinuous
continuousrandom
randomvariable:
variable:
hasan
has anuncountably
uncountablyinfinite
infinitenumber
numberofofpossible
possiblevalues
values
movescontinuously
moves continuouslyfrom
fromvalue
valueto
tovalue
value
hasno
has nomeasurable
measurableprobability
probabilityassociated
associatedwith
witheach
eachvalue
value
measures(e.g.:
measures (e.g.:height,
height,weight,
weight,speed,
speed,value,
value,duration,
duration,
length)
length)
3-12
2. P (x) 1
all x
Corollary: 0 P ( X ) 1
3-13
1 0.2 0.3 0 .8
0 .7
2 0.3 0.6 0 .6
F(x)
0 .5
3 0.2 0.8 0 .4
0 .3
4 0.1 0.9 0 .2
0 .1
5 0.1 1.0 0 .0
1.00 0 1 2
x
3 4 5
3-14
x P(x) F(x)
0 0.1 0.1
1 0.2 0.3
2 0.3 0.6
3 0.2 0.8
4 0.1 0.9
5 0.1 1.0
1
x P(x) F(x)
0 0.1 0.1
1 0.2 0.3
2 0.3 0.6
3 0.2 0.8
4 0.1 0.9
5 0.1 1.0
1
Note: P(X > 1) = P(X > 2) = 1 – P(X < 1) = 1 – F(1) = 1 – 0.3 = 0.7
3-16
x P(x) F(x)
0 0.1 0.1
1 0.2 0.3
2 0.3 0.6
3 0.2 0.8
4 0.1 0.9
5 0.1 1.0
1
Note: P(1 < X < 3) = P(X < 3) – P(X < 0) = F(3) – F(0) = 0.8 – 0.1 = 0.7
3-17
2.3
3 4 5
The mean is also known as the expected value (or expectation) of a random
variable, because it is the value that is expected to occur, on average.
x P(x) xP(x)
The expected value of a discrete random 0 0.1 0.0
variable X is equal to the sum of each 1 0.2 0.2
2 0.3 0.6
value of the random variable multiplied by
3 0.2 0.6
its probability. 4 0.1 0.4
E ( X ) xP ( x ) 5 0.1 0.5
all x 1.0 2.3 = E(X) =
3-18
A Fair Game
Supposeyou
Suppose youareareplaying
playingaacoin
cointoss
tossgame
gameininwhich
whichyouyouare
are
paid$1
paid $1ififthe
thecoin
cointurns
turnsup
upheads
headsand
andyou
youlose
lose$1
$1when
whenthe the
cointurns
coin turnsupuptails.
tails.The
Theexpected
expectedvalue
valueof
ofthis
thisgame
gameisis E(X)
E(X)==
0.0. AAgame
gameof ofchance
chancewith
withan
anexpected
expectedpayoff
payoffofof00isiscalled
calledaa
fairgame.
fair game.
x P(x) xP(x)
-1 0.5 -0.50
-1 1
1 0.5 0.50 0
1.0 0.00 =
E(X)=
3-19
Example 3-3:
3-3 Monthly sales of a certain Number
product are believed to follow the given of items, x P(x) xP(x) h(x) h(x)P(x)
probability distribution. Suppose the 5000 0.2 1000 2000 400
6000 0.3 1800 4000 1200
company has a fixed monthly production
7000 0.2 1400 6000 1200
cost of $8000 and that each item brings 8000 0.2 1600 8000 1600
$2. Find the expected monthly profit 9000 0.1 900 10000 1000
h(X), from product sales. 1.0 6700 5400
E [ h ( X )] h ( x ) P ( x ) 5400
all x Note: h (X) = 2X – 8000 where X = # of items sold
all x all x
Outputfor
Output forExample
Example3-4
3-4
3-28
* The terms success and failure are simply statistical terms, and do not have
positive or negative implications. In a production setting, finding a
defective product may be termed a “success,” although it is not a positive
result.
3-29
There are 25 = 32 possible sequences of H and T (S and F) in the sample space for this
experiment. Of these, there are 10 in which there are exactly 2 heads (X=2):
HHTTT HTHTH HTTHT HTTTH THHTT THTHT THTTH TTHHT TTHTH TTTHH
10 (1/32)
Number of outcomes Probability of each
with 2 heads outcome with 2 heads
In general:
1. The probability of a given sequence 2. The number of different sequences of n trials that
of x successes out of n trials with result in exactly x successes is equal to the number
probability of success p and of choices of x elements out of a total of n elements.
probability of failure q is equal to: This number is denoted:
n n!
pxq(n-x) nCx
x x!( n x)!
3-32
1 .999 .977 .919 .737 .528 .337 .187 .087 .031 .007 .000 .000 .000
2 1.000 .999 .991 .942 .837 .683 .500 .317 .163 .058 .009 .001 .000
3 1.000 1.000 1.000 .993 .969 .913 .813 .663 .472 .263 .081 .023 .001
4 1.000 1.000 1.000 1.000 .998 .990 .969 .922 .832 .672 .410 .226 .049
h F(h) P(h)
Cumulative Binomial Deriving Individual Probabilities
Probability Distribution and 0 0.031 0.031
from Cumulative Probabilities
Binomial Probability 1 0.187 0.156
Distribution of H,the 2 0.500 0.313 F (x ) P ( X x ) P(i )
Number of Heads all i x
3 0.813 0.313 P(X) = F(x) - F(x - 1)
Appearing in Five Tosses of 4 0.969 0.156
a Fair Coin 5 1.000 0.031 For example:
1.000
P (3) F (3) F (2)
.813.500
.313
3-34
n=15
p
0
.50
.000
.60
.000
.70
.000
F ( x) P( X x) P(i)
alli x
1 .000 .000 .000
2 .004 .000 .000
F (3) P ( X 3) 0.002
3 .018 .002 .000
4 .059 .009 .001
... ... ... ...
3-35
Meanofofaabinomial
Mean binomialdistribution:
distribution:
EE((XX))np
np For example, if H counts the number of
heads in five tosses of a fair coin :
Varianceofofaabinomial
Variance binomialdistribution:
distribution:
E ( H ) (5)(.5) 2.5
H
VV((XX))npq
npq
2
2
V ( H ) (5)(.5)(.5) 1.25
2
Standarddeviation
deviationof
ofaabinomial
binomialdistribution:
distribution:
H
Standard
P(x)
P(x)
0.3 0.3 0.3
Binomial Probability: n=10 p=0.1 Binomial Probability: n=10 p=0.3 Binomial Probability: n=10 p=0.5
n = 10
0.3 0.3 0.3
P(x)
P(x)
P(x)
0.2 0.2 0.2
Binomial Probability: n=20 p=0.1 Binomial Probability: n=20 p=0.3 Binomial Probability: n=20 p=0.5
n = 20
P(x)
P(x)
P(x)
0.1 0.1 0.1
Thenegative
The negativebinomial
binomialdistribution
distributionisisuseful
usefulfor
fordetermining
determiningthetheprobability
probabilityofofthe
the
numberofoftrials
number trialsmade
madeuntil
untilthe
thedesired
desirednumber
numberofofsuccesses
successesare
areachieved
achievedin inaa
sequenceofofBernoulli
sequence Bernoullitrials.
trials.ItItcounts
countsthe
thenumber
numberofoftrials
trialsXXtotoachieve
achievethe
the
numberofofsuccesses
number successessswith
withppbeing
beingthe
theprobability
probabilityofofsuccess
successononeach
eachtrial.
trial.
s
Negative Binomial Distribution : The mean is :
p
x 1
P( X x) s ( x s)
p (1 p) 2 s (1 p )
s 1
The variance is :
p2
3-39
Geometric distribution:
x1
P ( x ) pq
where x = 1,2,3, . . . and p and q are the binomial parameters.
The mean and variance of the geometric distribution are:
1 2 q
2
p p
3-42
Example:
A recent study indicates that Pepsi-Cola
has a market share of 33.2% (versus P (1) (. 332 )(. 668 )(11) 0. 332
40.9% for Coca-Cola). A marketing
research firm wants to conduct a new P ( 2) (. 332 )(. 668) ( 2 1) 0. 222
taste test for which it needs Pepsi
drinkers. Potential participants for the
test are selected by random screening of
P (3) (. 332 )(. 668) (3 1) 0. 148
soft drink users to find Pepsi drinkers.
What is the probability that the first P ( 4) (. 332 )(. 668) ( 4 1) 0. 099
randomly selected drinker qualifies?
What’s the probability that two soft drink
users will have to be interviewed to find
the first Pepsi drinker? Three? Four?
3-43
Thehypergeometric
The hypergeometricprobability
probabilitydistribution
distributionisisuseful
usefulfor
fordetermining
determiningthe
the
probabilityofofaanumber
probability numberofofoccurrences
occurrenceswhen
whensampling
samplingwithout
withoutreplacement.
replacement. ItIt
countsthe
counts thenumber
numberofofsuccesses
successes(x)
(x)in
innnselections,
selections,without
withoutreplacement,
replacement,from
fromaa
populationofofNNelements,
population elements,SSofofwhich
whicharearesuccesses
successesand
and(N-S)
(N-S)ofofwhich
whichare
are
failures. .
failures
Hypergeometric Distribution :
S
S N S
The mean of the hypergeometric distribution is: np , where p
N
P( x) x n x N n npq
N
The variance is:
2
N 1
n
3-45
Example:
Suppose that automobiles arrive at a
2
1
10 2
5 1
2
1
8
4
2! 8!
5
dealership in lots of 10 and that for 1! 1! 4 ! 4 !
P ( 1) 0 .556
time and resource considerations, 10 10 10 ! 9
only 5 out of each 10 are inspected 5 5
5! 5!
for safety. The 5 cars are randomly
2 10 2 2! 8!
chosen from the 10 on the lot. If 2 2 8
out of the 10 cars on the lot are below 1 52 1 3 2
1! 1! 3! 5!
standards for safety, what is the P(2) 0 . 222
10 10 10 ! 9
probability that at least 1 out of the 5
5 5
cars to be inspected will be found not 5! 5!
meeting safety standards?
Thus, P(1) + P(2) =
0.556 + 0.222 = 0.778.
3-46
Poisson Distribution:
xe
P( x) for x = 1,2,3,...
x!
where is the mean of the distribution (which also happens to be the variance) and
e is the base of natural logarithms (e=2.71828...).
3-48
Example 3-5:
Telephone manufacturers now offer 1000
different choices for a telephone (as
combinations of color, type, options, portability,
.2 0 e .2
etc.). A company is opening a large regional P ( 0) = 0.8187
0!
1 .2
office, and each of its 200 managers is allowed to .2 e
order his or her own choice of a telephone.
P (1) = 0.1637
12 ! .2
Assuming independence of choices and that each .2 e
P (2 ) = 0.0164
of the 1000 choices is equally likely, what is the 2!
3 .2
probability that a particular choice will be made .2 e
P (3) = 0.0011
by none, one, two, or three of the managers? 3!
= 1.0 = 1.5
0.4 0.4
0.3 0.3
P(x)
P( x)
0.2 0.2
0.1 0.1
0.0 0.0
0 1 2 3 4 0 1 2 3 4 5 6 7
X X
=4 = 10
0.2 0.15
0.10
P (x)
P(x)
0.1
0.05
0.0 0.00
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 1011121314151617181920
X X
3-52
P(x)
the probability
1 0.375 0.1
that the task 0.1
2 0.375 0.0 takes between
3 0.125 0 1 2 3 0.0
C1 2 and 3
1.000 1 2 3 4 5 6
minutes. Minutes
3-53
0.10
P(x)
P(x)
P(x)
0.05
0.00
0.0
. 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
Minutes Minutes Minutes
function
shadedarea
shaded arearepresents
representsP(2 X).
P(2X ).
0 1 2 3 4 5 6 7
Minutes
3-54
AAcontinuous
continuousrandom
randomvariable
variableisisaarandom
randomvariable
variablethat
thatcan
cantake
takeon
onany
anyvalue
valueininan
an
intervalofofnumbers.
interval numbers.
Theprobabilities
The probabilitiesassociated
associatedwith
withaacontinuous
continuousrandom
randomvariable
variableXXare
aredetermined
determinedbybythe
the
probabilitydensity
probability densityfunction
functionofofthe
therandom
randomvariable.
variable. The
Thefunction,
function,denoted
denotedf(x),
f(x),has
hasthe
the
followingproperties.
following properties.
1.1. f(x)00for
f(x) forall
allx.x.
2.2. Theprobability
The probabilitythat thatXXwill
willbe
bebetween
betweentwo twonumbers
numbersaaand andbbisisequal
equaltotothe
thearea
area
underf(x)
under f(x) between
betweenaaand andb.b.
3.3. Thetotal
The totalarea
areaunder
underthe thecurve
curveofoff(x)
f(x)isisequal
equaltoto1.00.
1.00.
Thecumulative
The cumulativedistribution
distributionfunction
functionofofaacontinuous
continuousrandom
randomvariable:
variable:
F(x) P(Xx)x)=Area
F(x)==P(X =Areaunder
underf(x)
f(x)between
betweenthe
thesmallest
smallestpossible
possiblevalue
valueofofXX(often
(often-)
-)and
and
thepoint
the pointx.x.
3-55
F(b)
F(a)
} P(a X b)=F(b) - F(a)
0
a b x
f(x)
x
0 a b
3-56
{
1/(a – b) for a X b
f(x)=
0 otherwise
a a1 b1 b
x
3-57
{
1/5 for 0 X 5
f(x)=
0 otherwise
E(X) = 2.5
0.4
The entire area under f(x) = 1/5 * 5 = 1.00
0.3
f(x)
.0.0
-1 0 1 2 3 4 5 6
x
3-58
f(x)
1
f (x ) e x for x 0, 0
1
The mean and standard deviation are both equal to .
The cumulative distribution function is: 0
0 1 2 3
F (x ) 1 e x for x 0. Time
3-60
Example
The time a particular machine operates before breaking down (time between
breakdowns) is known to have an exponential distribution with parameter = 2. Time is
measured in hours. What is the probability that the machine will work continuously for
at least one hour? What is the average time between breakdowns?
F (x ) 1 e P ( X x ) e x
x
1 1
P ( X 1) e ( 2 )(1)
E ( X ) .5
2
.1353
3-61