Download 2. Define B1, B2, B3 to be the events Box 1, 2 or 3, is selected

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

History of statistics wikipedia , lookup

Inductive probability wikipedia , lookup

Ars Conjectandi wikipedia , lookup

Probability interpretations wikipedia , lookup

Probability wikipedia , lookup

Transcript
Total Probability Law
Experiment:
• Box 1 has two gold coins
• Box 2 has one gold coin and one silver.
• Box 3 has two silver coins.
• Suppose that you select one of the boxes randomly and then select one of the coins from this box.
Question: What is the probability that the coin you select a gold coin?
Solution:
1. Let’s event A is “Gold coin”; We have to calculate probability of A (P(A)=?)
2. Define B1, B2, B3 to be the events Box 1, 2 or 3, is selected randomly;
Choosing one box (at random) means, that all boxes are equally likely to be chosen:
P(Bi) = 1/3 for i = 1, 2, 3.
3. Let’s Define new events E1 and E2 and E3:
E1 = choose Box 1 and pick a golden coin E1=(B1A)
E2 = choose Box 2 and pick a golden coin E2=(B2A)
E3 = choose Box 3 and pick a golden coin E2=(B3A)
We use the definition of conditional probability to get P(E1) and P(E2):
P(E1) = P(B1A)=P(B1) P(A|B1), where P(A|B1)= P(Select a gold coin from Box1) = 1
P(E2) = P(B2A)=P(B2) P(A|B2), where P(A|B2)= P(Select a gold coin from Box2) = 0.5.
P(E3) = P(B3A)=P(B3) P(A|B3), where P(A|B3)= P(Select a gold coin from Box3) = 0.
Thus E1 and E2 and E3 are mutually exclusive (disjoint). The probability to choose a golden coin is
the sum of P(E1), P(E2) and P(E2): P(A)= P(E1)+P(E2)+P(E2)
Thus we have: P(A)= P(B1) P(A|B1)+P(B2) P(A|B2)+P(B3) P(A|B3)
P(A)= 1/31+1/30.5+1/30 = 0.5
n
We just used the Law of Total Probability P(A)   P(Bi )P(A | Bi ) , the events Bi are disjoint, the
i1
union of the events Bi is 

Bayes' Theorem
Bayes' theorem enables to find the probability that the outcome occurred as a result of a particular
previous event. A simplified version of Bayes' theorem is given next.
EXAMPLE: Two video products distributors supply videotape boxes to a video production company.
Company B1 sold 100 boxes of which 5 were defective. Company B2 sold 300 boxes of which 21
were defective. If a box was defective (event A), find the probability that it came from Company B1.
SOLUTION: Let P(Bi) is probability that a box selected at random is from company Bi. Then,
100
300
P(B1) 
 0.25 , P(B2) 
 0.75
400
400
Since there are 5 defective boxes from Company B1, P(A|B1) = 0.05 and there are 21 defective boxes
from Company В2, so P(A|B2) = 21/300= 0.07. The probability P(B1|A) is

P(B1 | A) 
| B1 )
P(B1 ) P(A
0.25 0.05

 0.192
P(B1 ) P(A | B1 )  P(B2 ) P(A | B2 ) 0.25 0.05  0.75 0.07
We just used the Bayes' theorem P(Bi | A) 

P(Bi)P(A | Bi)
P(Bi)P(A | Bi)
 n
,
P(A)
 P(Bi )P(A | Bi )
the events Bi are disjoint, the union of the events Bi is 

i1
PRACTICE
1. Box I contains 6 green marbles and 4 yellow marbles. Box II contains 5 yellow marbles and 5
green marbles. A box is selected at random and a marble is selected from the box. If the marble
is green, find the probability it came from Box I.
2. An auto parts store purchases rebuilt alternators from two suppliers. From Supplier A, 150
alternators are purchased and 2% are defective. From Supplier B, 250 alternators are purchased
and 3% are defective. Given that an alternator is defective, find the probability that it came
from Supplier B.
3. Two manufacturers supply paper cups to a catering service. Manufacturer A supplied 100
packages and 5 were damaged. Manufacturer В supplied 50 packages and 3 were damaged. If a
package is damaged, find the probability that it came from Manufacturer A.