# Manufacturing problem-- bayesian probability

#### DDM

##### New member

Plant A produces 40% of the company's pin volume and 67% of the company's defective pins
Plant B produces 60% of the company's total volume and 33% of the total defective pins
What is the probability a defective pin comes from plant A? and probability it comes from plant B?

Thanks very much

#### Dr.Peterson

##### Elite Member
Plant A produces 40% of the company's pin volume and 67% of the company's defective pins
Plant B produces 60% of the company's total volume and 33% of the total defective pins
What is the probability a defective pin comes from plant A? and probability it comes from plant B?
Please check that you copied this correctly. Or might it be meant as a trick question?

As written, it seems to answer itself: if 67% of the defective pins are from plant A, then that is the probability that a pin comes from plant A, given that it is defective. You don't need the rest of the information.

#### DDM

##### New member
Please check that you copied this correctly. Or might it be meant as a trick question?

As written, it seems to answer itself: if 67% of the defective pins are from plant A, then that is the probability that a pin comes from plant A, given that it is defective. You don't need the rest of the information.

Thank you for the quick reply. I have the answer to the problem but I don't know how it is calculated: The probability that Plant A produced the defective pin is 57.2% and Plant B 42.8%. It's a conditional probability playing off of the two pieces of information--contribution to total volume and total defects. Hopefully this helps you to help me. Thanks

#### Dr.Peterson

##### Elite Member
Thank you for the quick reply. I have the answer to the problem but I don't know how it is calculated: The probability that Plant A produced the defective pin is 57.2% and Plant B 42.8%. It's a conditional probability playing off of the two pieces of information--contribution to total volume and total defects. Hopefully this helps you to help me. Thanks
Did you copy the exact wording of the problem? Please check, and do so if you didn't. The wording of probability questions is highly sensitive.

I can get numbers close to the supposed answers if I change the problem to something that would have to be worded differently.

Do you understand what I said last time about why the problem doesn't make sense?

#### DDM

##### New member
Did you copy the exact wording of the problem? Please check, and do so if you didn't. The wording of probability questions is highly sensitive.

I can get numbers close to the supposed answers if I change the problem to something that would have to be worded differently.

Do you understand what I said last time about why the problem doesn't make sense?
Here is the exact language. Thanks again

The company has two factories, the older of which produces 40% of the total output. This means that a pin picked up at random has a 40% probability of coming from the old factory, whether it is defective or perfect; this is the prior probability. We find that the older factory's defective rate is twice that found in the newer factory. If a customer calls and complains about finding a defective pin, which of the two factories should the manager call?

The prior probability would suggest that the defective pin was most likely to have come from the new plant, which produces 60% of the total. On the other hand, that plant produces only one-third of the company's total of defective pins. When we revise the priors to reflect this additional information, the probability that the new plant made the defective pin turns out to be only 42.8%; there is a 57 .2% probability that the older plant is the culprit. This new estimate becomes the posterior probability.

#### pka

##### Elite Member
Plant A produces 40% of the company's pin volume and 67% of the company's defective pins
Plant B produces 60% of the company's total volume and 33% of the total defective pins
What is the probability a defective pin comes from plant A? and probability it comes from plant B?
Well it appears that you are not answering Prof. Peterson's questions. Like him I think the question is poorly put.
Also like Peterson I get slightly different anawers: $$\displaystyle \mathcal{P}(A|D)=0.5751~\&~\mathcal{P}(B|D)=0.4249$$
\displaystyle \begin{align*}\mathcal{P}(A|D)&=\dfrac{\mathcal{P}(A\cap D)}{\mathcal{P}(D)}\\&=\dfrac{\mathcal{P}(A\cap D)}{\mathcal{P}(D\cap A)+\mathcal{P}(D\cap B)}\\&=\dfrac{ \mathcal{P}(D|A) \mathcal{P}(A)}{ \mathcal{P}(D|A) \mathcal{P}(A)+\mathcal{P}(D|B) \mathcal{P}(B)} \end{align*}

We will ask you to complete the work and post any questions.

Last edited:

#### Dr.Peterson

##### Elite Member
Plant A produces 40% of the company's pin volume and 67% of the company's defective pins
Plant B produces 60% of the company's total volume and 33% of the total defective pins
What is the probability a defective pin comes from plant A? and probability it comes from plant B?
Here is the exact language. Thanks again

