# Probability on Defective Parts

#### rahulranjan86

##### New member
Two shipments of machine parts are recieved. The first shipment contains 1000 parts with 10% defects and the second shipment contains 2000 parts with 5% defects. One shipment is selected at random. Two machine parts and tested and found good. Find the probability that the tested parts were selected from first shipment.

My Attempt:

Probability of selecting a shipment.
P(S) = 0.5

Probability of a part being defective when from shipment 1
P(D|1) = 0.1

Probability of a part being defective when from shipment 2
P(D|2) = 0.05

P(D) = P(D|1).P(1) + P(D|2).P(2)
P(D) = 0.075

then probability of part not being defective.
P(D') = 1 - 0.075 = 0.925

P(1|D') = P(1 and D') / P(D')
= 0.5*0.925 / 0.925
= 0.5

I have tried the above solution to the problem. I am not sure if this is correct. Please let me know if I am going wrong and how do I approach for a correct answer.

#### tkhunny

##### Moderator
Staff member
For starters, your "D" is only one tested part. You tested two!

#### soroban

##### Elite Member
Hello, rahulranjan86!

Two shipments of machine parts are recieved.
Shipment A contains 1000 parts with 10% defects
and the shipment B contains 2000 parts with 5% defects.
One shipment is selected at random.
Two machine parts and tested and found to be good.
Find the probability that the tested parts were selected from shipment A.

Bayes' Theorem:
. . $$\displaystyle P(A\,|\,\text{2 good}) \;=\;\dfrac{P(A\,\wedge\,\text{2 good})}{P(\text{2 good})}\;\;[1]$$

$$\displaystyle P(A\,\wedge\,\text{2 good}) \:=\:\frac{1}{2}(0.90)^2 \:=\:0.405\;\;[2]$$

$$\displaystyle P(B\,\wedge\,\text{2 good}) \:=\:\frac{1}{2}(0.95)^2 \:=\:0.45125\;\;[3]$$

Hence: .$$\displaystyle P(\text{2 good}) \:=\:0.405 + 0.45125 \:=\:0.85625\;\;[4]$$

Substitute [2] and [4] into [1]:

. . $$\displaystyle P(A\,|\,\text{2 good}) \:=\:\dfrac{0.405}{0.85625} \:=\:0.472992701 \;\approx\;47.3\%$$