Sample space

advertisement
Review of Set Operation
• The mathematical basis of probability is the theory of sets.
Review of Set Operation
De Morgan’s Law
Review of Set Operation
Applying Set Theory to Probability
Sample space, Events and Probabilities:
• Outcome: an outcome of an experiment is any possible observations of that
experiment.
• Sample space: is the finest-grain, mutually exclusive, collectively exhaustive
set of all possible outcomes.
• Event: is a set of outcomes of an experiment.
• Event Space: is a collectively exhaustive, mutually exclusive set of events.
Set Algebra
Set
Universal set
Element
Probability
Event
Sample space
Outcome
Finest-grain: All possible distinguishable outcomes are identified
separately
Applying Set Theory to Probability
Example
Q: A company has a model of telephone usage. It classifies all calls as L (long),
B (brief). It also observes whether calls carry voice(V ), fax (F), or data(D).
The sample space has six outcomes
The probability can be represented in the table
Find the probability of a brief data call(0.08),
and the probability of a long call ? (0.3+0.15+0.12)
Law of Total Probability
Ex
工廠 有 4 部機 器 生 產同 一 產品 , 令其 為 機器
A1,A 2,A 3,A 4 。各機器出產產品數量各佔總產
量之比為 0.4 ,0.3 ,0.2 ,0.1。再令產品為不良品的
事件為 B。各部機器產品的不良率分別為
0.02,0.05,0.01,0.02 試問若隨機抽取一產品,其為
不良品的機率為?
ans.
所欲求之不良品的機率即為 P (B ),且依題目所示可知若隨機抽
取一產品,則 P(A1 )=0.4, P(A2 )=0.3, P(A3 )=0.2,P(A4 )=
0.1, P(B|A1 )= 0.02, P(B|A2 )= 0.05, P(B|A3 )= 0.01, P(B|A4 )
=0.02
4
P (B )=  P ( Ai ) P (B | A i )
i 1
= P(A1 )P(B|A1 ) + P(A2 )P(B|A 2 ) + P(A3 )P(B|A3 ) +
P(A4 )P(B|A4 )
=0.4  0.02+0.3  0.05+0.2  0.01+0.1  0.02
=0.027
ex
• 設某工廠甲、乙、丙3個車間生產同一種產品,產量依次占
全廠的45%,35%,20%。且各車間的次品率依次為
4%,2%,5%。現在從待出廠產品中檢查出1個次品,問該產
品是由哪個車間生產的可能性大?
Ans
• Let A denote the event
that product is defected.
• Bi denote the product is
product from I-th factory
P ( B1 )  45%,P ( B2 )  35%,P ( B3 )  20%,
P ( A | B1 )  4%,P ( A | B2 )  2%,P ( A | B3 )  5%,
P ( A)  P ( B1 ) P ( A | B1 )  P ( B2 ) P ( A | B2 )  P ( B3 ) P ( A | B3 )
P( B1 A) 0.45 0.44
P( B1 | A) 

 0.514
P( A)
0.035
Ans.
P ( B2 | A) 
P ( B2 A) 0.35  0.02

 0.200
P ( A)
0.035
P ( B3 | A) 
P ( B3 A) 0.20  0.05

 0.286
P ( A)
0.035
Bayes’ Theorem
36
Example of Bayes Theorem
• Given:
• A doctor knows that meningitis causes stiff neck 50% of the time
• Prior probability of any patient having meningitis is 1/50,000
• Prior probability of any patient having stiff neck is 1/20
• If a patient has stiff neck, what’s the probability he/she has
meningitis?
P( S | M ) P( M ) 0.5 1 / 50000
P( M | S ) 

 0.0002
P( S )
1 / 20
ex
• 假定用血清蛋白診斷肝癌,已知確實患
肝癌者被診斷為有肝癌的概率為 0.95.
確實不是患肝癌者被診斷為有肝癌的概
率為 0.1 .假設在所有人中患有肝癌的
概率為 0.0004 .現在有一個人被診斷為
患有肝癌,求此人確實為肝癌患者的概
率
ANS
• A表示診斷出被檢查者患
有肝癌的事件
• B表示被檢查者確實患有
肝癌的事件。
• P(A|B)=0.95
• P(A|BC)=0.1
P( B) P( A | B)
• P(B)=0.0004
P( B | A) 
P( B) P( A | B)  P( B) P( A | B)
• P (B|A) =

0.0004 0.95
 0.0038.
0.0004 0.95  (1  0.0004)  0.1
Ex
• Let 1-Bi, i = 1, 2, 3, denote the probability that plane will
be found upon a search of the i-th region when the plane
is in that region.
• What is the conditional probability that the plane is in the
i-th region given that a search of region 1 is unsuccessful?
Ans.
• Let Ai be the event that the plane is in region i.
• Let B be the event that a search of region 1 is
unsucessful
P( B | Ai ) P( Ai )
P( B | Ai ) P( Ai )
P( Ai | B) 
 n
,
P( B)
 P( B | Ai ) P( Ai )
i 1
P(A1|B ) =(B1 * 1/3 ) /( B1 * 1/3 + 1*1/3 + 1*1/3)
= B1 / (B1 + 2)
J = 2, 3
P(Aj |B ) =(1 * 1/3 ) /( B1 * 1/3 + 1*1/3 + 1*1/3)
= 1 / (B1 + 2)
Independence
Sequential Experiments and Tree Diagrams
Download