# Probability of Matching Socks

### Introduction

In a drawer $r$ red, $b$ blue, and $g$ green socks. Two drawn at random. What is the probability of getting a matching pair?

### Suggestion

Do not try solving the whole problem at once but try to think of more manageable subproblems.

### Solution 1

To start with, instead of looking for a matching pair, let's find the probability that both socks are red.

The probability of getting one sock red is $\displaystyle\frac{r}{r+b+g}.$ Assuming that the first sock is red, the probability of getting the second red sock is $\displaystyle\frac{r-1}{r+b+g-1}.$

When it comes to calculating probabilities, colors do not make much difference: analogous argument applies to blue and green socks, implying that the probability of getting two blue socks is $\displaystyle\frac{b(b-1)}{(r+b+g)(r+b+g-1)}$ and that of getting green socks is $\displaystyle\frac{g(g-1)}{(r+b+g)(r+b+g-1)}.$ The answer to the question is then

$\displaystyle\frac{r(r-1)+b(b-1)+g(g-1)}{(r+b+g)(r+b+g-1)}.$

The formula is eminently reasonable, for if any of the three numbers is $1,$ the effect of having an unmatched sock in a drawer is to increase the denominator without adding anything to the numerator.

### Solution 2

There are $\displaystyle C^{r+b+g}_{2}$ ways to select $2$ socks out of the total of $r+b+g.$ There are $\displaystyle C^{r}_{2}$ ways to select $2$ out $r$ red socks. So the probability of selecting two red socks is

$\begin{align}\displaystyle P(2\mbox{ red socks})&=C^{r}_{2}/C^{r+b+g}_{2}\\ &=\frac{r!}{2!(r-2)!}\cdot\frac{2!(r+b+g-2)!}{(r+b+g)!}\\ &=\frac{r(r-1)}{(r+b+g)(r+b+g-1)}. \end{align}$

The same result as before, and, similarly for the other colors.

### Example

The question was posted at the Probability problems page, with 4 red, 5 blue, 2 green socks. The answer to this is

$\displaystyle\frac{4\cdot 3+5\cdot 4+2\cdot 1}{11\cdot 10} = \frac{17}{55}.$

- What Is Probability?
- Intuitive Probability
- Probability Problems
- Sample Spaces and Random Variables
- Probabilities
- Conditional Probability
- Dependent and Independent Events
- Algebra of Random Variables
- Expectation
- Probability Generating Functions
- Probability of Two Integers Being Coprime
- Random Walks
- Probabilistic Method
- Probability Paradoxes
- Symmetry Principle in Probability
- Non-transitive Dice

|Contact| |Front page| |Contents| |Algebra| |Probability|

Copyright © 1996-2018 Alexander Bogomolny63573562 |