I got stuck in a question regarding Bayes Theorem. Say a worker selects which products to inspect after the products are done. 10% of all products are broken. 60% of all broken products are inspected. What is the probability that a product is broken given that it was inspected?
So, given that the events are independent and that P(I|B) =0.6, P(B and I) should be 0.06 (that is, P(B and I) = P(I|B)*P(B) = 0.6 * 0.1). Since P(B and I) is P(B)*P(I), P(I) should be 0.6.
So, using Bayes, P(B|I) = [P(B) * P(I|B)]/ P(I) (where B broken and I is inspected). That is, P(B|I) = [0.1 * 0.06] / 0.6 = 0.01
Is my reasoning ok?
More formally,
Posterior probability (our objective) is the probability of getting broken product given it has gone through inspection.
$P(B|I) = \frac{P(B)*P(I|B)}{P(I)}$
Independence is defined as $P(I|B) = P(I)$ so in the above $P(B|I) = P(B)$
so your Answer is NOT correct if B and I are independent. correct answer is 0.1
Let's define and calculate prior, Posterior and Likelihood and Evidence probabilities.
Prior is what we know about the quality of the product i.e. 10% is broken, 90% unbroken
$P(B) = 0.1$ and $P(B') = 0.9$
Likelihood is how good is our inspection process given that a product is actually broken. or Probability of being caught in inspection given that product is actually broken. i.e.
$P(I|B) = 0.6$ and $P(I'|B) = 0.4$
Note here it is conditional probability and they are NOT called independent events YET. If it's not broken we will NOT inspect.
The Evidence is given by
$ P(I) = \sum_{B,B'} P( I \cap B) = P(B)*P(I|B) + P(B')*P(I|B') $
If we can show that $P(I|B') = P(I|B)$ or $P(I'|B) = P(I'|B')$ then we can say $P(I|B) = P(I)*P(B) $ i.e. Inspection and quality are independent.
:( If we do not inspect unbroken product, can we have a branch. Does it make sense? I know mathematically its possible as the leaves add to 1.
Let us say there is a branch after unbroken products in the probability tree. It has two leaves $P(I|B')$ and $P(I'|B')$ that can take any value such that their sum adds to 1.
Therefore posterior probability $P(B|I)$ can take any value between 0 and 1 depending on the value of $P(I|B')$
Am I correct in my reasoning?