# Probability - using Bayes Theorem

1. Oct 17, 2011

### tapciv

1. The problem statement, all variables and given/known data
Question breaks down to this.

defect occurs 1/100 items.

.97 (97%) of the time when an item has a defect it is detected.
.005 of the time, an item is detected to have a defect when it actually does not have one.

What is the probability that an Actual defect occurs when one is detected?

2. Relevant equations
I can use Bayes theorem, once I know the variables but this is where I am having trouble with this question.

Determining what A1, A2 are?
B = A defect being found (I believe)
P(B|A1)= ?
P(B|A2)=?

3. The attempt at a solution

I believe I want to find P(A1|B) which will be the probability that a detection is actually a defect when found.

I know P(B|A1), P(B|A2) must = 1 which is where I can not seem to figure out in this case.

I think A1 = Defect being found correctly = .97
and
A2 = Defect being found incorrectly = ? (.005 but is that it? or how is this calculated given this is 99/100 times .005 are found incorrectly?).

Any help would be awesome!

Thanks

2. Oct 17, 2011

### Ray Vickson

I find it most helpful in such problems to use a suggestive notation, such as:
AD = actually defective, AN = actually non-defective,
DD = detected as defective and DN = detected as non-defective.
You are given P{AD} = 1/100, so you can get P{AN} (how?). You are also given
P{DD|AD} = 0.97, so you can get P{DN|AD} (how?). Finally, you are given P{DD|AN} = 0.005, so you can get P{DN|AN} (how?).

Now you want to compute P{AD|DD}. You can use the standard formulas to get this, but I won't spoil your fun by showing you how.

RGV