A labelling vendor's error rate is either 2% (prior 0.7) or 10% (prior 0.3). You audit two batches of 10 independent labels: the first has 1 error, the second has 2. What is the posterior probability of the 10% hypothesis after both batches, and does updating batch by batch change it?
Show the answer and explanation
Correct answer: D, About 0.93 either way: the first batch moves P(10%) from 0.30 to about 0.50, the second from 0.50 to about 0.93, and one update on all 20 labels gives the same 0.93.
Explanation Bayes Theorem
With a few discrete hypotheses, Bayes' rule is a table: multiply each prior by the likelihood of the data, then normalise. The binomial coefficient is the same under both hypotheses and cancels.
| Step | Likelihood if 2% | Likelihood if 10% | P(10%) after |
|---|---|---|---|
| Prior | 0.30 | ||
| Batch 1: 1 error in 10 | 0.02 · 0.98⁹ ≈ 0.0167 | 0.1 · 0.9⁹ ≈ 0.0387 | ≈ 0.50 |
| Batch 2: 2 errors in 10 | 0.02² · 0.98⁸ ≈ 0.00034 | 0.1² · 0.9⁸ ≈ 0.0043 | ≈ 0.93 |
In one step: the likelihood ratio for 3 errors in 20 is (0.1³ · 0.9¹⁷) / (0.02³ · 0.98¹⁷) ≈ 29.4, the posterior odds are (0.3/0.7) × 29.4 ≈ 12.6, so P(10%) ≈ 12.6 / 13.6 ≈ 0.93.
Sequential and batch updates agree because, for data that are independent given the hypothesis, likelihoods multiply: P(batch 1, batch 2 | h) = P(batch 1 | h) · P(batch 2 | h). Each posterior becomes the next prior, and the original prior is used exactly once.
Why the distractors fail: the prior is not reapplied at each step, so nothing is counted twice (0.84 is what you get by updating batch 2 alone from the 0.3 prior, which throws batch 1 away). Averaging posteriors from separate updates also discards evidence. And 20 labels do not make the prior irrelevant: dropping it gives 0.97 instead of 0.93.
Interview tip: this is why Bayesian monitoring can run as a stream: keep the current posterior and update it with each new batch. The same logic underlies sequential testing and Thompson-sampling bandits.