Hat-check problem variation - matching socks at random My friend has a tendency to wear mismatched socks, because he "Can't be bothered wasting time matching them, so he just pairs them up at random". One day I noticed he was wearing matching socks, which was apparently not on purpose.
This got me thinking, if you have N different pairs of socks and you start matching them at random, what is the probability of putting together at least one correct pair?
What first came to my mind was the famous Hat-checking problem, which I cannot generalize to answer this question. I tried programming the problem though and noticed that the chance of getting a correct pair becomes significantly lower with large inputs. It does seem to converge though, but I'm not sure how to find the limit analytically.
 A: If I'm understanding your question correctly (more discussion on this at the end), the limit is $1-e^{-1/2} \approx 0.393$.
More generally, the probability that exactly $k$ people get matching pairs of socks converges to $e^{-1/2} \frac{ \left(\frac{1}{2}\right)^k}{k!}$ (so the number of people getting matching socks approaches a Poisson distribution with mean $\frac{1}{2}$).  
A hand-wavy sketch: If we let $X_i$ denote the event that person $i$ chooses a matching pair of socks, then the probability that $X_i$ occurs is $\frac{n}{\binom{2n}{2}}=\frac{1}{2n-1}$.  These events aren't independent, but asymptotically you might expect then to be "nearly" so, and the probability that none of them occur to be roughly 
$$\left(1-\frac{1}{2n-1}\right)^n \approx e^{n/(2n-1)} \approx e^{-1/2}$$
(this is akin to the intuition for the asymptotics of derangements in the hat-checking problem).  
One way this can be made rigorous is to use an analytical technique/result sometimes referred to as "Brun's Sieve".  Roughly speaking, what it says here is that if you have $n$ rare events, and for each fixed $k$ the expected number of $k$-tuples of events occurring is asymptotically the same as when the events are independent, then the limiting distribution of the number of events occurring is the same as it would have been if the events are independent.  It then becomes a matter of doing the analysis/counting to estimate the expected number of $k$-tuples which occur.  

Cockburn and Lesperance analyzed a similar question in their paper Deranged Socks and got an asymptotic of $\frac{1}{e}$, but I don't think they're looking at quite the same situation.  For example, consider the case $n=2$, with red and blue socks.  The first person can either get $2$ red socks, $2$ blue socks, or $1$ sock of each color.  If you're picking two socks at random (as I interpret what you're asking), the last possibility is $4$ times as likely as either of the other two.  But as far as I can tell, Cockburn and Lesperance treat all $3$ possibilities as equally likely (in their notation, $u_2=3$).   
