Let event A consist in the fact that a randomly selected pipe is defective.
Let event Bi,i=1,2,3 be that the pipe was produced at the i-th plant. Then
p(B1)=500+1000+2000500=71,p(B2)=500+1000+20001000=72,p(B1)=500+1000+20002000=74;
p(A∣B1)=0.005,p(A∣B2)=0.008,p(A∣B3)=0.01
Then by the formula of total probability
p(A)=∑p(Bi)p(A∣Bi)=71⋅0.005+2⋅0.008+4⋅0.01=70.061=700061
Using the Bayes formula, we find the probabilities that the pipe came from the first, second and third plants, respectively:
p(B1∣A)=p(A)p(B1)p(A∣B1)=70006171⋅0.005=615
p(B2∣A)=p(A)p(B2)p(A∣B2)=70006172⋅0.008=6116
p(B3∣A)=p(A)p(B3)p(A∣B3)=70006174⋅0.01=6140
So, it is most likely that the pipe came from the third plant.
Answer: Third plant
Comments