You are on page 1of 20

IST 214- STATICTICS II

Week 2: Conditional probability Bayes‘ Rule

Prof. Dr. Erginbay Uğurlu

1
Conditional Probability

 A conditional probability is the probability


of one event, given that another event has
occurred:
P(A  B) The conditional
P(A | B)  probability of A given
P(B) that B has occurred

P(A  B) The conditional


P(B | A)  probability of B given
P(A) that A has occurred

2
Conditional Probability

 Conditional probability is used to determine how two


events are related; that is, we can determine the
probability of one event given the occurrence of another
related event.

 Conditional probabilities are written as P(A | B) and read


as “the probability of A given B” and is calculated as:

3
Conditional Probability…

Again, the probability of an event given that another


event has occurred is called a conditional probability…

Note how “A given B” and “B given A” are related…


4
Conditional Probability Example

 Of the cars on a used car lot, 70% have air


conditioning (AC) and 40% have a CD player
(CD). 20% of the cars have both.

 What is the probability that a car has a CD


player, given that it has AC ?

i.e., we want to find P(CD | AC)

5
Conditional Probability Example
(continued)
 Of the cars on a used car lot, 70% have air conditioning
(AC) and 40% have a CD player (CD).
20% of the cars have both.
CD No CD Total
AC .2 .5 .7
No AC .2 .1 .3
Total .4 .6 1.0

P(CD  AC) .2
P(CD | AC)    .2857
P(AC) .7
6
Multiplication Rule

 Multiplication rule for two events A and


B:
P(A  B)  P(A | B)P(B)

P(A  B)  P(B | A)P(A)


 also

7
Multiplication Rule Example

P(Red ∩ Ace) = P(Red| Ace)P(Ace)


 2  4  2
    
 4  52  52
number of cards that are red and ace 2
 
total number of cards 52

Color
Type Red Black Total
Ace 2 2 4
Non-Ace 24 24 48
Total 26 26 52
8
Conditional Probability
example:
 Toss a balanced die once and record
the number on the top face.
 Let E be the event that a 1 shows on the
top face.
 Let F be the event that the number on
the top face is odd.
– What is P(E)?
– What is the Probability of the event E if we are
told that the number on the top face is odd,
that is, we know that the event F has
occurred?
9
Conditional Probability

 Key idea: The original sample space no


longer applies.
 The new or reduced sample space is

S={1, 3, 5}
 Notice that the new sample space
consists only of the outcomes in F.
 P(E occurs given that F occurs) = 1/3

 Notation: P(E|F) = 1/3


10
Conditional Probability
 Def. The conditional probability of E
given F is the probability that an event,
E, will occur given that another event,
F, has occurred

P( E  F ) if P( F )  0
P( E | F ) 
P( F )

11
Conditional Probability

P( A  B)
P( A B) 
P( B)
A B

12
 If the outcomes of an experiment are
equally likely, then

number of outcomes in E  F
P( E | F ) 
number of outcomes in F

13
 Example:

Earned degrees in the United States in


recent year
B M P D Total
Female 616 194 30 16 856
Male 529 171 44 26 770
Total 1145 365 74 42 1626

529
P ( Male | B )   0.4620
1145

770
P ( Male )   0.4735
1626 14
P( E  F )
P( E | F ) 
P( F )
Conditional Probability can be rewritten as follows

P( E  F )  P( E | F ) * P( F )

15
Example:
E: dollar falls in value against the yen
F: supplier demands renegotiation of contract

P ( E )  0.40
P ( F | E )  0.8

Find P ( E  F )
P ( E  F )  0.8 * 0.4  0.32
16
Bayes’ Theorem

P(A | E i )P(E i )
P(E i | A) 
P(A)
P(A | E i )P(E i )

P(A | E 1 )P(E 1 )  P(A | E 2 )P(E 2 )    P(A | E k )P(E k )

 where:

Ei = ith event of k mutually exclusive and


collectively
exhaustive events
A = new event that might impact P(Ei)
17
Bayes Law 3

B Bc Total
A P(A and B) P(A and Bc) P(A)

Ac P(Ac and B) P(Ac and Bc) P(Ac)

Total P(B) P(Bc) 1.00

18
Example: A desk lamp produced by The Luminar Company was found
to be defective (D). There are three factories (A, B, C) where such
desk lamps are manufactured. A Quality Control Manager (QCM) is
responsible for investigating the source of found defects. The probability
of being produced in factory A is 0.35, in factory B is 0.35 , in factory in
0.30. 0.015 defective lamps produced in factory A, 0.010 defective
lamps produced in factory B and , 0.02 defective lamps produced in
factory C.

a) Find the probability that a lamp was manufactured in factory A


given that it is defective
b) Find the probability that a lamp was manufactured in factory B
given that it is defective

19
P(A) = 0.35,

P(D | A) =0.015,

P(B) =0.35,

P(D | B) =0.010,

P(C)=0.30,P(D | C) = 0.020

20

You might also like