n********w 发帖数: 285 | 1 Box A contains 50 resistors of which 5 are defective;
Box B contains 100 resistors of which 10 are defective;
Three resistors are taken from one of these Boxes, selected at random.
Find P(A/B) probability that they came from Box A, given all three were
defective. |
o****l 发帖数: 33 | 2 let x=probability that they came from Box A
let p(A)= prob. that A is selected
obviously p(A)=50%.
given p(A),the probability of 3 resistors defective p(def3/A)=5/50*4/49*3/48
so p(def3/A)*p(A)=p(A/def3)*p(def3)
now p(def3) is unknown;
But x=p(A/def3)=5*4*3/(50*49*48) *0.5/ p(def3)
similarly 1-x=p(B/def3)=10*9*8/(100*99*98) *0.5/ p(def3)
so that we have x/(1-x)=5*4*3*(100*99*98)/(10*9*8*50*49*48)=0.6875
x=0.6875/1.6875=40.74%
【在 n********w 的大作中提到】 : Box A contains 50 resistors of which 5 are defective; : Box B contains 100 resistors of which 10 are defective; : Three resistors are taken from one of these Boxes, selected at random. : Find P(A/B) probability that they came from Box A, given all three were : defective.
|
o****l 发帖数: 33 | 3 题目好像有点歧义
1.每取一个resistor 都可以randomly 从A或B 中取
2.先随机选定一个box, 再在这个box里随机取3个。
【在 n********w 的大作中提到】 : Box A contains 50 resistors of which 5 are defective; : Box B contains 100 resistors of which 10 are defective; : Three resistors are taken from one of these Boxes, selected at random. : Find P(A/B) probability that they came from Box A, given all three were : defective.
|
o****l 发帖数: 33 | 4 厚着脸皮,如果大家觉得我做得对,不妨support一下,版主/楼主能否给点奖励意思意
思一下?
不然以后求bless 都拿不出东西
48
【在 o****l 的大作中提到】 : let x=probability that they came from Box A : let p(A)= prob. that A is selected : obviously p(A)=50%. : given p(A),the probability of 3 resistors defective p(def3/A)=5/50*4/49*3/48 : so p(def3/A)*p(A)=p(A/def3)*p(def3) : now p(def3) is unknown; : But x=p(A/def3)=5*4*3/(50*49*48) *0.5/ p(def3) : similarly 1-x=p(B/def3)=10*9*8/(100*99*98) *0.5/ p(def3) : so that we have x/(1-x)=5*4*3*(100*99*98)/(10*9*8*50*49*48)=0.6875 : x=0.6875/1.6875=40.74%
|
l****c 发帖数: 782 | 5 很明显,你第一步就错了,P(A)怎么能得50%? by random啊 50/150.
题没有歧义的,被考过的题。
直接P(A/B).p(B) = P(B/A).P(A)做。
大家一起来练习讨论,你觉得是谁给谁包子好一点呢:)
48
【在 o****l 的大作中提到】 : let x=probability that they came from Box A : let p(A)= prob. that A is selected : obviously p(A)=50%. : given p(A),the probability of 3 resistors defective p(def3/A)=5/50*4/49*3/48 : so p(def3/A)*p(A)=p(A/def3)*p(def3) : now p(def3) is unknown; : But x=p(A/def3)=5*4*3/(50*49*48) *0.5/ p(def3) : similarly 1-x=p(B/def3)=10*9*8/(100*99*98) *0.5/ p(def3) : so that we have x/(1-x)=5*4*3*(100*99*98)/(10*9*8*50*49*48)=0.6875 : x=0.6875/1.6875=40.74%
|
o****l 发帖数: 33 | 6 Three resistors are taken from one of these Boxes, selected at random.
我的理解就是先随机选定一个Box, 再random 挑3个。
不同人对原题的理解确实不一样,要是我面试时肯定要向interviewer clarify的
另外:考没考过跟歧义与否没有关系, 在没clarify之前,我想请教一下我的理解有什
么问题?
我倒是看不懂 50/150 跟p(A)有什么关系,又不是从150里随机挑50个放进A里。
你不妨展开说说?
【在 l****c 的大作中提到】 : 很明显,你第一步就错了,P(A)怎么能得50%? by random啊 50/150. : 题没有歧义的,被考过的题。 : 直接P(A/B).p(B) = P(B/A).P(A)做。 : 大家一起来练习讨论,你觉得是谁给谁包子好一点呢:) : : 48
|
n********w 发帖数: 285 | 7 selected at random, 每个resistor被选中的概率相等,这样A中resistor被选中的概
率是50/150,第二个是49/149, 第三个是48/148 |
o****o 发帖数: 1398 | 8 结果和我算的一样,不过你的描述我有点confusing,利用公式:
P(A|def3)*P(def3) = P(def3|A)*P(A)
问题应该是求P(A|def3),即3个都是defect的结果下,拿到的是box A的概率
公式中其他3项可以计算出来:
P(A)=1/2 即两个盒子中拿到A盒子的概率
P(def3|A)= (5/50)*(4/49)*(3/48) 即已知是A盒子的前提下,拿出3个defect的概率
P(def3)=? 这个要复杂一些,即无论拿到哪个盒子,拿出3个都是defect的概率(叫作
全概率),两种情况分别计算:1. 拿到A(1/2的概率): P(def3|A)=(5/50)*(4/49)*(
3/48);拿到B(也是1/2概率): P(def3|B)=(10/100)*(9/99)*(8/98),所以
P(def3)=P(def3|A)*P(A)+P(def3|B)*P(B)=(1/2)(5/50)*(4/49)*(3/48)+(1/2)*(10/
100)*(9/99)*(8/98)
现在就可以用上面公式求出P(A|def3)=11/27=0.4047
48
【在 o****l 的大作中提到】 : let x=probability that they came from Box A : let p(A)= prob. that A is selected : obviously p(A)=50%. : given p(A),the probability of 3 resistors defective p(def3/A)=5/50*4/49*3/48 : so p(def3/A)*p(A)=p(A/def3)*p(def3) : now p(def3) is unknown; : But x=p(A/def3)=5*4*3/(50*49*48) *0.5/ p(def3) : similarly 1-x=p(B/def3)=10*9*8/(100*99*98) *0.5/ p(def3) : so that we have x/(1-x)=5*4*3*(100*99*98)/(10*9*8*50*49*48)=0.6875 : x=0.6875/1.6875=40.74%
|
s********k 发帖数: 401 | 9 Bayes's rule. Event A: all 3 from A; Event B: all 3 defective.
P(B|A)=(5*4*3)/(50*49*48),
P(A)=(50*49*48)/(150*149*148),
P(B)=(15*14*13)/(150*149*148),
so,
P(A|B)=P(B|A)*P(A)/P(B)=0.022. |
l*****a 发帖数: 559 | |
p****3 发帖数: 448 | 11 Let
A be "box A was chosen"
B be "box B was chosen"
D be "all 3 resistors were defective"
Using baye's rule:
P( D | A) P(A)
P(A | D) = --------------------------------------------
P(D | A) P(A) + P(D | B) P(B)
Where P(A) = P(B) = 0.5
And we get result 0.407407407... |
l*****a 发帖数: 559 | 12 The only difference is whether the assumption that P(A)=P(B)=50% is valid or
not.
Can anyone tell 'Three resistors are taken from one of these Boxes, selected
at random.', means 'resistors selected at random', or 'boxes selected at
random'? |
m***w 发帖数: 404 | 13 我的结果和你的一样。我也认为应该是box的选择是random的,故1/2。
这题其实挺简单的说
48
【在 o****l 的大作中提到】 : let x=probability that they came from Box A : let p(A)= prob. that A is selected : obviously p(A)=50%. : given p(A),the probability of 3 resistors defective p(def3/A)=5/50*4/49*3/48 : so p(def3/A)*p(A)=p(A/def3)*p(def3) : now p(def3) is unknown; : But x=p(A/def3)=5*4*3/(50*49*48) *0.5/ p(def3) : similarly 1-x=p(B/def3)=10*9*8/(100*99*98) *0.5/ p(def3) : so that we have x/(1-x)=5*4*3*(100*99*98)/(10*9*8*50*49*48)=0.6875 : x=0.6875/1.6875=40.74%
|