CL 202 Fundamentals Handout Spring2016
CL 202 Fundamentals Handout Spring2016
CL 202 Fundamentals Handout Spring2016
Fundamentals of Probability
and Random Variables
Mani Bhushan and Sachin Patawardhan
Department of Chemical Engineering
I.I.T. Bombay
1/20/2016
Fundamentals
Automation Lab
IIT Bombay
Outine
Sample Space
Probability Space
Computing Probabilities
1/20/2016
Fundamentals
20-01-2016
Automation Lab
IIT Bombay
Note
1/20/2016
Fundamentals
Probability
Automation Lab
IIT Bombay
(Maybeck, 1979)
P ( A)
lim
N ( A)
N N
Fundamentals
20-01-2016
Automation Lab
IIT Bombay
Fundamentals
Sample Space
Automation Lab
IIT Bombay
1/20/2016
Fundamentals
20-01-2016
Field
Automation Lab
IIT Bombay
Field (F)
A field F is a non - empty class of sets such that if
( a ) A F then A F and
(b) A, B F then A B F
Using these properties, it can be shown that
(a) If A,B F then A B F
________
A B F A B A B F
(b) The field contains the " certain event" ( S A A )
and the " impossible event" ( A A )
Fundamentals
Automation Lab
IIT Bombay
Fundamentals
20-01-2016
Automation Lab
IIT Bombay
Fundamentals
Automation Lab
IIT Bombay
Fundamentals
10
20-01-2016
Automation Lab
IIT Bombay
Fundamentals
11
Automation Lab
IIT Bombay
Axioms of Probability
The probability function (or probability measure) P (.)
is defined to be a real scalar - valued function
defined on Borel field B that assigns a value, P( Ai ),
to each Ai which is a member of B ( Ai B) such that :
1. P( Ai ) 0 for all A i B
2. P( S ) 1
3. If A1,A2 ,...AN are disjoint or mutually exclusive
N
i 1
i 1
Fundamentals
12
20-01-2016
Automation Lab
IIT Bombay
P(A)+P(B)
N
N
1/20/2016
Fundamentals
13
Automation Lab
IIT Bombay
A7
A2
Cones A1,A2 ,..., A7 ,...
A1
are disjoint or
mutually exclusive
sets : Relatively easy
to assign a probability
value to each set
1/20/2016
14
20-01-2016
Automation Lab
IIT Bombay
Probability Space
Probability space : Defined by the triplet ( S, B, P)
of the sample space, the underlying Borel field, and
the probability function, all defined axiomatically.
Fundamentals
15
Automation Lab
IIT Bombay
Fundamentals
16
20-01-2016
Automation Lab
IIT Bombay
P3 : 1.9 5.3 4 (1 / 6)
P3 : 1 0 ;
P3 : 10 1
Fundamentals
17
Automation Lab
IIT Bombay
Points to Note
PrA 0 does NOT imply A
PrA 1 does NOT imply A S
1/20/2016
Fundamentals
18
20-01-2016
Automation Lab
IIT Bombay
Computing Probabilities
Consider a probability sapce ( S , B, P ).
Given an event A B, in some cases, it is easier to find P ( A ) than P ( A).
Then, using the fact A A S and ( A, A ) are disjoint, we can write
P( S ) P ( A) P ( A ) 1
P( A) 1 P ( A )
Odds of event A P ( A) / P( A ) P( A) / 1 P ( A)
Non-Disjoint Events
Let A and B be two events in B that are NOT disjoint.
We can write
A A B A B
which are disjoint.
P ( A) P A B P A B ........( I )
1/20/2016
Fundamentals
19
Automation Lab
IIT Bombay
Computing Probabilities
Non-Disjoint Events (contd.)
Fundamentals
20
10
20-01-2016
Automation Lab
IIT Bombay
Fundamentals
21
Automation Lab
IIT Bombay
Fundamentals
22
11
20-01-2016
Automation Lab
IIT Bombay
and so on.
Fundamentals
23
Automation Lab
IIT Bombay
For i 3, we have
P (3) P (T , T , H ) p(1 p )2
..........
For i n, we have
P ( n) P (T , T ,...., T , H ) p(1 p ) n 1
1/20/2016
Fundamentals
24
12
20-01-2016
Automation Lab
IIT Bombay
p 1 (1 p ) (1 p ) 2 ......
1
p
1
1 (1 p )
1/20/2016
Fundamentals
25
Automation Lab
IIT Bombay
Random Variable
Problem 1: A sample space associated with a random
phenomenon need not consist of elements that are
not numbers.
Example 1: A die with 6 faces painted with 6
different colors
Example 2: Candidates appearing in an election held
in a constituency
How to perform numerical calculations
involving such sample spaces?
1/20/2016
Fundamentals
26
13
20-01-2016
Automation Lab
IIT Bombay
Random Variable
Problem 2: We often have to consider multiple random
phenomena simultaneously. Even if the sample spaces
associated with these random phenomenon consists of
numbers, their ranges can be widely different.
Example: Temperature, pressure and feed
concentration fluctuations in a chemical reactor.
To understand the reactor behavior, these
multiple random phenomenon have to be
considered simultaneously.
How can we treat such problems through a
unified mathematical framework?
1/20/2016
Fundamentals
27
Automation Lab
IIT Bombay
Random Variable
It is possible to define a transformation
such that we can perform all the calculations using
a generic sample space
and
a generic Borel field
defined using the generic sample space?
The concept of a random variable is introduced
because, we need a mapping from the sample space
to the set of real numbers for carrying out
quantitative analysis through
a unified mathematical framework.
1/20/2016
Fundamentals
28
14
20-01-2016
Automation Lab
IIT Bombay
Fundamentals
Random Variable
29
Automation Lab
IIT Bombay
Fundamentals
30
15
20-01-2016
Automation Lab
IIT Bombay
Advantage
Fundamentals
31
Automation Lab
IIT Bombay
A1 x x1 ( , x1 ]
A2 x x2 ( , x2 ]
A x x1 , R ( , x1 ]* ( x1 , )
*
1
A1* A2 ( x1 , x2 ]
Taking complement s, unions, and intersections of the sets Ai
leads to finite intervals (open, closed, half open) and point values.
Fundamentals
32
16
20-01-2016
Automation Lab
IIT Bombay
Advantage
Fundamentals
33
Automation Lab
IIT Bombay
lim
lim
Fx ( x ) and Fx ( x )
F (x )
0
0 x
for 0 0
Property 1
F ( ) 1 and F ( ) 0
Property 2
Fx ( x ) is a non - decreasing function of x,
i.e., if x1 x2 then Fx ( x1 ) Fx ( x2 ).
1/20/2016
Fundamentals
34
17
20-01-2016
Automation Lab
IIT Bombay
Property 5
P(x x ) Fx ( x ) Fx ( x ).
Property 6
P( x1 x x2 ) Fx ( x2 ) Fx ( x1 )
1/20/2016
Fundamentals
Points to Note
35
Automation Lab
IIT Bombay
Fundamentals
36
18
20-01-2016
Automation Lab
IIT Bombay
Fx ( x ) q for 0 x 1
1 for 1 x
1/20/2016
Fundamentals
37
Automation Lab
IIT Bombay
Fundamentals
38
19
20-01-2016
Automation Lab
IIT Bombay
Fundamentals
39
Automation Lab
IIT Bombay
Fundamentals
40
20
20-01-2016
Automation Lab
IIT Bombay
Fundamentals
41
Automation Lab
IIT Bombay
Fundamentals
42
21
20-01-2016
Automation Lab
IIT Bombay
Probability Measured
A Probability Measure on B 4
P (Ci ) 1 / 6 for i 1,2,...,6
Fundamentals
43
Automation Lab
IIT Bombay
1
6
1
6
1
Fx (29.5) P{- x 29.5} in B R PC1, C2 in B4 2
6
Fx (6) P {- x 6} in B R P{ } in B4 0
Fundamentals
44
22
20-01-2016
Automation Lab
IIT Bombay
Fundamentals
45
Automation Lab
IIT Bombay
( ai )
i , ai x
1/20/2016
Fundamentals
46
23
20-01-2016
Automation Lab
IIT Bombay
Fundamentals
47
Automation Lab
IIT Bombay
Fx ( x )
x
x
( )d
p ( a )d
i
pi ( ai )d
i
( ai )
i ,ai x
Fundamentals
48
24
20-01-2016
Automation Lab
IIT Bombay
Fundamentals
49
Automation Lab
IIT Bombay
f x (4)=0.0001
0 for x 0
Fx ( x ) 0.6561 for 0 x 1
0.9477 for 1 x 2
1/20/2016
0.9963 for 2 x 3
Fx ( x ) 0.9999 for 3 x 4
1
for 4 x
Fundamentals
50
25
20-01-2016
Automation Lab
IIT Bombay
Probability Function on B
P (t1 t2 )
1/20/2016
t2 t1
for any 0 t1 t2 T
T
Fundamentals
51
Automation Lab
IIT Bombay
Define a continuous RV as
x( ) when [0 ,T ]
New sample space ( S R ) R
Event [0, t ] B Event x ( , t ] B R
(for 0 t T )
An event in B R , x ( , a ], where a T
is associated with the certain event, S , in B.
An event in B R , x ( , t ], where t 0
is associated with the impossible event in B.
1/20/2016
Fundamentals
52
26
20-01-2016
Automation Lab
IIT Bombay
0 if - t 0
Define Fx (t ) P( x t ) (t/T ) if 0 t T
1
if T t
Fundamentals
53
Automation Lab
IIT Bombay
P (t1 x t2 ) P( x t2 ) P (x t1 )
Thus, P(t1 x t2 ) Fx (t2 ) Fx (t1 )
t2 t1
,
T
Note
Now, suppose t1 t and t2 t
where 0 is a small number, then
2
P(t x t )
0 as 0
T
This is an example of a continuous random variable.
Which attributes qualify a RV to be called continuous?
1/20/2016
Fundamentals
54
27
20-01-2016
Automation Lab
IIT Bombay
P ( a x b) f X ( x )dx ......(1)
a
( x )dx 1
F (a ) P( x a )
( x )dx
1/20/2016
Fundamentals
55
Automation Lab
IIT Bombay
Typical f x (x )
Fundamentals
56
28
20-01-2016
Automation Lab
IIT Bombay
P(a x a )
( x )dx
As 0, it follows that P( a ) 0
This implies that for a continuous random variable,
we need not be precise about of the intervals :
P(a x b)=P (a<x b)=P (a<x<b)=P (a x<b)
1/20/2016
Fundamentals
57
Automation Lab
IIT Bombay
Note
( x )dx 2 f X ( x )
Fundamentals
58
29
20-01-2016
Uniform Distribution
Automation Lab
IIT Bombay
0 if - x a
Fx ( x ) ( x/ (b a )) if a x b
1
if b x
Differentiating Fx ( x ), we get
0
f x ( x ) 1 /(b a )
xa
a xb
xb
Uniform Density Function
1/20/2016
Fundamentals
59
Automation Lab
IIT Bombay
1/20/2016
60
30
20-01-2016
Automation Lab
IIT Bombay
Fundamentals
61
Automation Lab
IIT Bombay
Fundamentals
62
31
20-01-2016
Automation Lab
IIT Bombay
1/20/2016
Fundamentals
63
Automation Lab
IIT Bombay
By letting n
P (x t )
lim qt 1 n
qt
1 exp
n V n
V
qt
Fx (t ) P(x t )
1 exp for t 0
V
and associated probability density function is
for t 0
0
qt
f x (t ) q
exp for t 0
V
V
Fundamentals
64
32
20-01-2016
Automation Lab
IIT Bombay
Exponential Distribution
fx (t )
Fx (t )
t
Probability Density Function
1/20/2016
Fundamentals
Exponential Distribution
65
Automation Lab
IIT Bombay
Fundamentals
66
33
20-01-2016
Automation Lab
IIT Bombay
Points to Note
F ( a ) P ( x a ) P x ( , a ]
( x )dx
1/20/2016
Fundamentals
Points to Note
67
Automation Lab
IIT Bombay
Fundamentals
68
34
20-01-2016
Automation Lab
IIT Bombay
Histogram
Fundamentals
Automation Lab
IIT Bombay
Summary
69
1/20/2016
Fundamentals
70
35
20-01-2016
Automation Lab
IIT Bombay
Summary
Moreover
a generic probability function, P(.), is defined
for all events of the form A ( , x ]
Fx ( x ) P(( , x ])
where 0 1
Fundamentals
71
Automation Lab
IIT Bombay
Appendix
Conditional Probabilities
and Independence
(Dekking et al., 2005)
1/20/2016
Fundamentals
72
36
20-01-2016
Conditional Probability
Automation Lab
IIT Bombay
Fundamentals
Conditional Probability
73
Automation Lab
IIT Bombay
Note
P( A | B )
P( A | B ) P( A | B )
1/20/2016
P( A B)
P( B )
P( A B ) P( A B )
P( B )
P( B )
P ( A B ) ( A B ) P( B )
1
P( B )
P( B )
Fundamentals
74
37
20-01-2016
Conditional Probability
Automation Lab
IIT Bombay
Note
The conditional probability function
satisfies all the axioms of probability, and,
thus, is a valid probability function in itself.
Multiplication rule for any events A and B
P( A B ) P( A | B ) P( B ) P( B | A) P( A)
Consider event A, which can be expressed as
A ( A B) ( A B )
the probability of event A
P( A) P ( A B ) P ( A B )
P( A | B ) P( B ) P( A | B ) P( B )
1/20/2016
Fundamentals
75
Automation Lab
IIT Bombay
Fundamentals
76
38
20-01-2016
Automation Lab
IIT Bombay
Note : S B B
P( B ) 0.02 P( B ) 0.98
Problem is to find P(T )
Since T (T B ) (T B )
P (T ) P(T B ) P(T B )
P (T ) P(T | B ) P ( B ) P (T | B ) P ( B )
0.7 0.02 0.1 0.98 0.112
This is an application of the law of total probability.
1/20/2016
Fundamentals
77
Automation Lab
IIT Bombay
Fundamentals
78
39
20-01-2016
Automation Lab
IIT Bombay
Fundamentals
79
Automation Lab
IIT Bombay
P(T )
P(T B ) P(T B )
P(T | B ) P( B )
P(T | B ) P( B ) P(T | B ) P( B )
0.7 0.02
0.125
0.7 0.02 0.1 0.98
P( B | T )
Fundamentals
80
40
20-01-2016
Automation Lab
IIT Bombay
Interpretation
If we know nothing about a cow, we would say
that there is a 2% chance it is infected.
However, if we know it tested positive, then we
can say there is a 12.5% chance the cow is
infected.
Finding P( B | T ) using P(T | B ) is an
application of Bayes' Rule derived by English
clergyman Thomas Bayes in the 18th century.
1/20/2016
Fundamentals
81
Automation Lab
IIT Bombay
Bayes Rule
1/20/2016
P ( A | Ci ) P (Ci )
P ( A | C1 ) P (C1 ) ...... P ( A | Cm ) P (Cm )
P ( A | Ci ) P (Ci )
P ( A)
Fundamentals
82
41
20-01-2016
Independence
Automation Lab
IIT Bombay
Fundamentals
Independence
83
Automation Lab
IIT Bombay
P ( A B ) P( A) P ( B )
P( B )
P( A)
P ( A)
Fundamentals
84
42
20-01-2016
Automation Lab
IIT Bombay
Fundamentals
Automation Lab
IIT Bombay
References
1.
2.
3.
4.
5.
6.
85
1/20/2016
Fundamentals
86
43