what is the probability that is produced by the machine A? A factory producing bolts manufactured by three machines A,B,C.Out of the total output 20%, 30%,and 50% of the production was produced by A,B,C respectively. Of the total of their output 5%, 4%, 2% are defective. A bolt is drawn at random from the production and found to be defective. What is the probability that is produced by machine A?
 A: $$P\left(\text{produced by }A\mid\text{defective}\right)=\frac{P\left(\text{defective}\mid\text{produced by }A\right)P\left(\text{produced by }A\right)}{P\left(\text{defective}\right)}$$
$$P\left(\text{defective}\right)=$$$$P\left(\text{defective}\mid\text{produced by }A\right)P\left(\text{produced by }A\right)+P\left(\text{defective}\mid\text{produced by }B\right)P\left(\text{produced by }B\right)+P\left(\text{defective}\mid\text{produced by }C\right)P\left(\text{produced by }C\right)$$
A: Of all lamps produced, $20\%\cdot5\%=1\%$ are defective lamps from machine A, $30\%\cdot4\%=1.2\%$ are defective lamps from machine B and $50\%\cdot2\%=1\%$ are defective lamps from machine C. The chance of a defective lamp being produced by machine A is then simply $$\frac{1}{1+1.2+1}=\frac{1}{3.2}=\frac{5}{16}=31.25\%$$
A: The formula for conditional probability here is:
$P(A|d)=\frac{P(d|A)\cdot P(A)}{P(d)}$
$P(d|A)=0.05, P(A)=0.2$
d: Bolt is defective.A: Bolt is produced by machine A.
P(d) can be calculated by the law of total probability.
