Katkat

Bayesian Posterior That k Red Parts Came From Factory A

SIG (Susquehanna)Quantitative Trader · Online Assessment

Last updated

A probability question on Bayesian updating: one of two factories with different red-part rates is chosen at random, and k parts drawn from it are all red. It asks for the conditional probability that the parts came from the first factory, testing likelihoods, priors and careful evaluation of powers.

Two factories make the same part in two colors. Factory A's output is $a%$ red and $(100-a)%$ black. Factory B's output is $b%$ red and $(100-b)%$ black. You pick one of the two factories at random, each with equal probability, and draw $k$ parts from its output. All $k$ parts turn out to be red.

What is the conditional probability that these $k$ parts came from factory A? Give a general expression in $a$, $b$ and $k$, then evaluate it for the values you are given. The assessment generates the specific numbers randomly, and each question states whether the answer is an integer or a decimal rounded to two places.

Constraints and Clarifications

  • $a$ and $b$ are percentages between 0 and 100, and $k$ is a positive integer.
  • Each factory is chosen with probability one half, and all $k$ parts come from the chosen factory.
  • Treat each factory's output as very large, so the colors of the drawn parts are independent given the factory.

Clarifying Questions

  • Is each factory equally likely to be chosen, or does one of them supply more of the parts?
  • Are the parts drawn from a large production run, or from a small batch of known size where drawing without replacement matters?
  • Should rounding happen only at the end, and to how many decimal places?

Hints

Hint 1

Two competing explanations: Work out how plausible an all-red sample of this size is under each factory before you bring in how the factory was chosen.

Follow-up questions

  • How does the posterior change if exactly $j$ of the $k$ parts are red?
  • If factory A supplies a larger share of the parts than factory B, how does the answer change?
  • When $a$ is greater than $b$, how many consecutive red parts are needed before the posterior for factory A exceeds a target level $c$?