Apologies if this is a duplicate. I searched and didn't find anything quite like it.

Suppose I have a drawer with an equal number of N black socks and N white socks. They're all mixed up. So, my chances of picking a matching pair in the first two selections is (N-1)/(2N-1), right? Well, what if, before I pick the first sock, I randomly (so I don't know the colors of the socks I'm moving) partition the drawer so that there are N socks on each side, and I draw one sock from each side. Do the chances of drawing a matching pair change?

On the one hand, we can see that selection from one side doesn't change the composition of socks on the other side of the partition. However, whichever color I choose from the "first" side, it's likely that there are more of that color on that side. On other words, if I draw a black sock from one side, it's more likely that that side had N-1 blacks and 1 white than it is that that side had 1 black and N-1 whites.

My suspicion is that I need to do some kind of hypothesis testing, where I consider the chances of every possible partitioning, but that's way above my skill level.

  • 6
    $\begingroup$ Shouldn't the probability in the simple case be $\frac{N-1}{2N-1}$, because there are no longer $2N$ socks in the drawer? $\endgroup$ Feb 19 '18 at 20:17
  • $\begingroup$ with replacement? $\endgroup$ Feb 19 '18 at 20:18
  • $\begingroup$ @GTonyJacobs Yep $P=\frac {N-1}{2N-1}$ $\endgroup$
    – MtGlasser
    Feb 19 '18 at 20:27
  • $\begingroup$ You certainly don't need hypothesis testing. We're not making inferences from a sample about an otherwise unknowable population. This is just a probability question with all of the parameters known. Kind of a tricky one, maybe, but there might be a good symmetry argument for why there's no difference. $\endgroup$ Feb 19 '18 at 20:37
  • $\begingroup$ @GTonyJacobs Correct. I'll see if I can edit the post. $\endgroup$
    – Jemenake
    Feb 20 '18 at 21:34

It doesn't matter if the partitioning happens before or after the first draw. Suppose it happens after. Suppose also that the first sock drawn was black.

Now, we partition off $N$ from the remaining $2N-1$, to obtain our pool for the second draw. On average, the composition of this pool is $\frac{N-1}{2N-1}$ black and $\frac{N}{2N-1}$ white. Drawing from it, we have a matching pair if we draw from the portion of it that is black, i.e., $\frac{N-1}{2N-1}$.

The trick to simplifying the work is to work with expected values for the number of socks of each color in the second part of the partition, not actual values.


No, the chances don't change. If you worked out all the conditional probabilities based on how the socks split and summed appropriately you'd get the same answer: $(N-1)/(2N -1)$. The partition gives you no new information.

Here's the brute force calculation for $N=2$. There are two possible partitions, WW|BB and WB|WB. The first of these occurs with probability $1/3$. the second with probability $2/3$. In the first case you fail for sure. In the second you succeed half the time. On average you succeed with probability $$ 0 \times \frac{1}{3} + \frac{1}{2} \times \frac{2}{3} = \frac{1}{3} = \frac{2-1}{4-1}. $$

(There's probably a really elegant argument from symmetry that I don't see.)


Of course it shouldn't change!

Let's see if the math works out for a simple example, say $N=3$

First, the 'normal' calculation says that the chances of getting a match $M$ is:

$$P(M)= \frac{N-1}{2N-1}=\frac{2}{5}$$

Now let's see what happens when you randomly partition them.

Let's say you first pick from the left side. After randomly splitting the socks into two groups, there can be $0$, $1$, $2$, or $3$ socks there, with respective probabilities of:

$$P(0)= \frac{{3 \choose 0}\cdot{3 \choose 3}}{6 \choose 3} = \frac{1}{20}$$

$$P(1)= \frac{{3 \choose 1}\cdot{3 \choose 2}}{6 \choose 3} = \frac{9}{20}$$

$$P(2)= \frac{{3 \choose 2}\cdot{3 \choose 1}}{6 \choose 3} = \frac{9}{20}$$

$$P(3)= \frac{{3 \choose 3}\cdot{3 \choose 0}}{6 \choose 3} = \frac{1}{20}$$

Now, getting a match $M$ in the first and last situation is impossible, so $$P(M|0)=P(M|3)=0$$

When there is $1$ white sock on the left, the chances of getting a match are the chance of getting that white sock times the chances of getting one of the two socks on the right side, plus the chances of getting one of the two black ones on the left and the one black one on the right. And, with $2$ white socks on the left it's all symmetrical. So:

$$P(M|1)=P(M|2)=\frac{1}{3}\cdot \frac{2}{3} + \frac{2}{3} \cdot \frac{1}{3} = \frac{4}{9}$$

In sum:

$$P(M)=P(0)\cdot P(M|0) + P(1)\cdot P(M|1) +P(2)\cdot P(M|2) +P(3)\cdot P(M|3) =$$

$$ \frac{1}{20} \cdot 0 + \frac{9}{20} \cdot \frac{4}{9} + \frac{9}{20} \cdot \frac{4}{9} + \frac{1}{20} \cdot 0 = \frac{8}{20} = \frac{2}{5}$$

OK, so yes, same chance!

Now, I'm sure you can generalize this for any $N$ ... thus evaluating the series:

$$P(M)=\sum_{i=0}^N \frac{{N \choose i} \cdot {N \choose {N-i}}}{2N \choose N} \cdot 2 \cdot \frac{i}{N} \cdot \frac{N-i}{N}$$

[... Insert some math that's over my head ....]

... and you'll see that this ends up being $$\frac{N-1}{2N-1}$$


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.