Beruflich Dokumente
Kultur Dokumente
LECTURE 6 OF 6
CONDITIONAL
PROBABILITY
&
BAYES’ THEOREM
2
At the end of the lesson, students
should be able to:
3
REMEMBER – THE PREVIOUS LECTURE
5
TOTAL PROBABILITY OF EVENT B = P(B)
P( B | A ) B
A B’
P( A)
P( B | A’ )
B
P( A’) A’
B’
P( B ) = P(A) x P( B | A ) + P(A’) x P( B | A’ ) 6
THE TOTAL PROBABILITY THEOREM
P( B ) = P(A1) x P( B | A1 ) + P(A2) x P( B | A2 )
+ P(A3) x P( B | A3 ) +…..+ P(An) x P( B | An )
7
P (A|B) : “the probability of A given B”
P( A∩B)
P ( A|B ) =
P (B)
P ( A|B ) × P(B) = P(A ∩ B)
Since P ( A ∩B ) =P(B ∩ A)
Substitute (2) into (1) , we get :
BAYES’
THEOREM
P ( B|A) × P(A)
P ( A|B ) =
P (B) 9
BAYES’ THEOREM
P ( B|A i ) × P(A i )
P( A i |B ) =
P (B)
where A1 , A2 , ….. , An are n mutually
exclusive and exhaustive events so that
A1 ∪A2 ∪ ……. ∪An = S ,
the possibility space, and B is an arbitrary
event of S ( i = 1,2,3,…..,n ) .
P(B) is the total probability of event B.
Bayes’ Theorem is useful when we have
10
to ‘ reverse the conditions ’ in a problem.
Example 1
There are 12 red balls and 8 green balls
in a bucket. Two balls are taken out in
sequence without replacement. By using
a tree diagram , find the probability that
(a) the first ball is red
(b) the second one is red if the first is red
(c) the second one is red if the first is
green
(d) the second one is red
11
Solution: R ~ red ball
11
R2 G ~ green ball
19
12
R1 8 G2
20
19 12
19 R2
8 G1
20 7
G2
19
12 11 + 8 12
= 20 19
20 19
3
=
5
14
P( R 2|R 1) ×
P(R 1)
(e) P(R1 | R2 ) =
P(R 2)
11 12
19 20
‘Reverse =
condition’ 3
use 5
Bayes’
Theorem 11
=
19
15
Example 2
19
Solution: A – Aishah, S – Siti , M - Muna
B – Broken Biscuits
0.7 B
B’ P ( A|B )
0.55 A 0.3
P ( B|A) × P(A)
0.3 0.2 B =
S P (B)
0.8 B’
0.15 M 0.1
B
0.9 B’ 20
BAYES’
THEOREM
P ( B|A) × P(A)
P ( A|B ) =
P (B)
0.7 × 0.55
=
(0.55 × 0.7) + (0.3 × 0.2) + (0.15 × 0.1)
0.7 × 0.55
= = 0.837
0.46 21
Example 4
C (i) P(C) =
0.9
P(B1) x P( C | B1 )
0.75 B1 0.1 C’
+ P(B2) x P( C | B2 )
0.9 × 0.75
=
0.8
= 0.84375
25
THE TOTAL PROBABILITY THEOREM
TOTAL PROBABILITY OF EVENT B = P(B)
P( B ) = P(A1) x P( B | A1 ) + P(A2) x P( B | A2 )
+ P(A3) x P( B | A3 ) +…..+ P(An) x P( B | An )
BAYES’ THEOREM
P ( B|A i ) × P(A i )
P( A i |B ) =
P (B) 26
Exercise :
. Three children, Azman, Mariam and Nasir, have
equal plots in a circular patch of garden. The
boundaries are marked out by pebbles, Azman has
80 red and 20 white flowers in her patch, Mariam
has 30 red and 40 white flowers and Nasir has
10 red and 60 white flowers. Their young sister,
Mumtaz, wants to pick a flower for her teacher.
Answer :
16 5
(a) 0.5 (b) (c)
35 16
28