2
$\begingroup$

A drawer contains $n$ distinct pairs of socks. A sample of four socks is made, without replacement. Let $X$ denote the number of pairs of socks in the sample. What is the probability mass function of $X$?

The variable $X$ can take on only the values $0$, $1$, and $2$, so I compute the probability that $X$ takes on each value.

For $P(X = 0)$, all the socks have to come from different pairs, so it suffices to multiply the four probabilities, that each new chosen sock does not form a pair with any previously chosen sock. $$ P(X=0) = 1 \cdot \frac{2n - 2}{2n - 1} \cdot \frac{2n - 4}{2n - 2} \cdot \frac{2n - 6}{2n - 3} $$

For $P(X=1)$, I focus on a single pair. Say they have a particular color $c$. What is the probability that the sample contains the pair $c$? Let $Y_c$ be the number of socks of color $c$ in the sample. Of course, $Y_c \leq 2$. The variable follows a hypergeometric distribution. Hence, the probability of getting a pair of color $c$ is $$ P(Y_c = 2) = \frac{\binom{2}{2} \binom{2n - 2}{4 - 2}}{\binom{2n}{4}} = \frac{6}{n(2n-1)} $$

The probability that there is at least one pair in the sample is obtained by multiplying by $n$.

How can I find the probability that there is exactly one pair and the probability that there are exactly two pairs?

$\endgroup$
  • $\begingroup$ Well, for exactly one pair: there are $n$ possible pairs. Then there are $\binom {n-1}2$ ways to choose unmatched (pairs of) socks from the rest. And then there are $4$ ways to pick one each from those two pairs. $\endgroup$ – lulu Apr 18 '17 at 19:32
2
$\begingroup$

I would approach this combinatorially.

The total number of choices is $\binom{2n}{4}=\frac{2n(2n-1)(2n-2)(2n-3)}{24}=\frac{n(n-1)(2n-1)(2n-3)}{6}$.

For there to be exactly one pair, you choose one of the $n$ pairs in $\binom{n}{1}=n$ ways, then you must choose two of the remaining pairs in $\binom{n-1}{2}=\frac{(n-1)(n-2)}2$ and finally, for each of those two pairs, you must choose one of the two socks in $\binom{2}{1}=2$ ways. Hence, we have $n\cdot\frac{(n-1)(n-2)}2\cdot2^2=$ $2n(n-1)(n-2)$ possibilities, and the probability is

$$\mathbb{P}(X=1)=\frac{2n(n-1)(n-2)}{\frac{n(n-1)(2n-1)(2n-3)}{6}}=\frac{12(n-2)}{(2n-1)(2n-3)}$$

For there to be exactly two pairs, you must choose two of the $n$ pairs in $\binom{n}2=\frac{n(n-1)}2$ and take both socks in the pair, which entirely defines the choice. Hence, the probability is

$$\mathbb{P}(X=2)=\frac{\frac{n(n-1)}{2}}{\frac{n(n-1)(2n-1)(2n-3)}{6}}=\frac{3}{(2n-1)(2n-3)}$$

$\endgroup$
  • $\begingroup$ I believe there is an error: don't you mean to write $\binom{n-1}{2} = \frac{(n-1)(n-2)}{2}$ ? $\endgroup$ – Jacob Errington Apr 18 '17 at 20:13
  • $\begingroup$ Using this correction, the probabilities for n=3 correspond with my simulations. $\endgroup$ – Jacob Errington Apr 18 '17 at 20:34
  • $\begingroup$ Oops, you are correct! $\endgroup$ – Fimpellizieri Apr 18 '17 at 20:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.