Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

4th Material Subject: Conditional Probability &

Bayes Theorem
Undergraduate of Telecommunication Engineering
MUH1F3 - PROBABILITY AND STATISTICS

Telkom University
Center of eLearning & Open Education Telkom University
Jl. Telekomunikasi No.1, Bandung - Indonesia
http://www.telkomuniversity.ac.id

Lecturer: Nor Kumalasari Caecar Pratiwi, S.T., M.T. (caecarnkcp@telkomuniversity.ac.id)


TABLE OF CONTENTS:

1. Conditional Probability
2. Multiplication and Total Probability Rules
3. Bayes Theorem

LEARNING OBJECTIVES:

After careful study of this chapter, student should be able to do the following:
1. Use Bayes theorem to calculate conditional probabilities
2. Interpret and calculate conditional probabilities of events
2/14 May 10, 2020 LECTURER CODE: NKC/
CONDITIONAL PROBABILITY

If event A and B are Dependent, the probability of an event B under the knowledge that the outcome will be in
event A is denoted as:
P(A ∩ B)
P(B|A) = , with P(A) >0 (1)
P(A)
and this is called the Conditional Probability of B given A. Otherwise, the probability of an event A under the
knowledge that the outcome will be in event B is denoted as:

P(A ∩ B)
P(A|B) = , with P(B) >0 (2)
P(B)

and this is called the Conditional Probability of A given B.


1
Example: A digital communication channel has an error rate of 1 bit per every 1000 transmitted (BER = 1000
).
Errors are rare, but when they occur, they tend to occur in bursts that affect many consecutive bits. If a single
bit is transmitted. However, if the previous bit was in error because of the bursts, we might believe that the
probability that the next bit will be in error is greater than is transmitted.
3/14 May 10, 2020 LECTURER CODE: NKC/
MULTIPLICATION AND TOTAL PROBABILITY
RULES
The conditional probability definition in equation (1) and (2) can be rewritten to provide a formula known as
the Multiplication Rule for probabilities.

P(A ∩ B) = P(B|A) · P(A) = P(A|B) · P(B) (3)

Figure 1: Partitioning an event into two mutually exclusive Figure 2: Partitioning an event into several mutually
0
subsets, where A and A are partition of U exclusive subsets, where E1 ,E2 , · · · Ek are partition of U
4/14 May 10, 2020 LECTURER CODE: NKC/
MULTIPLICATION AND TOTAL PROBABILITY
RULES
0
From Figure 1, shown A and A are partition of U and both are mutually exclusive events:

0 0
P(A ∪ A ) = P(A) + P(A ) (4)

The following Total Probability Rule for event B is obtained:

0 0
B = B ∩ U = B ∩ (A ∪ A ) = (B ∩ A) ∪ (B ∩ A )

Therefor:
0 0 0
P(B) = P(B ∩ A) + P(B ∩ A ) = P(B|A) · P(A) + P(B|A ) · P(A ) (5)

5/14 May 10, 2020 LECTURER CODE: NKC/


MULTIPLICATION AND TOTAL PROBABILITY
RULES
In general, see Figure 2, shown E1 ,E2 , · · · Ek are partition of U and they are mutually exclusive events:

P(E1 ∪ E2 ∪ · · · ∪ Ek ) = P(E1 ) + P(E2 ) + · · · + P(Ek ) (6)

The following Total Probability Rule for event B is obtained:

B = B ∩ U = B ∩ (E1 ∪ E2 ∪ · · · ∪ Ek ) = (B ∩ E1 ) ∪ (B ∩ E2 ) ∪ · · · ∪ (B ∩ Ek )

Therefor:
P(B) = P(B ∩ E1 ) + P(B ∩ E2 ) + · · · + P(B ∩ Ek )
P(B) = P(B|E1 ) · P(E1 ) + P(B|E2 ) · P(E2 ) + · · · + P(B|Ek ) · P(Ek ) (7)

6/14 May 10, 2020 LECTURER CODE: NKC/


MULTIPLICATION AND TOTAL PROBABILITY
RULES

In general, a collection of event E1 , E2 , · · · Ek such that E1 ∪ E2 ∪ · ∪ Ek = U said to be exhaustive.

P(B) = P(B ∩ E1 ) + P(B ∩ E2 ) + · · · + P(B ∩ Ek )

P(B) = P(B|E1 ) · P(E1 ) + P(B|E2 ) · P(E2 ) + · · · + P(P|Ek ) · P(Ek ) (8)

The Equation (5) and (8) called the Total Probability Rule

7/14 May 10, 2020 LECTURER CODE: NKC/


EXAMPLE

A photocopying company using 3 machines with a percentage of each use 55 %, 30 % and 15 %. Each machine
produces its own defects 8 %, 5 %, and 4 %. From the overall results of photocopying from all machines, one
sheet is chosen randomly.

a. Draw a tree diagram for the above situation!

b. Calculate the probability selected result is good!

c. Calculate the probability selected result is defect!

d. If the selected result is defect, calculate the probability of those results coming from the second machine!

e. If the selected result is good,calculate the probability that the result will come from the first machine!

8/14 May 10, 2020 LECTURER CODE: NKC/


EXAMPLE

ANSWER: We first determine the possibility of any event will happen:


• A is event that states the selected paper from first machine
• B is event that states the selected paper from second machine
• C is event that states the selected paper from third machine
• G is event that states the selected paper in good condition
• G is event that states the selected paper in defect condition

9/14 May 10, 2020 LECTURER CODE: NKC/


EXAMPLE
a. The tree diagram for the above situation

10/14 May 10, 2020 LECTURER CODE: NKC/


EXAMPLE

b. The probability selected result is good → Total Probability Rules

P(G) = P(G ∩ A) + P(G ∩ B) + P(G ∩ C)


P(G) = P(G|A) · P(A) + P(G|B) · P(B) + P(G|C) · P(C)
187
P(G) = 0.92 · 0.55 + 0.95 · 0.3 + 0.96 · 0.15 = = 0.935
200

11/14 May 10, 2020 LECTURER CODE: NKC/


EXAMPLE
c. The probability selected result is defect → Total Probability Rules

P(G) = P(G ∩ A) + P(G ∩ B) + P(G ∩ C)


P(G) = P(G|A) · P(A) + P(G|B) · P(B) + P(G|C) · P(C)
13
P(G) = 0.08 · 0.55 + 0.05 · 0.3 + 0.05 · 0.15 = = 0.065
200
Or, simply we can calculate:
187 13
P(G) = 1 − P(G) = 1 − = = 0.065
200 200
12/14 May 10, 2020 LECTURER CODE: NKC/
EXAMPLE

d. If the selected results are defect, the probability of those results coming from the second machine is →
Conditional Probability

P(C ∩ G) P(B) · P(G|B) 0.3 · 0.05 3


P(B|G) = = = = = 0.23
P(G) P(G) 0.065 13

e. If the selected result is good, the probability that the result will come from the first machine is

P(A ∩ G) P(A) · P(G|A) 0.55 · 0.92 46


P(A|G) = = = = = 0.54
P(G) P(G) 0.935 85

13/14 May 10, 2020 LECTURER CODE: NKC/


Thank You

14/14 May 10, 2020 LECTURER CODE: NKC/

You might also like