# Statistics: A Sock Problem

**Problem: **Given 6 pairs of socks (a.k.a a total of 12 socks) , where 3 pairs are blue and 3 pairs are black (a.k.a total number of blue socks is 6 and total number of black socks is 6). **What is the probability of picking a matching pair ?**

**Answer:** 5/11

Let’s first understand the question: **What is the probability of picking a matching pair ? **This is just asking us the number of ways to pick any two socks that are the same color.

Initially we are given 6 pairs of socks for a total of 12 socks. 3 pairs are black and 3 pairs are blue, meaning 6 socks are black and the other 6 are blue. We choose the first sock, it doesn’t matter what color the sock is that we choose as long as the second sock is the same color as the first.

# WARNING MATH AHEAD !!

Ways to pick any 2 socks from 12 socks = 12 choose 2 or **12C2.** Ways to pick 2 BLACK socks from 6 BLACK socks = 6 choose 2 or

**6C2**

Ways to pick 2 BLUE socks from 6 BLUE socks = 6 choose 2 or

**6C2**

**Using the ****Combination Formula****:**

n! / k!(n-k)!

**12C2** = 12! / 2!(12–2)! = 12!/2!10!= 12 * 11 / 2 = 66**6C2 = **6!/2!(6–2)! = 6!/2!4! = 6*5/ 2 = 15

Probability of picking 2 BLACK socks (P1)= **6C2** / **12C2** = 15/66

Probability of picking 2 BLUE socks (P2)= **6C2** / **12C2** = 15/66

Another way of figuring that out without using the Combination Formula:

Probability of picking 2 BLACK socks (P1)= 6/12 * 5/11=15/66

Probability of picking 2 BLUE socks (P1)= 6/12 * 5/11=15/66

*I got the 6/12, from the 6 black socks out of 12 possible socks, and got the 5/11 from choosing the first black sock leaving us with 5 black socks and a total of 11 socks left. The same thing goes for the blue socks*

The probability of picking either 2 blue socks or 2 black socks =

Probability of picking any 2 same color socks = P1+P2 = 15/66 + 15/66 = 30/66 = **5/11**

Thanks for reading this article I hope its helpful to you all ! If you enjoyed this article and found it helpful please leave some claps to show your appretiation. Keep up the learning, and if you would like more mathematics, computer science, programming and algorithm analysis videos please visit and subscribe to my YouTube channels (randerson112358 & compsci112358 )

# Check Out the following for content / videos on Computer Science, Algorithm Analysis, Programming and Logic:

**YouTube Channel:***randerson112358: *https://www.youtube.com/channel/UCaV_0qp2NZd319K4_K8Z5SQ

*compsci112358:*

https://www.youtube.com/channel/UCbmb5IoBtHZTpYZCDBOC1CA

**Website:**

http://everythingcomputerscience.com/

**Video Tutorials on Recurrence Relation:**

https://www.udemy.com/recurrence-relation-made-easy/

**Video Tutorial on Algorithm Analysis:**

https://www.udemy.com/algorithm-analysis/

**Twitter:**

https://twitter.com/CsEverything

# YouTube Channel:

# Computer Science Website:

# Udemy Videos on Algortithm Analysis:

**RESOURCE:**

http://www.crazyforcode.com/probability-picking-2-socks-color/