Professional Documents
Culture Documents
Probabilistic Modelling
Experiment: Stick Cutting
1m
0 x1 x2 1
0 1 X1
Solution (cont’d)
For the 3 pieces to form a triangle, no single piece can be too long
Specifically each piece must be shorter than 0.5 m
In general, X1 could be less than X2 (i.e. the first mark is to the left of
the second mark) or the opposite
X2 – X1 < 0.5 1
1 – X2 < 0.5
0.5
1m
x2 4
X1
x1 0 0.5 1
Solution (cont’d)
If X1 > X2, then a triangle can be formed if the experiment outcome
meets the 3 conditions:
X2 < 0.5
X1 – X2 < 0.5
1 – X1 < 0.5 X2
1
0.5
0 0.5 1 X1
1m
x1
5
x2
Solution (cont’d)
Therefore, the shaded areas below represent all possible outcomes
of the experiment when the 3 pieces of the stick can form a triangle.
X2
1
0.5
0 0.5 1 X1
7
Events (cont’d)
Two events A and B are said to be “mutually exclusive”
if they share no points in common
AB=Ø
Event probability
P{A} is the probability that the experiment outcome lies within
event A
Three axioms of probability
0 P{A} 1
P{U} = 1
If A B = Ø, P{A U B} = P{A} + P{B} 8
Random Variables
A RV represents the outcomes of a non-deterministic
experiment (e.g. flipping a coin)
Suppose the sample space of Y is y1, y2, y3, …. That is, every day you
count the passengers, Y could be any one of y1, y2, y3, ….
25% 22%
20% 17%
% Frequency
15%
10%
5% 4%
5%
0% 10
y1 y2 y3 …. y10
Discrete Random Variables (cont’d)
This frequency plot “approximates” the Probability Mass Function
(PMF) of the RV Y, which is denoted as pY(y)
pY(y) P{Y=y} probability that the random variable Y takes on the
experimental value y on a performance of the experiment
In our example
pY(y1) P{Y=y1} 0.05
pY(y2) P{Y=y2} 0.17
……
pY(y10) P{Y=y10} 0.04
Note that
0 pY(y) 1 y
∑ pY(y) = 1
11
Discrete Random Variables (cont’d)
Associated with each PMF pY(y) is its Cumulative
Distribution Function (CDF), denoted as PY(y)
12
Discrete Random Variables (cont’d)
If we wish to consider two discrete RVs simultaneously
(i.e. our experiment has 2 discrete outcomes), we must
use the “Joint” PMF
13
Discrete Random Variables (cont’d)
Conditional probability – 3 types of conditioning
Conditioning among events within sample space
P{B|A} = P{outcome of the experiment lies within event B, given
that it lies within event A}; which could also be written as
P{B|A} = P{outcome of the experiment lies within event B A,
given that it lies within event A}
P{B|A} = P{B A} / P{A}
Conditioning of RV on event A
pX(x|A) = pX(x) / P{A} for all x A; P{A} > 0
pX,Y(x,y|A) = pX,Y(x,y) / P{A} for all (x,y) A; P{A} > 0
14
Discrete Random Variables (cont’d)
Independence – 2 types
Independence among events within sample space
Events A and B are said to be “independent” if information
concerning the occurrence of one of them does not alter the
probability of occurrence of the other, that is
P{B|A} = P{B}
Also if A and B are independent, then P{A B} = P{A} . P{B}
15
Discrete Random Variables (cont’d)
Consider again the RV Y representing the number of passengers
waiting for the bus at a specific time
The sample average of the “many” independent experiment outcomes
will be “very close to” the expected value (or mean) of the discrete RV
Y, which we denote as E[Y]
16
Discrete Random Variables (cont’d)
Important Relationships
17
Common PMFs
Bernoulli
Geometric
Binomial
Poisson
Hypergeometric
Negative Binomial
18
Bernoulli PMF
A Bernoulli RV X can take on either 0 (failure) or 1 (success)
If pX(1) = p, then pX(0) = 1-p
E[X] = p
Var[X] = p(1-p)
Example
If you have a roulette wheel as shown
The outcome of spinning is 1 if arrow points to the shaded area
and 0 otherwise
p = 0.25
E[X] = 0.25 19
20
Geometric PMF (cont’d)
Now suppose that we spun the wheel 1 time with no
success, what is the probability that the next spin will
result in a success?
Let X1 and X2 represent the first and second spins respectively
Note that X1 and X2 are 2 Bernoulli RVs which are independent of
each other
P{X2=1|X1 = 0} = P{X2=1, X1=0}/P{X1=0} = P{X2=1}
Consider a Binomial RV W
n!
pW ( w) p w (1 p ) n w for w 0,1,2,...., n
w!(n w)!
E[W ] np
Var[W ] np (1 p ) 22
Poisson PMF
A Poisson RV K is defined as the number of
“arrivals” occurring in a specified time interval [0,t]
t
( t ) e
k
pK (k ) for k 0,1,2,....
k!
is the mean arrival rate
23
Continuous Random Variables
A continuous RV takes on real values (e.g. travel time
between 2 points)
25
Continuous Random Variables
(cont’d)
Associated with any PDF of a continuous RV X is its CDF
(Cumulative Distribution
x
Function), denoted as FX(x)
FX(x) = P{Xx} = fX(x) dx
-
26
Continuous Random Variables
(cont’d)
Conditional PDF
Conditioning on event A
If we have fX(x) and we are interested in the experimental
outcome within event A, then
fX(x|A) = fX(x) / P{A} x A and p{A}>0
If we have fX,Y(x,y) and we are interested in the experimental
outcome within event A, then
fX,Y(x,y|A) = fX,Y(x,y) / P{A} x,y A and p{A}>0
Conditioning on another RV
If we have fX,Y(x,y) and we are interested in the experimental
outcome of X given a specific value of Y, then
fX|Y(x|y) = fX,Y(x,y) / fY(y)
Also, fY|X(y|x) = fX,Y(x,y) / fX(x)
27
Continuous Random Variables
(cont’d)
Independence of RVs
28
Continuous Random Variables
(cont’d)
For a continuous RV X
E[X] = - x fX(x) dx
Var[X] = E[(X-E[X])2] = (x-E[X])2 fX(x) dx
-
29
Common PDFs
Uniform
Gaussian (Normal)
Exponential
Gamma
Weibull
Lognormal
Beta
30
Uniform PDF
1 (b a) a x b
fU (x)
0 otherwise
b
1 1 b
1 ba
E[ X ] x dx x |
2
(b 2 a 2 )
a
ba 2(b a ) a 2(b a ) 2
( b a ) 2
x2 Var [ X ]
12
0 xa
FU (x) x a b a a x b
x b
1 31
Gaussian (or Normal) PDF
Generally describes natural phenomena
Height distribution of human beings
Age distribution among women
PDF
E[T] = 1/
Var[T] = 1/ 2
Note that the exponential PDF has a no-memory
property similar to the geometric PMF 33