# Another Bayes Problem

#### WillNjmu

##### New Member
Hello, thanks for taking the time to look at my question. I'm a first year student at a university in VA and I'm taking an entry level statistics course. I'm having a problem grasping the Bayes Theorem. It's very frustrating because I've done well in other maths like Calculus but statistics and probablity I can't get a handle on. My main problem seems just setting up the values. Here's the question.

A soft drink bottling company maintains records concerning the number of unacceptable bottles of soft drink from the filling and capping machines. Based on past data, the probability that a bottle came from machine 1 and was nonconforming is .01 and the probability that a bottle came from machine 2 and was nonconforming is .025. Half the bottles are filled on machine 1 and the other half are filled on machine 2. If a filled bottle of soft drink is selected at random, what is the probability that

a:it is a nonconforming bottle?
b:it was filled on machine 1 and is a conforming bottle?
c:it was filled on machine 1 or is a conforming bottle?
d:Suppose you know that the bottle was produced on machine 1. What is the probability that it is nonconforming?
e:Suppose you know that the bottle is nonconforming. What is the probability that it was produced on machine 1?
f:Explain the difference in the answers to d and e.

A) P(AB)=P(A) + P(B)= .01+.025=.035 After this is where I have trouble.
B) P(A and A")
C) P(A or A")
D) P (A' l A)
E) P (A l ???)
F) Once I get the top part I'll be able to answer this.

I'm trying to be a good student and get this done. I hate not knowing how to do problems and my teacher doesn't seem to explain them the way that I'm use to. Any help is greatly appreciated and I thank you for your time.

William

Last edited:

#### WillNjmu

##### New Member
After reading the sticky about showing effort, I've already tried to do this problem. My values that I set up in the beginning are:

P(A)=.5
P(A')=.01
p(B)=.5
P(B')=.025

And then I use a second ' like A" to be the conforming probability like P(A)=.99
I've gone so far as denoting the random probability of a conforming and nonconforming P(C)=.965 P(C')=.035

I'm way lost so any insite no matter what would help me out. Thanks.

#### JohnM

##### TS Contributor
Will,

We have a post on Bayes Theorem/Contingency Tables in our Examples forum. The concept should parallel your problem. Try to use that, and if it still doesn't help, let us know.

John

#### WillNjmu

##### New Member
For the most part I understand the marginal and conditional probabilites, but not quite sure how to equate "and" and "or" in an equation.

#### WillNjmu

##### New Member
Doesn't seem to work for me

For some reason, the example bayes question is too basic. I understand that one completely but I can't relate the that question and mine together.

#### JohnM

##### TS Contributor
Will,

Please see the attached image file - I took the information given in the problem and converted it into numbers, using a population size of 10,000.

Now, following the logic in the Examples post, you can answer any question.....

a:it is a nonconforming bottle?
= # nonconforming/total (given in the problem statement)

b:it was filled on machine 1 and is a conforming bottle?
=P(M1 and C) = (# in machine 1 and conforming)/total

c:it was filled on machine 1 or is a conforming bottle?
=P(M1 or C) = P(M1) + P(C) - P(M1 and C)

d:Suppose you know that the bottle was produced on machine 1. What is the probability that it is nonconforming?
=P(NC|M1) = (# nonconforming and machine 1)/(total on machine 1)

e:Suppose you know that the bottle is nonconforming. What is the probability that it was produced on machine 1?
=P(M1|NC) = (# on machine 1 and nonconforming)/(total nonconforming)

#### WillNjmu

##### New Member
Thank you JohnM for you time and patience. I assume that Bayesian statistics is fairly easy for you and this was just a tedious task. I appreciated your effort and feel that with your help I've gotten a firm grasp on this and each subsequent problem. Thanks again.

William

A: 350/10000=.035
B: 4900/10000=.49
C: (5000 + 9675 - 4900)/10000=9750
D: 100/5000=.02
E: 100/350=.2857