Probability and Statistics For Engineers: (Baye's Theorem With Examples
Probability and Statistics For Engineers: (Baye's Theorem With Examples
Engineers
(Baye’s Theorem with examples
Lecture 03 and 04
Dr. Afaq Khattak
Assistant Professor, Department of Civil Engineering,
International Islamic University, Islamabad.
1
RECALL !!
Probability Revision using Bayes’
Theorem
Application of
Prior New Posterior
Bayes’
Probabilities Information Probabilities
Theorem
Application of Bayes’ Theorem
Thus:
P(A1) = .65 and P(A2) = .35
Quality levels differ between suppliers
Percentage Percentage
Good Parts Bad Parts
Supplier 1 98 2
Supplier 2 95 5
A1
B
(A1, B)
A2 G (A2, G)
B
(A2, B)
Each of the experimental outcomes is the intersection
of 2 events. For example, the probability of selecting
a part from supplier 1 that is good is given by
P( A1 , G) P( A1 G) P( A1 ) P(G | A1 )
Probability Tree for Two-Supplier Example
Step 2
Step 1 Probability of Outcome
Condition
Supplier
P(G | A1) P( A1 G) P( A1 ) P(G | A1 ) .6370
.98
P(A1)
P(B | A2)
.65 .02 P( A1 B) P( A1 ) P( B | A1 ) .0130
P(B | A2)
P(A2) P( A2 G) P( A2 ) P(G | A2 ) .3325
.95
.35
P(B | A2)
P( A1 ) P( B | A1 )
P( A1 | B)
P( A1 ) P( B | A1 ) P( A2 ) P( B | A2 )
P( A2 ) P( B | A2 )
P( A2 | B)
P( A1 ) P( B | A1 ) P( A2 ) P( B | A2 )
P( A1 ) P( B | A1 )
P( A1 | B)
P( A1 ) P( B | A1 ) P( A2 ) P( B | A2 )
(.65)(.02) .0130
.4262
(.65)(.02) (.35)(.05) .0305
P( A2 ) P( B | A2 )
P( A2 | B)
P( A1 ) P( B | A1 ) P( A2 ) P( B | A2 )
(.35)(.05) .0175
.5738
(.65)(.02) (.35)(.05) .0305
Bayes’ Theorem
General Equation for more than 2 events
P( Ai ) P( B | Ai )
P( Ai | B)
P( A1 ) P( B | A1 ) P( A2 ) P( B | A2 ) ... P( An ) P( B | An )
Tabular Approach to Bayes’ Theorem—
2-Supplier Problem
(1) (2) (3) (4) (5)
Prior Conditional Joint Posterior
Events Probabilities Probabilities Probabilities Probabilities
Ai P(Ai) P(B | A1 ) P(Ai ∩ B) P(Ai | B)
A1 .65 .02 .0130 .0130/.0305
=.4262
A2 .35 .05 .0175 .0175/.0305
=.5738
1.00 P(B)=.0305 1.0000