1 problem found
Widgets are manufactured in batches of size \((n+N)\). Any widget has a probability \(p\) of being faulty, independent of faults in other widgets. The batches go through a quality control procedure in which a sample of size \(n\), where \(n\geqslant2\), is taken from each batch and tested. If two or more widgets in the sample are found to be faulty, all widgets in the batch are tested and all faults corrected. If fewer than two widgets in the sample are found to be faulty, the sample is replaced in the batch and no faults are corrected. Show that the probability that the batch contains exactly \(k\), where \(k\leqslant N\), faulty widgets after quality control is \[ \frac{\left[N+1+k\left(n-1\right)\right]N!}{\left(N-k+1\right)!k!}p^{k}\left(1-p\right)^{N+n-k}, \] and verify that this formula also gives the correct answer for \(k=N+1\). Show that the expected number of faulty widgets in a batch after quality control is \[ \left[N+n+pN(n-1)\right]p(1-p)^{n-1}. \]
Solution: \begin{align*} \mathbb{P}(\text{exactly }k\text{ faults after test}) &= \mathbb{P}(k\text{ faults in non-tested, 0 in batch})+\mathbb{P}(k-1\text{ faults in non-tested, 1 in batch}) \\ &=\binom{N}{k}(1-p)^{N-k}p^k\binom{n}{0}(1-p)^n+\binom{N}{k-1}(1-p)^{N-k+1}p^{k-1}\binom{n}{1}(1-p)^{n-1}p \\ &= (1-p)^{N-k+n}p^k \cdot \left ( \binom{N}{k}+n\binom{N}{k-1} \right) \\ &= (1-p)^{N-k+n}p^k \cdot \left (\frac{N!}{k!(N-k)!}+\frac{N!n}{(k-1)!(N-k+1)!}\right) \\ &= (1-p)^{N-k+n}p^k \frac{N!}{k!(N-k+1)!} \cdot \left ((N-k+1)+nk \right) \\ &= \frac{\left[N+1+k\left(n-1\right)\right]N!}{\left(N-k+1\right)!k!}p^{k}\left(1-p\right)^{N+n-k} \end{align*} When \(k = N+1\) we get: \begin{align*} \frac{(N+1)n N!}{(N+1)!} p^{N+1}(1-p)^{N+n-k} &= np^{N+1}(1-p)^{N+n-k} \end{align*} and the probability is: \begin{align*} \mathbb{P}(\text{exactly }N+1\text{ faults after test}) &= \mathbb{P}(N\text{ faults in non-tested, 1 in batch}) \\ &= \binom{N}{N}p^N \cdot \binom{n}{1}p(1-p)^{N-1} \\ &= np^{N+1}(1-p)^{N+n-k} \end{align*} So the formula does work for \(k = N+1\). \begin{align*} \mathbb{E}(faults) &= \sum_{k=0}^{N+1} k \cdot \mathbb{P}(\text{exactly }k\text{ faults after test}) \\ &= \sum_{k=0}^{N+1} k \cdot \frac{\left[N+1+k\left(n-1\right)\right]N!}{\left(N-k+1\right)!k!}p^{k}\left(1-p\right)^{N+n-k} \\ &= \sum_{k=1}^{N+1} \frac{\left[N+1+k\left(n-1\right)\right]N!}{\left(N-k+1\right)!(k-1)!}p^{k}\left(1-p\right)^{N+n-k} \\ &= \sum_{k=1}^{N+1} \left[N+1+k\left(n-1\right)\right] p(1-p)^{n-1}\binom{N}{k-1}p^{k-1}\left(1-p\right)^{N-k+1} \\ &= p(1-p)^{n-1} \cdot \left ( (N+1+n-1)\sum_{k=1}^{N+1} \binom{N}{k-1}p^{k-1}\left(1-p\right)^{N-k+1}+ (n-1)\sum_{k=1}^{N+1} (k-1)\binom{N}{k-1}p^{k-1}\left(1-p\right)^{N-k+1} \right) \\ &= p(1-p)^{n-1} \left ((N+1+n-1) + (n-1)pN \right) \\ &= \left[N+n+pN(n-1)\right]p(1-p)^{n-1} \end{align*}