0% found this document useful (0 votes)
51 views

Probability and Statistics For Engineers: (Baye's Theorem With Examples

The document discusses applying Bayes' theorem to calculate conditional probabilities in a two-supplier example, where parts come from two suppliers with different quality levels. It shows how to set up the probability tree and calculate the prior, conditional, and posterior probabilities using Bayes' theorem. Specifically, it calculates the probability that a part that broke came from supplier 1 given that it was bad.

Uploaded by

jhon wick
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views

Probability and Statistics For Engineers: (Baye's Theorem With Examples

The document discusses applying Bayes' theorem to calculate conditional probabilities in a two-supplier example, where parts come from two suppliers with different quality levels. It shows how to set up the probability tree and calculate the prior, conditional, and posterior probabilities using Bayes' theorem. Specifically, it calculates the probability that a part that broke came from supplier 1 given that it was bad.

Uploaded by

jhon wick
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Probability and Statistics for

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

•Consider a manufacturing firm that receives


shipment of parts from two suppliers.
•Let A1 denote the event that a part is received
from supplier 1; A2 is the event the part is
received from supplier 2
We get 65 percent of our parts
from supplier 1 and 35
percent from supplier 2.

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

Let G denote that a part is good and B denote


the event that a part is bad. Thus we have the
following conditional probabilities:
P(G | A1 ) = .98 and P(B | A2 ) = .02

P(G | A2 ) = .95 and P(B | A2 ) = .05


Tree Diagram for Two-Supplier Example
Step 2 Experimental
Step 1
Condition Outcome
Supplier
(A1, G)
G

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)

.05 P( A2  B)  P( A2 ) P(G | A2 )  .0175


A bad part broke one
of our machines—so
we’re through for the
day. What is the
probability part came
from suppler 1 and that
is bad?

We obtain Bayes’ theorem for the 2 event case:

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

You might also like