Use Bayes for factory identification
Problem: Bayesian Inference for Factory Identification
You are presented with a scenario involving two factories, Factory A and Factory B, each producing red and black widgets with different proportions.
Setup
- Factory A: Produces 40% red widgets and 60% black widgets.
- Factory B: Produces 80% red widgets and 20% black widgets.
- A single factory is chosen uniformly at random, meaning Factory A is chosen with probability 1/2, and Factory B is chosen with probability 1/2.
- From the chosen factory, two widgets are sampled uniformly at random.
- You observe that both sampled widgets are black.
Assumption
The draws are independent conditional on the chosen factory. This implies either sampling with replacement or sampling from a very large batch of widgets.
Task
Compute the posterior probability that the widgets came from Factory A, given that both sampled widgets are black. Express this as P(A | both black).
AI interview prep
Core dilemma
Correctly applying Bayes' Theorem to update prior beliefs about the factory choice based on observed evidence (two black widgets), while accurately handling conditional probabilities and the independence assumption.
3 tradeoffs and 3 stress tests locked
Interview prep
Unlock the interviewer X-Ray rubric, tradeoff matrix, stress tests, clarifying questions, and key concepts.
Use Bayes for factory identification
Problem: Bayesian Inference for Factory Identification
You are presented with a scenario involving two factories, Factory A and Factory B, each producing red and black widgets with different proportions.
Setup
- Factory A: Produces 40% red widgets and 60% black widgets.
- Factory B: Produces 80% red widgets and 20% black widgets.
- A single factory is chosen uniformly at random, meaning Factory A is chosen with probability 1/2, and Factory B is chosen with probability 1/2.
- From the chosen factory, two widgets are sampled uniformly at random.
- You observe that both sampled widgets are black.
Assumption
The draws are independent conditional on the chosen factory. This implies either sampling with replacement or sampling from a very large batch of widgets.
Task
Compute the posterior probability that the widgets came from Factory A, given that both sampled widgets are black. Express this as P(A | both black).