Professional Documents
Culture Documents
Unnikrishna Pillai
1 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Lecture 1
2 Probability
3 Independence
5 Partition
6 Advanced Topics
2 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
3 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Whole space S
fj Event A (more complicated
f1 f3
than elementary outcomes)
Event A vs. fj
f1 f3
f2 fi fn
elementary
outcomes
A
f2 fn
fi , fj . fi
{fi } : elementary outcomes
(b) An event A
H T
4 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Set operations
A B AB
AB
Ac Bc A B
(A B )c (AB )c
Ac B c (AB )c
A B A B = (AB )c = Ac B c
De Morgans
Ac B c (A B )c
Laws
= (A B )c = Ac B c
5 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
More generally,
A B C = A D, where D = B C
= A D = A(B C )
= A(B C ) = A B C ,
6 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Figure: AB = = A, B are
mutually exclusive sets. Figure: Partition of a set where,
A1 , A2 , ...An are disjoint sets whose
union gives the whole set.
Ai Aj = ,
A1 A2 . . . An = S .
7 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Probability
8 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Introduction
9 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Axioms of Probability
P (A) 0. (1)
P ( S ) = 1. (2)
P (A B ) = P (A) + P (B ). (3)
10 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Axioms of Probability
If A and B are mutually exclusive, then axiom (3) says that the
probability of their union is the sum of their probabilities.
We can use the above axioms to answer all these questions, and
similar ones.
11 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Axioms of Probability
Let, B C = D, then AD = .
P (A B C ) = P (A D )
= P (A) + P (D )
Figure
= P (A) + P (B C )
Hence, if A, B , C , D , . . . are = P (A) + P (B ) + P (C ),
pairwise mutually exclusive, then
in general
where A and D are mutually
P (A B C D .....) = exclusive. So are B and C. So we
P (A) + P (B )+P (C ) + P (D ) + . . . . can apply axiom (3).
12 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Axioms of Probability
Proof:
AA = S , and A A = .
Hence, by axiom (3)
P (A A) = P (A) + P (A).
But,
P (A A) = P (S ) = 1.
Hence,
P (A) + P (A) = 1
or, P (A) = 1 P (A). (4)
13 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Axioms of Probability
In general,
P (A B ) = P (A) + P (B ) P (A B ). (5)
A and B are generally not mutually exclusive . But their union can be
written as the union of two mutually exclusive sets as follows:
A B = A AB ,
where A and B are not mutually exclusive but A and AB are, and they
are as shown in the figure above.
14 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Axioms of Probability
Also,
B = (A A) B = AB AB , (7)
by axiom (3).
Or,
P (AB ) = P (B ) P (AB ) (9)
Axioms of Probability
In general,
P (A B C ) = P (A D )
= P (A) + P (D ) P (AD ), where D = B C
= P (A) + P (B C ) + P (A(B C ))
= P (A) + {P (B ) + P (C ) P (BC )} + P (AB AC ).
P (AB AC ) = P (E F ) = P (E ) + P (F ) P (EF )
= P (AB ) + P (AC ) P (ABC ).
P (A B C ) =P (A) + P (B ) + P (C ) P (A B )
P (BC ) P (AC ) + P (ABC ). (11)
16 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Independence
17 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Independence
18 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Independence
P (A B ) = P (A)P (B ) (13)
Proof: We have A B = A B
Hence using Eqn. (4),
P (A B ) = P (A B ) = 1 P (A B )
= 1 (P (A) + P (B ) P (AB )) using Eqn.(5)
= 1 P (A) P (B ) + P (AB )
= P (A) P (B ) + P (A)P (B ) since A, B are independent
= P (A) P (B ){1 P (A)}
= P (A) P (B )P (A)
= P (A) (1 P (B )) = P (A)P (B ).
Independence
P (BC ) = P (B )P (C ) (14b)
20 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Independence
21 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Independence
22 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Conditional Probability
Event M
Event M
AM BM
A M A B
(a) (b)
23 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Conditional Probability
Let P (A|M ) denote the probability of an event A given that some other
event M has already occurred.
Then P (A|M ) is defined as,
P (AM )
P (A|M ) = 0, (17)
P (M )
provided P (M ) > 0.
Does definition (17) satisfy the probability axioms (1) (3)?
24 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Conditional Probability
It is easy to see that the above definition obeys all the three axioms
Eqns. (1) (3). To start with
P (AM )
i. P (A|M ) = P (M )
0
P (S M ) P (M )
ii. P (S |M ) = P (M )
= P (M )
=1
iii. If AB = , then
P [(A B ) M ] P (AM BM )
P (A B |M ) = = ,
P (M ) P (M )
P (AB ) P (A)P (B )
P (A|B ) = = = P (A),
P (B ) P (B )
26 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
From (17)
P (AB )
P (A|B ) = P (AB ) = P (A|B )P (B ). (18)
P (B )
Also,
P (BA)
P (B |A) = P (BA) = P (B |A)P (A). (19)
P (A)
But AB BA P (AB ) = P (BA).
Hence from Eqns. (18) and (19),
Or,
27 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Cj
C1 C3
C2 Cn
Ci
28 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
29 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
P (B |A)P (A)
P (A|B ) = , (22)
ni=1 P (B |Ci )P (Ci )
where C1 , C2 , . . . Cn form a partition..
Replace A with Ck ,
P (B |Ck )P (Ck )
P (Ck |B ) = n , k = 1, 2, . . . n. (23)
i =1 P (B |Ci )P (Ci )
30 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Example 1
A box contains m black balls and n white balls. Two balls are
drawn without replacement. What is the probability that the first
ball is white and the second one is black?
Solution:
Let W1 :"First ball is white" and B2 :"Second ball is black".
Then we need P (B2 W1 ) = P (B2 |W1 )P (W1 ).
Now,
n
P (W1 ) =
n+m
and
m
P (B2 |W1 ) =
n+m1
[since there will be m black balls and n 1 white balls left after a white
ball is drawn].
Hence,
n m nm
P (B2 W1 ) = = .
n+m n+m1 (n + m)(n + m 1) 31 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Example 2
Box 1 contains 100 Red balls and 100 Blue balls; Box 2 contains
150 Red balls and 50 Blue balls. A ball is drawn at random from
one of the boxes without knowing which box it came from.
(a) What is the probability that the ball drawn Red?
(b) Given that the ball drawn is Red, what is the probability that
it came from Box 2?
32 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Example 2
Example 2
100 1 150 1 5
P (R ) = P (R |B1 )P (B1 ) + P (R |B2 )P (B2 ) = + =
200 2 200 2 8
Thus probability of picking a red ball is slightly higher. This makes
sense as Box 2 has a lot more Red balls.
34 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Example 2
(b) Knowing that the ball drawn is red, what can we say about whether
it came from Box-1 or Box-2? Clearly Box-2 has more Red balls, so
chances are higher that it came from Box 2. How high is that
probability? Bayes theorem can answer that quantitatively.
From (18),
3 1
P (R |B2 )P (B2 ) .
4 2
P (B2 |R ) = = 5
= 0.6.
P (R ) 8
Hence given that the ball is Red, there is 60% chance that it came
from Box 2.
35 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Example 3
36 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Example 3
P (Ai ) = p, P (Ai ) = 1 p, i = 1, 2, 3.
R = A1 A2 A3
Then,
P (R ) = P (A1 A2 A3 )
= P (A1 A2 ) + P (A3 ) P (A1 A2 A3 )
= P (A1 )P (A2 ) + P (A3 ) P (A1 )P (A2 )P (A3 )
= p + p2 p3 ,
where we have used the independence of the switches.
37 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Example 3
P (R |A3 )P (A3 )
P (A3 |R ) =
P (R )
1.p
=
p + p2 p3
1
= .
1 + p p2
38 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
The sum can only be either finite or infinite. Each case is interesting by
itself and leads to interesting conclusions.
39 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
40 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
41 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Pn1 = P (Xn1 ).
We can assume p < 0.5 as generally any game is rigged against you.
We can link the above probabilities as follows
Xn = Xn S = Xn (H H ) = Xn H Xn H
42 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Pn = P (Xn )
= P (Xn H ) + P (Xn H )
= P (Xn |H )P (H ) + P (Xn |H )P (H )
= pPn+1 + qPn1 (24)
43 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
This is because the event: (Xn |H) =A is ultimately ruined when his/her
wealth is $n and given that A wins next toss," which is same as
(Xn |H) = A is ultimately ruined given that his/her wealth is $(n + 1)" =
Xn + 1 .
Similarly
Xn |H = Xn1 .
Now,
a+b1
(Pk +1 Pk ) = (Pa+b Pa+b1 ) + (Pa+b1 Pa+b2 )
k =n
a+b1 a+b1
k
q
(Pk +1 Pk ) = (P1 1). (28)
k =n k =n p
45 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Or, n a+b
q
p
qp
Pn = (1 P1 ) (29)
1 qp
46 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Let n = 0, then
1 ( qp )a+b
P0 = 1 = ( 1 P1 ) (30)
1 qp
( qp )n ( qp )a+b
Pn =
1 ( qp )a+b
47 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
Or,
( qp )b 1 1 ( qp )b
Pa = = (32)
( qp )a+b 1 1 ( qp )a+b
This gives the probability of ruin for A given his/her current wealth is
$a. Usually it is safe to assume that p < 0.5, as in general any casino
game is slightly unfavorable to the player.
To keep Pa close to zero, b must be small (close to zero). But one
could look at $b only as the intended profit" for A (instead of Bs entire
wealth). So for A to survive (not to be ruined), keep the profit $b low
(less greed).
Pa can be interpreted as the risk involved in trying to get $b by
investing $a on a game whose favorability factor is p.
48 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
0.9 100
p=0.4 p=0.4
0.8 p=0.45 90 p=0.45
p=0.48 p=0.48
p=0.52 80 p=0.52
0.7 p=0.55 p=0.55
Prob. of ruin for player a (P a)
0.1 10
0 0
(3,1) (4,1) (5,1) (5,2) (6,1) (6,2) (8,2) (10,1) (20,2) (20,4) (3,1) (4,1) (5,1) (5,2) (6,1) (6,2) (8,2) (10,1) (20,2) (20,4)
(a,b) (a,b)
(a) Prob. of ruin of A, i.e., B wins (b) Average time taken for A to win
49 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
50 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
From the graph on the left at low risk (Pa = 0.15), (10,11) game is
appropriate if the favorability factor is p = 0.48. Thus it is possible to
make gains in moderately unfavorable situations (p = 0.48). provided
the greed factor $b is kept low compared to the investment.
Hence a 10% return carries a 15% risk even if each transaction is
slightly unfavorable (p = 0.48).
51 / 52
Sets and set operations Probability Independence Conditional probability and inference Partition Advanced Topics
52 / 52