854
Introduction to Manufacturing Systems
Probability
Stanley B. Gershwin
Laboratory for Manufacturing and Productivity
Massachusetts Institute of Technology
gershwin@mit.edu
Probability 6= Statistics
1−P
(1 − P) × (−1) + (P) × =0
P
Notation, terminology:
is a sample path.
Probability 12 Copyright
2018
c Stanley B. Gershwin. All rights reserved.
Probability Basics
Discrete Sample Space
or,
E = {ω|n(12) = 6}
High probability
U
Low probability
P(Ā) = 1 − P(A)
Probability 15 Copyright
2018
c Stanley B. Gershwin. All rights reserved.
Probability Basics
Set Theory
Venn diagrams
A B
U
A B
AUB
P(A ∩ B) = P(A)P(B).
.143
.179
.214
.102
.179
.179 .0089
.05
If P(B) 6= 0, A B
P(A ∩ B)
P(A|B) = U
A B
P(B) AUB
U
C A D
U U
A C A D
P(C ∩ B) P(C )
• P(C |B) = = because C ∩ B = C .
P(B) P(B) C D
A
P(D)
Similarly, P(D|B) = A C
U
A D
U
P(B)
• A ∩ B = A ∩ (C ∪ D) = (A ∩ C ) ∪ (A ∩ D)
• Therefore
P(A ∩ B) = P(A ∩ (C ∪ D))
= P(A ∩ C ) + P(A ∩ D) because (A ∩ C ) and (A ∩ D) are
disjoint.
U
A D
U
A
C
U D=C
A C
and
A [
Ej = the universal set
j
X
P(Ej ) = 1
j
and
P
P(A) = j P(A|Ej )P(Ej ).
Example
A = {I will have a cold tomorrow.}
E1 = {It is raining today.}
E2 = {It is snowing today.}
E3 = {It is sunny today.}
(Assume E1 ∪ E2 ∪ E3 = U and E1 ∩ E2 = E1 ∩ E3 = E2 ∩ E3 = ∅.)
Then A ∩ E1 = {I will have a cold tomorrow and it is raining today}.
And P(A|E1 ) is the probability I will have a cold tomorrow given that it is
raining today.
etc.
Then
so
P({I will have a cold tomorrow | it is sunny today}) P({it is sunny today})
or
Flip of a Coin
Let U={H,T}. Let ω = H if we flip a coin and get heads; ω = T if
we flip a coin and get tails.
Let V be the real number line.
X (T ) = 0
X (H) = 1
Assume the coin is fair. (No tricks this time!) Then
P(ω = T ) = P(X = 0) = 1/2
P(ω = H ) = P(X = 1) = 1/2
3/8
1/4
1/8
0 1 2 3 x
• Mean (average): x̄ = µx = E (X ) =
P
x xP(x )
• Variance: Vx = σx2 = E (X − µx )2 = − µx )2 P(x )
P
x (x
√
• Standard deviation (sd): σx = Vx
• Coefficient of variation (cv): σx /µx
x̄ = 1.5
Vx = 0.75
σx = 0.866
cv = 0.577
? Ȳ = aX̄ + b.
? VY = a2 VX ; σY = |a|σX .
P(X B = 1) = p.
P(X B = 0) = 1 − p.
i=0
N!
P(X b = x ) = p x (1 − p)(N−x )
x !(N − x )!
0.09
0.08
0.05
P(n)
0.04
0.03
0.02
0.01
0
20 25 30 35 40 45 50 55 60
n
Probability 40 Copyright
2018
c Stanley B. Gershwin. All rights reserved.
Discrete Random Variables
3. Geometric
1 2 3 4 ... k −4 k −3 k −2 k −1 k
0 0 0 0 ... 0 0 0 0 1
←−−−−−−−−− k −−−−−−−−−−−−−−−−−−−−→
0.11
0.1
0.09
0.06
P(n)
0.05
0.04
0.03
0.02
0.01
0
0 5 10 15 20 25 30 35
n
Probability 43 Copyright
2018
c Stanley B. Gershwin. All rights reserved.
Discrete Random Variables
4. Poisson Distribution
n
P −λ λ
P(X = n) = e
n!
Discussion later.
High density
The probability of a
two-dimensional random
variable being in a small square
is the probability density times
the area of the square. (The
definition is similar in
higher-dimensional spaces.)
Dimensionality
• Continuous random variables can be defined
? in one, two, three, ..., infinite dimensional spaces;
? in finite or infinite regions of the spaces.
• Continuous random variables can have
? probability measures with the same dimensionality as
the space;
? lower dimensionality than the space;
? a mix of dimensions.
x1
M2
B2
x2 M3
M1 B1 M2 B2 M3
x1
M2
B2
x2 M3
M1 B1 M2 B2 M3
x2
Trajectories of buffer levels
in the three-machine line if
the machine states stay
110 constant for a long enough
010
time period.
100
M1 B1 M2 B2 M3
x2 One−dimensional density
Two−dimensional
density
Probability distribution
of the amount of
material in each of the
Zero−dimensional
two buffers.
density (mass)
x1
M1 B1 M2 B2 M3
x2
Probability
distribution of the
amount of material
in each of the two
x1 buffers.
M1 B1 M2 B2 M3
Z b
Fact: F (b) − F (a) = f (t)dt
a
Z ∞
Definition: Expected value of x = x̄ = tf (t)dt
−∞
0.4
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
−4 −2 0 2 4 x
F(x)
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
−4 −2 0 2 4 x
Note: Some people write N(µ, σ) for the normal distribution with mean µ and
variance σ 2 .
0.4
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
−4 −2 0 2 4
f (x )
fT (x )δx = P(x ≤ X ≤ x + δx ) = δx where F () and f () are the normal distribution
1 − F (0)
and density functions with parameters µ and σ.
0.5
truncated
0.45
not truncated
0.4
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
−4 −2 0 2 4
fT 0 (x )δx = P(x ≤ X ≤ x + δx ) = f (x )δx for x > 0 and P(X = 0) = F (0) where F () and
f () are the normal distribution and density functions with parameters µ and σ.
Here again, µ and σ are the parameters of f (x ), not fT 0 (x ).
For both kinds of truncation, fT (x ) and fT 0 (x ) are close to f (x ) when µ σ, and not
otherwise.
Probability 61 Copyright
2018
c Stanley B. Gershwin. All rights reserved.
Continuous Random Variables
Law of Large Numbers
Sn = X1 + ... + Xn
Then for every > 0,
!
S
n
lim P − µ > =0
n→∞ n
n −nµ
Then as n → ∞, P( S√ nσ
) → N(0, 1).
0 0
0
0
0
0 0
of
of
0 0
0 0
0
0
0
0 0
0 0
0 1 2 3 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
x x
0
0
0
0
0
of
of
0 0
0
0
0
0
0
0 0
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
x x
0.08
0.05
0.04
0.03
0.02
0.01
0
20 25 30 35 40 45 50 55 60
0.15 0.15
0.1 0.1
0.05 0.05
0 0
1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10
0.25 0.25
0.15 0.15
0.1 0.1
0.05 0.05
0 0
1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10
0.4
0.35
0.3
0.25
0.2
0.15
0.1
3
0.05 2
1
0-3
-2 0
-1 -1
0
1 -2
2
3 -3
Probability 67 Copyright
2018
c Stanley B. Gershwin. All rights reserved.
More Continuous Distributions
Uniform
1
f (x ) = for a ≤ x ≤ b
b−a
f (x ) = 0 otherwise
Uniform density
Uniform distribution
exponential distribution
exponential density
0
0
x
P −λt (λt)
P(X = x ) = e
x!
• For example,
? there is a known finite maximum X max ,
? 0 ≤ Xn ≤ X max ,
? and the sequence U0 , U1 , ... (where Ui = Xi /X max ) looks like a set of
uniformly distributed, independent random variables.
I That is, statistical tests say that the probability of the sequence not
being independent uniform random variables is very small.
• If you use the same seed twice, you get the same sequence both times.
This can be convenient, especially in development of software.
• If you use different seeds, you get completely different sequences, even if
the seeds are close to one another.