I'm new to probability. I'm trying to learn bayes theorem.
I came across this question.
** Two machines M & N are used to produce chocolates. M produces 60% of total chocolates and N produces 40%. Given 70% of chocolates by M and 80% of chocolates by N are normal and the rest are faulty. Now, I'm confused about applying bayes theorem for the following question: * A chocolate is chosen and found out to be normal. What is the probability of it being from machine M* **
My approach is P(A) = 0.6
p(B) = 0.4
Now I'm confused on what is the condition to be applied and what is p(A|B)? Is it applicable or not. Any suggestion would be great.
Denote $P(normal|M) = 0.7$ and $P(normal|N) = 0.8$.
Computing the $P(M|normal)$ is our target.
By bayes theorem
$$ P(M|normal) = \frac{P(normal|M)P(M)}{P(noraml)} = \frac{P(normal|M)P(M)}{P(normal|M)+P(normal|N)}$$