Bayesian inference: Which factory given two black widgets?
Setup
-
Two factories produce red and black widgets.
-
Factory A: 40% red, 60% black.
-
Factory B: 80% red, 20% black.
-
One factory is chosen uniformly at random (each with probability 1/2).
-
Two widgets are then sampled uniformly at random from that chosen factory.
-
You observe that both sampled widgets are black.
Assumption: draws are independent conditional on the factory (equivalently, sampling with replacement or from a very large batch).
Task
Compute the posterior probability that the widgets came from Factory A given that both sampled widgets are black: P(A | both black).