I prompted Claude for a math puzzle and was suprised to see one that I did not know about. Figured it might be worth sharing here.
The Sock Drawer Paradox
You have a drawer with some red socks and some blue socks. You know that if you pull out 2 socks randomly, the probability they're both red is $\frac{1}{2}$
Given this information, what's the probability that the first sock you pull is red?
The Surprising Answer
Most people think "well if P(both red) = 1/2, then P(first red) should be set" but this problem has multiple solutions!
Let $r$ = number of red socks and $b$ = number of blue socks.
The probability of drawing two red socks is: $$P(\text{both red}) = \frac{r}{r+b} \times \frac{r-1}{r+b-1} = \frac{1}{2}$$
Cross-multiplying and simplifying: $$\frac{r(r-1)}{(r+b)(r+b-1)} = \frac{1}{2}$$ $$2r(r-1) = (r+b)(r+b-1)$$ $$r^2 - r(2b+1) + b(b+1) = 0$$
Using the quadratic formula: $$r = \frac{(2b+1) \pm \sqrt{(2b+1)^2 - 4b(b+1)}}{2} = \frac{(2b+1) \pm (b-1)}{2}$$
This gives us two solutions: $r = b$ or $r = b+1$.
The Paradox
For any number of blue socks $b$, we can have either:
- $b$ red socks and $b$ blue socks, giving P(first red) = $\frac{1}{2}$
- $b+1$ red socks and $b$ blue socks, giving P(first red) = $\frac{b+1}{2b+1}$
Examples
Red Socks | Blue Socks | P(both red) | P(first red) |
---|---|---|---|
3 | 3 | 1/2 | 1/2 = 0.500 |
4 | 3 | 1/2 | 4/7 ≈ 0.571 |
5 | 4 | 1/2 | 5/9 ≈ 0.556 |
15 | 14 | 1/2 | 15/29 ≈ 0.517 |
Even though P(both red) = 1/2 in all cases, P(first red) can vary! The same constraint on drawing two socks doesn't uniquely determine the probability for drawing one sock.
As the number of socks increases, P(first red) approaches 1/2 from above, but it's not always exactly 1/2.