Welcome to our community

Be a part of something great, join today!

Two screws are inspected and the first is found to be good. What is the probability that the second is also good

Ram123

New member
Mar 6, 2019
2
Question: All the screws in a machine come from the same factory but it is as likely to be from A as from factory B. The percentage of defective screws is 5% from A and 1% from B. Two screws are inspected and the first is found to be good. What is the probability that the second is also good?
----------------------------------------------------------------------------------------------------

My attempt:

G1: First screw is good. G2: Second screw is good
G1A: First screw comes from A. G1B: First screw comes from B
G2A: Second screw comes from A. G2B: Second screw comes from B

P(G1A)=1/2, P(G2A)=1/2, P(G1B)=1/2, P(G2B)=1/2
P(G1A $\cap$ G2A)=P(G1B $\cap$ G2B)=P(G1A $\cap$ G2B)=P(G1B $\cap$ G2A)=1/2*1/2=1/4

Now,

P(G1)=P(G1|G1A)P(G1A)+P(G1|G1B)P(G1B)

P(G1 $\cap$ G2)=P(G1 $\cap$ G2|G1A $\cap$ G2A)P(G1A $\cap$ G2A)+P(G1 $\cap$ G2|G1B $\cap$ G2B)P(G1B $\cap$ G2B)+P(G1 $\cap$ G2|G1A $\cap$ G2B)P(G1A $\cap$ G2B)+P(G1 $\cap$ G2|G1B $\cap$ G2A)P(G1B $\cap$ G2A)

P(G2|G1)=P(G1 $\cap$ G2)/P(G1).
----------------------------------------------------------------------------------
Our teacher's answer:

G1: First screw is good. G2: Second screw is good
A: Screw is from factory A B: Screw is from factory B

P(A)=1/2, P(B)=1/2

P(G1)=P(G1|A)P(A)+P(G1|B)P(B)
P(G1 $\cap$ G2)=P(G1 $\cap$ G2|A)P(A)+P(G1 $\cap$ G2|B)P(B)

Now P(G2|G1)=P(G1 $\cap$ G2)/P(G1).

Which answer is correct?
 

Country Boy

Well-known member
MHB Math Helper
Jan 30, 2018
368
Your explanation of the situation is a bit ambiguous. You say "2 screws are defective". Are they from the same lot, both from A or both from B, or not? If not, the fact that the first screw was defective is irrelevant! if 5% of the screws from A and 1% of the screws from B were defective and a screw is as likely to be from A as from B, then the probability a screw chosen from the whole lot is defective is (0.05+ 0.01)/2= 0.03, regardless of whether the previous screw was defective or not. (Unless there is a given small number of screws in A and B but you didn't say how many screws were in each lot.)

If, instead, both screws are from group A or both from group B, then the point of saying that the first screw was defective would be to give a probability that the second screw was from group A or B. Imagine 2000 screws, 1000 from A, 1000 from B. Of the 1000 screws from A, 5%, 50, are defective. Of the 1000 screws from B, 1%o, 10, are defective. That is a total of 60 defective screws 50 from A and 10 from B. Given that a screw is defective, the probability it is from A is 50/60= 5/6 and the probability it is from B is 10/60= 1/6. Given that the first screw was defective, the probability it was from A is 5/6 and in that case, the probability the second screw was defective is .05. The probability the first screw is from B is 1/6 and, in that case, the probability the second screw is defective is 0.01. In this scenario, given that the first screw is defective, the probability the second screw is as also defective is (5/6)(0.05)+ (1/6)(0.01)= 25/600+ 1/600= 26/600= 13/300 which is approximately 0.043.
 

Ram123

New member
Mar 6, 2019
2
Thanks for correcting my mistake. I assumed that one of the screws can come from A and another can come from B. My teacher assumed that both screws are either from A or from B.

I found out the following:

P(G1 ∩ G2)=P(G1 ∩ G2|G1A ∩ G2A)P(G1A ∩ G2A)+P(G1 ∩ G2|G1B ∩ G2B)P(G1B ∩ G2B)+P(G1 ∩ G2|G1A ∩ G2B)P(G1A ∩ G2B)+P(G1 ∩ G2|G1B ∩ G2A)P(G1B ∩ G2A)

=$1/4*(P(G1A)+P(G1B))^2$

P(G1)=1/2*(P(G1A)+P(G1B))=1/2*(P(G2A)+P(G2B))

P(G2|G1)=1/2*(P(G1A)+P(G1B))

Therefore P(G2|G1)=P(G1)=P(G2), as you pointed out.