The company has two factories, the older of which produces 40% of the total output. This means that a pin picked up at random has a 40% probability of coming from the old factory, whether it is defective or perfect; this is the prior probability. We find that the older factory's defective rate is twice that found in the newer factory. If a customer calls and complains about finding a defective pin, which of the two factories should the manager call?

The prior probability would suggest that the defective pin was most likely to have come from the new plant, which produces 60% of the total. On the other hand, that plant produces only one-third of the company's total of defective pins. When we revise the priors to reflect this additional information, the probability that the new plant made the defective pin turns out to be only 42.8%; there is a 57 .2% probability that the older plant is the culprit. This new estimate becomes the posterior probability.
Do you see that your paraphrase means something entirely different from the original?

You were right that plant A produces 40% of the pins and plant B produces 60%; but the first paragraph does not say that plant A produces 67% of the total number of defective pins. It says that the rate of defective pins from each factory are in the ratio 2:1, but that does not make them 2/3 and 1/3 (much less the rounded values 0.67 and 0.33!), because they are not complements.

If the second paragraph here is from the book, then the book is wrong. Plant B does not produce 1/3 of the company's defective pins! (In fact, their conclusion means that 42.8% of the defective pins come from plant B, as I pointed out initially.) Who wrote this?

Rather, suppose that the defective rate for plant B is r, and for plant A is 2r. That is, P(defective | B) = r, and P(defective | A) = 2r.

Put that in the Bayes formula as given to you by pka, and see what you get. (The variable r will drop out.)

#### pka

##### Elite Member
Plant A produces 40% of the company's pin volume and 67% of the company's defective pins
Plant B produces 60% of the company's total volume and 33% of the total defective pins
What is the probability a defective pin comes from plant A? and probability it comes from plant B?
Here is the exact language.
The company has two factories, the older of which produces 40% of the total output. This means that a pin picked up at random has a 40% probability of coming from the old factory, whether it is defective or perfect; this is the prior probability. We find that the older factory's defective rate is twice that found in the newer factory. If a customer calls and complains about finding a defective pin, which of the two factories should the manager call?
For the good of the order, please please take note that had you posted the exact wording of the question to begin with, a lot of confusion could have been avoided. After first posting the exact wording, you can then post your reading of the question. At that point we can give help on the salient points.

#### DDM

##### New member
For the good of the order, please please take note that had you posted the exact wording of the question to begin with, a lot of confusion could have been avoided. After first posting the exact wording, you can then post your reading of the question. At that point we can give help on the salient points.
Yes, will do. Appreciate the admonishment-- being my first post is my only excuse. It is also unfortunate that as Dr. Peterson pointed, the book was wrong! Thanks again

#### DDM

##### New member
Do you see that your paraphrase means something entirely different from the original?

You were right that plant A produces 40% of the pins and plant B produces 60%; but the first paragraph does not say that plant A produces 67% of the total number of defective pins. It says that the rate of defective pins from each factory are in the ratio 2:1, but that does not make them 2/3 and 1/3 (much less the rounded values 0.67 and 0.33!), because they are not complements.

If the second paragraph here is from the book, then the book is wrong. Plant B does not produce 1/3 of the company's defective pins! (In fact, their conclusion means that 42.8% of the defective pins come from plant B, as I pointed out initially.) Who wrote this?

Rather, suppose that the defective rate for plant B is r, and for plant A is 2r. That is, P(defective | B) = r, and P(defective | A) = 2r.

Put that in the Bayes formula as given to you by pka, and see what you get. (The variable r will drop out.)

Dr. Peterson, your clever suggestion worked--thank you. Paragraph 2 is directly from the book and as you point out and I now see: it is wrong! "Against the Gods--The Remarkable Story of Risk" by Peter Bernstein, 1996

#### Dr.Peterson

##### Elite Member
Dr. Peterson, your clever suggestion worked--thank you. Paragraph 2 is directly from the book and as you point out and I now see: it is wrong! "Against the Gods--The Remarkable Story of Risk" by Peter Bernstein, 1996
Clearly he isn't a mathematician; he got the answer more or less right, but he misstated the explanation.

At least it provided a good lesson for those who are reading along here: there's a reason for the request in our submission guidelines, to "Post the exercise or your question completely and accurately". Whether the error is in your thinking, or in the original source, we can more easily see what is going on when we see everything.