The problem I have a question about is below. I only have a question on part (e), but I included the other parts of the question and answers as a reference.
A quality control inspector is examining newly produced items for faults. The inspector searches an item for faults in a series of independent fixations, each of a fixed duration. Given that a flaw is actually present, let p denote the probability that the flaw is detected during any one fixation.
(a) Assuming that an item has a flaw, what is the probability that it is detected by the end of the second fixation (once a flaw has been detected, the sequence of fixations terminates)?
Answer: $1-(1-p)^2$
(b) Give an expression for the probability that a flaw will be detected by the end of the nth fixation.
Answer: $1-(1-p)^n$
(c) If when a flaw has not been detected in three fixations, the item is passed, what is the probability that a flawed item will pass inspection?
Answer: $(1-p)^3$
(d) Suppose 10% of all items contain a flaw [P(randomly chosen item is flawed) = 0.1]. With the assumption of part (c), what is the probability that a randomly chosen item will pass inspection (it will automatically pass if it is not flawed, but could also pass if it is flawed)?
Answer: $0.90 + 0.10(1-p)^3$
(e) Given that an item has passed inspection (no flaws in three fixations), what is the probability that it is actually flawed? Calculate for p = 0.4. (Round your answer to four decimal places.)
My understanding of this problem is as follows:
Let $n = $ % of all items that contain a flaw
$n(1-p)^3\;=\;n(1-0.4)^3$
What would I set the equation to in order to solve for $n$? Am I correct in my thinking, or am I completely off?
Let $q$ be the the probability that a part is flawed. Then the probability that a part has passed inspection is $1-q+q(1-p)^3$, so the probability that this part is flawed is $\frac{q(1-p)^3}{1-q+q(1-p)^3}=0.01367$ for $q=0.1$ and $p=0.4$.