chapter 3 discrete random variables and probability distributions chapter 3a variables that are...
TRANSCRIPT
Chapter 3
Discrete Random Variables and Probability Distributions
Chapter 3A
Variables that are random; what will they
think of next?
The Road Ahead
today
A Random Variable (RV)
Variable whose observed value is determined by chance
Variable that takes on values in accordance with some probability distribution
Discrete Random Variables have a finite or countably infinite range
Numerical outcome from a random experiment
A mapping from a sample space to a subset of the real numbers
Some Discrete Random Variables
The number of nonconforming solder connections on a printed circuit board.
In a voice communication system with 50 lines, the number of lines in use at a particular time.
A batch of 500 machined parts contains 10 that do not conform to customer requirements. Parts are selected successively, without replacement, until a nonconforming part is obtained. The RV is the number of parts selected.
The RV is the number of demands in a month for a product in inventory.
The RV is the number of customer arrivals per hour at a local bank.
The number of accidents per week observed in a factory.
The Mapping Illustrated – toss a pair of dice
Let X = a random variable, the sum resulting from the toss of two fair dice; X = 2, 3, …, 12
(1,1) (1,2) (1,3) (1,4) (1,5) (1,6) (2,1) (2,2) (2,3) (2,4) (2,5) (2,6) (3,1) (3,2) (3,3) (3,4) (3,5) (3,6) (4,1) (4,2) (4,3) (4,4) (4,5) (4,6) (5,1) (5,2) (5,3) (5,4) (5,5) (5,6) (6,1) (6,2) (6,3) (6,4) (6,5) (6,6)
S =
The Mapping Illustrated – toss a pair of dice
2 (1,1) 1
3 (1,2) , (2,1) 2
4 (1,3) , (2,2) , (3,1) 3
5 (1,4) , (2,3) , (3,2) , (4,1) 4
6 (1,5) , (2,4) , (3,3) , (4,2) , (5,1) 5
7 (1,6) , (2,5) , (3,4) , (4,3) , (5,2) , (6,1) 6
8 (2,6) , (3,5) , (4,4) , (5,3) , (6,2) 5
9 (3,6) , (4,5) , (5,4) , (6,3) 4
10 (4,6) , (5,5) , (6,4) 3
11 (5,6) , (6,5) 2
12 (6,6) 1
Total 36
X = RV, the outcome from rolling a pair of dice number of ways
sample space
The Mapping Illustrated – toss a pair of dice
Let X = a random variable, the sum resulting from the toss of two fair dice; X = 2, 3, …, 12
(1,1) (1,2) (1,3) (1,4) (1,5) (1,6) (2,1) (2,2) (2,3) (2,4) (2,5) (2,6) (3,1) (3,2) (3,3) (3,4) (3,5) (3,6) (4,1) (4,2) (4,3) (4,4) (4,5) (4,6) (5,1) (5,2) (5,3) (5,4) (5,5) (5,6) (6,1) (6,2) (6,3) (6,4) (6,5) (6,6)
x 2 3 4 5 6 7 8 9 10 11 12p(x) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36
= S
Pr{X = x} = f(x), f(x) is called the Probability Mass Function (PMF)
f(x)
Probability Histogram for the Random Variable X
Probability Mass Function
Example #1 Let x = a discrete random variable, the number of
accidents per week in the Axe E. Dentt manufacturing plant.
Given: 1( ) Pr{ } ; 0,1,2,3,4
15
xf x X x x
Pr(X = 0) = f(0) = 1/15Pr(X = 1) = f(1) = 2/15Pr(X = 2) = f(2) = 3/15Pr(X = 3) = f(3) = 4/15Pr(X = 4) = f(4) = 5/15
4
0
( ) 0
( ) 1x
f x
f x
Example #2
Let x = a discrete random variable, the number of days to receive a package from a Website distributor when requesting expedited delivery.
.1 if 2days
.4 if 3days
( ) .3 if 4days
.1 if 5days
.1 if 6days
x
x
f x x
x
x
Example #3 Let x = a discrete random variable, the number of
units produced before a reject occurs. The probability of a reject occurring is 1/5.
11 4
, 1,2,3...( ) 5 5
0 otherwise
x
xf x
1
1 0
1 4 1 4 1 11
45 5 5 5 5 15
x x
x x
note:
Find: Pr{X 10}Pr{20 X 30}Pr{X 15}
geometric series
3-3 Cumulative Distribution Function (CDF)
Definition
Example #3 revisited
Find: Pr{X 10} = F(10) = .892626 Pr{20 X 30} = F(30) – F(20) = (1-.830) – (1-.820) = .99876 - .98847 = .0103Pr{X 15} = 1 – F(14) = 1 – (1 - .814) = .814 = .04398
1 1
1 1 0
1 4 1 4( ) ( )
5 5 5 5
41
1 451
45 515
i ix x x
i i i
x
x
F x f i
1
1
n
n
a rS
r
x f(x) F(x)
1 0.2 0.22 0.16 0.363 0.128 0.4884 0.1024 0.59045 0.08192 0.672326 0.065536 0.7378567 0.052429 0.7902858 0.041943 0.8322289 0.033554 0.86578210 0.026844 0.89262611 0.021475 0.91410112 0.01718 0.93128113 0.013744 0.94502414 0.010995 0.9560215 0.008796 0.96481616 0.007037 0.97185317 0.005629 0.97748218 0.004504 0.98198619 0.003603 0.98558820 0.002882 0.988471
Problem 3-28
Determine the cumulative distribution function of the following R.V.’s [P(xi) = 1/6 for all xi]:
Outcome a b c d e f x 0 0 1.5 1.5 2 3
0, 0
1/ 3, 0 1.5
( ) 2 / 3, 1.5 2
5/ 6, 2 <3
1, 3
x
x
F x x
x
x
F(x)1.0
2/3
1/3
0 1.5 2 3
Don’t confuse discrete with
integer!
Problem 3-35
Verify the following function is a CDF & determine the PMF & requested probabilities:
P(X < 3) = P(1 < X < 2) = P(X < 2) = P(X > 2) =
x
x
x
xF
31
315.
10
)(
PMF:f(0) = F(0) = 0f(1) = F(1) – F(0) = .5f(2) = F(2) – F(1) = .5 - .5 = 0f(3) = F(3) – F(2) = 1 – .5 = .5
1
.5
.5
.5
Example 3-8
Example 3-8
Figure 3-4 Cumulative distribution function for Example 3-8.
A Fish Tale –A Transition to the next concept
These probability distributions are great. But what if my boss wants to know how many fish I
will sell today? I need one number not a entire distribution.
Let Z = a discrete random variable, thenumber of fish sold in one day.
.1 if 0
.3 if 1( )
.5 if 2
.1 if 3
z
zf z
z
z
The Mean Number of Fish
Let Z = a discrete random variable, thenumber of fish sold in one day.
.1 if 0
.3 if 1( )
.5 if 2
.1 if 3
x
xf z
x
x
( ) (.1)(0) (.3)(1) (.5)(2) (.1)(3) 1.6E Z
Expect to sell 1.6 fish on the average!
3-4 Mean and Variance of a Discrete Random Variable
Definition
Mean of a discrete R.V.
The mean of a discrete R.V. uses the probability of each discrete observation to weight that observation:
1 1 2 2( ) ( ) .... ( )n nP X x x P X x x P X x x
( ) ( )x
E X x f x
Variance of a discrete R.V.
The variance of a discrete R.V. X also uses probability to weight each observation.
2 2 2 21 1 2 2( )( ) ( )( ) .... ( )( )n nP X x x P X x x P X x x
2( ) ( ) ( )x
V X x f x 2 2( )
x
x f x
( )V X
We don’t do many derivations, but it needs to be clear to you how we get from line two to line three. Try it!
Problem 3-40
Determine the mean and variance P(xi=1/6) for all i:
Outcome a b c d e f x 0 0 1.5 1.5 2 3
= 0(1/3) + 1.5(1/3) + 2(1/6) + 3(1/6) = 4/3
2 2 2( ) ( )x
V X x f x
x
xxfXE )()(
= 02(1/3) + 1.52(1/3) + 22(1/6) + 32(1/6) – (4/3)2
= 1.139
First Two Moments do not Determine Distribution
The mean is the first moment. The variance is the second central moment –
second moment about the mean. Two entirely different distributions can have
identical mean and variance. Very often though the first two moments
give sufficient information to do effective modeling.
Yet Another ProblemDetermine the mean & variance of:
2 1( ) , 0,1,2,3,4
25
xf x x
( ) ( )
x
E X x f x
2*0 1 2*1 1 2*2 1 2*3 1 2*4 10 1 2 3 4
25 25 25 25 25
3 10 21 36
0 2.825 25 25 25
2 2 2( ) ( )x
V X x f x 2 2 2 2 2 21 3 5 7 9
0 1 2 3 4 (2.8) 1.3625 25 25 25 25
3-4 Mean and Variance of a Discrete Random Variable
Figure 3-5 A probability distribution can be viewed as a loading with the mean equal to the balance point. Parts (a) and (b) illustrate equal means, but Part (a) illustrates a larger variance.
3-4 Mean and Variance of a Discrete Random Variable
Figure 3-6 The probability distribution illustrated in Parts (a) and (b) differ even though they have equal means and equal variances.
Example 3-11
3-4 Mean and Variance of a Discrete Random Variable
Expected Value of a Function of a Discrete Random Variable
))(())(( xEhxhE Unless the function is linear
A Derivation
; [ ]
[ ] [ ] ( )
( ) ( ) ( ) ( )
[ ]
x
x
x x x
y x
Y a bX E X
E Y E a bX a bx f x
af x bxf x a f x b xf x
a bE X a b
More on Expected Values It costs Axe E. Dent $700 a week to maintain a safety
officer and another $340 for each accident that the safety officer must process. What is the expected weekly cost?
Let x = a discrete random variable, the number of accidents per week in the Axe E. Dentt manufacturing plant.
Let Y = a discrete random variable, the weekly cost of maintaining a safety officer.
4
0
1( ) Pr{ } ; 0,1,2,3,4
151 8
[ ]15 3
8[ ] 700 340 $1,606.67
3
xx
y
xf x X x x
xE X x
E Y
Y = 700 + 340X E[Y] = 700 + 340 E[X]
But Look Here
; [ ]
[ ] [ ] ( )
1 1( ) ( )
x
x
x x x
bY E X
Xb b
E Y E f xX x
bb f x b f x
x x
Keep Looking…X f(x) 1/X1 0.25 12 0.2 0.53 0.15 0.3334 0.1 0.255 0.3 0.2
sum 1E[X] = 3 0.485 = E[1/X]
1 1 1.485
3x
EX
A most important lesson has
been learned here today.
.25(1) + .2 (.5) + .15 (.333) + .1 (.25) + .3 (.2) = .485
What about the Variance?
2
2
2
2
2 22
22 2 2
where [ ]
[ ] [ ]
x
y
y
x
x x
x x
Y a bX Var X
Var Y Var a bX
E Y
E a bX a b
E bX b E b X
b E x b
Yet another insight… Analogous to the mean’s being the center
of gravity of a distribution of mass, the variance represents, in terminology of mechanics, the moment of inertia.
The moment of inertia of an object about a given axis describes how difficult it is to change its angular motion about that axis.
Bonus Topic
Let X = a random variable, the number of points scored with first down and ten yards to go, at discrete points on the playing field.
Number of outcomes is 103 touchdown +7 field goal + 3 safety -2 opponent’s touchdown -7 turning the ball over to the opponent at any of 99
possible points on the field
More of that bonus
Based upon a study of 2,852 first-and-ten plays by Virgil Carter and Robert Machol:
Field Position
Expected point value
95 -1.24585 -0.63775 0.23665 0.92355 1.53845 2.39235 3.16725 3.68115 4.5725 6.041
Next Class
Theoretical Discrete Distributions Uniform Binomial Geometric Poisson
and so much more…
ENM 500 studentshurrying to class.