Mixture of Binomial Distributions — AS Level Statistics
The Problem
A factory produces board pens using two machines. The machines differ in their defect rates, and each contributes a different proportion of the total output.
Machine A
64%
of total production
3%
probability of a defective pen
Machine B
36%
of total production
6%
probability of a defective pen
Question
A sample of 10 pens is taken from the factory output. Let \(X\) be the number of defective pens in the sample.
It might be tempting to write \(X\sim B(10,\,0.0408)\) — but this gives the wrong answer. The simple Binomial assumes each pen independently has probability 0.0408 of being defective, with that probability identical for all pens. The reality is different: the actual defect probability for each pen depends on which machine made it, and all ten pens in the sample face the same machine.
⚠ Using \(X\sim B(10,\,0.0408)\) gives \(\mathrm{P}(X=2)\approx 0.0537\). The correct mixture answer is \(\approx 0.0559\) — an underestimate of about 4%. We'll see exactly why in Section 2.
Key Concept: Mixture Distributions
When a random variable is drawn from a population composed of sub-groups, each with its own distribution, we apply the Law of Total Probability at every value of \(X\):
\[\mathrm{P}(X = k) = \mathrm{P}(X = k \mid A)\,\mathrm{P}(A) + \mathrm{P}(X = k \mid B)\,\mathrm{P}(B)\]
For our factory, conditioning on the machine that produced the sampled pens gives two conditional Binomial distributions:
\[X \mid A \;\sim\; B(10,\;0.03)\]
\[X \mid B \;\sim\; B(10,\;0.06)\]
The general mixture formula
For a sample of size \(n\) drawn from a two-machine mixture:
where \(w_A + w_B = 1\) are the mixture weights (proportions of production), and \(p_A,\,p_B\) are the conditional defect probabilities.
Why is the simple Binomial wrong?
The simple \(B(10, 0.038)\) model assumes the ten bulbs independently have probability 0.038 each of being defective — it treats the process as homogeneous. The mixture model recognises that all ten sampled bulbs came from the same machine, which is unknown. This extra uncertainty increases the variance. Formally:
\[\mathrm{E}[X] = n\bigl(w_A p_A + w_B p_B\bigr) = 10 \times 0.0408 = 0.408\quad\text{(same for both models)}\]
\[\mathrm{Var}(X)_{\text{mixture}} \;>\; \mathrm{Var}(X)_{B(10,\,0.0408)}\quad\text{(mixture has extra variance)}\]
The heavier tail of the mixture distribution means more probability weight on larger values of \(X\) — so \(\mathrm{P}(X=2)\) is higher than the simple Binomial predicts.
Full Solution: P(X = 2)
Step 1
State the conditional distributions
Let \(X\) be the number of defective pens in a sample of 10. Conditioning on the machine:
\[X \mid A \;\sim\; B(10,\;0.03), \qquad X \mid B \;\sim\; B(10,\;0.06)\]
Approximately a 5.6% chance of exactly 2 defective pens in the sample
Comparison: The simple \(B(10,\,0.0408)\) model gives
\(\binom{10}{2}(0.0408)^2(0.9592)^8 \approx 0.0537\) — an underestimate of about 4%.
The discrepancy grows for larger values of \(k\), since the mixture distribution has a heavier tail.
The Full Probability Distribution
The table and chart below show the complete distribution of \(X\) under the mixture model, compared to the simple \(B(10,\,0.038)\) approximation. The value \(k=2\) is highlighted.