A drawer contains 12 identical black socks and 12 identical white socks. If you pick two socks at random, what is the probability of getting a matching pair? That was the seemingly simple question posed during the written portion of Amazon’s application process in India, according to Presh Talwalkar, who shared the puzzle on YouTube.

A popular line of thinking says that when you pick a pair of socks, you have only two possible outcomes: either they will match, or they won’t. And given that the number of white socks and black socks are equal, this logic would dictate that the probability of selecting a matching pair is 50 percent.

However, Talwalkar explains that this is incorrect. The real probability is actually slightly less than 50 percent. He breaks down the math as follows:

There is a 12 out of 24 chance that the first sock you pick is black, because there are 12 black socks out of the total 24 socks. Simplified, this is a 1 out of 2, or 50 percent, probability. But when it comes to drawing a second black sock, the odds have now changed to 11 out of the remaining 23 socks.

“The asymmetry is because we are sampling without replacement,” says Talwalkar. To calculate the probability of picking a matching pair, you multiply the two numbers. So, the probability of picking a matching pair of black socks is 1/2 of 11/23. The probability of picking a pair of white socks is also 1/2 of 11/23, meaning in order to get the probability of picking any matching pair, you add these two together.

The final probability of picking a matching pair of socks is 11/23, or 47.8 percent.


Source: Read Full Article