# Formalization/Verification of a beginner combinatorics problem

To build a computer chip, 4 non-distinct components are needed. Of 12 existing components, 2 are defective. Given that 4 components are chosen, what are the probabilities of the following combinations?

1. No defective components
2. Exactly one defective component
3. Exactly two defective components

Progress so far:

The general approach I use is to consider the number of non-defective components over the total number of components for repeated decrements of each set.

1. $$\frac{10}{12} \cdot \frac{9}{11} \cdot \frac{8}{10} \cdot \frac{7}{9} \approx 0.4242$$

For the next question, I sum the probabilities of each case, depending on if the defective component is chosen last, second last, etc.

1. $$\frac{10}{12} \cdot \frac{9}{11} \cdot \frac{8}{10} \cdot \frac{2}{9} \ + \frac{10}{12} \cdot \frac{9}{11} \cdot \frac{2}{10} \cdot \frac{8}{9} \ + \frac{10}{12} \cdot \frac{2}{11} \cdot \frac{9}{10} \cdot \frac{8}{9} \ + \frac{2}{12} \cdot \frac{10}{11} \cdot \frac{9}{10} \cdot \frac{8}{9}$$

I could employ a similar intuitive approach for 3. , however I feel like this is messy and not particularly rigorous. How do I answer these questions formally?

Method 1: The number of ways of selecting a subset of size $$k$$ from a set with $$n$$ elements (the number of unordered selections of $$k$$ elements from a set of $$n$$ elements) is $$\binom{n}{k} = \frac{n!}{k!(n - k)!}$$

There are $$\binom{12}{4}$$ ways to select four of the twelve components.

The number of ways of selecting exactly $$k$$ of the $$2$$ defective components and $$4 - k$$ of the $$12 - 2 = 10$$ good components is $$\binom{2}{k}\binom{10}{4 - k}$$

Therefore, the probability of selecting exactly $$k$$ defective components is $$\Pr(\text{exactly}~k~\text{defective}) = \frac{\dbinom{2}{k}\dbinom{10}{4 - k}}{\dbinom{12}{4}}$$

Hence, \begin{align*} \Pr(\text{no defective components}) & = \frac{\dbinom{2}{0}\dbinom{10}{4}}{\dbinom{12}{4}}\\ \Pr(\text{exactly one defective component}) & = \frac{\dbinom{2}{1}\dbinom{10}{3}}{\dbinom{12}{4}}\\ \Pr(\text{exactly two defective components}) & = \frac{\dbinom{2}{2}\dbinom{10}{2}}{\dbinom{12}{4}} \end{align*}

Method 2: You have correctly calculated the first two answers. There are only three possibilities. The number of defective components selected is either zero, one, or two. Therefore, $$\Pr(\text{exactly two defective components}) = 1 - \Pr(\text{no defective components}) - \Pr(\text{exactly one defective component})$$

The probability on $$k\in\{0,1,2\}$$ defectives among the $$4$$ chosen is:$$\frac{\binom4k\binom8{2-k}}{\binom{12}2}$$ Hypergeometric distribution is used.

Actually this approach turns things around: there are $$4$$ chosen items and $$8$$ non-chosen items. Selecting $$2$$ items (the defective ones) what is the probability that $$k$$ of them will come from the chosen ones?

• An interesting approach. – N. F. Taussig Oct 9 '18 at 13:31

What you have so far is good. To simplify case 2, you can notice that the probabilities are all the same: for each one you get $$12\times11\times10\times 9$$ on the bottom and $$10\times9\times8\times 2$$ on the top in some order. So the total probability is just the probability for a specific "pattern" (e.g. defective, good, good, good) times the number of patterns. The same approach works for 3: here there are $$6=\binom 42$$ patterns, each with probability $$\frac{10}{12}\times\frac{9}{11}\times\frac{2}{10}\times\frac{1}{9}$$. This works because the first "good" (wherever you put it) always has $$10$$ on top, the second "good" always has $$9$$, and so on.