# What's the probability if getting the same objects of the same colour?

Q:A bag contains 5 black socks and 4 white socks. If 2 socks are picked randomly from it, find the probability of them being of the same colour.

What I've done is this:

• probability of first sock being black: 5/9

• probability of first sock being white: 4/9

• Probability of both being black is therefore, 5/9 * 5/9 = 25/81

similarly,

• Probability of both being black is therefore, 4/9 * 4/9 = 16/81

And probability of any 2 socks being of the same color is then: 25/81 + 16/81

I dont think what I've done is right. How would this be done?

-
Do a tree, starting from "no socks", see in what fraction of the cases you get a white one, or a black one; from "one white" what are the options, and the same for "one black". –  vonbrand Feb 3 at 19:40

$2$ white socks from $4$ white socks can be chosen in $\binom 42=\frac{4\cdot3}{2\cdot1}=6$ ways.

Any $2$ socks can chosen from $9$ socks in $\binom92=\frac{9\cdot8}{2\cdot1}=36$ ways.

So, the probability of first two socks being white is $\frac{\text{ the number of favourable cases }}{\text{ the number of possible cases }}=\frac{6}{36}=\frac16$

Similarly, the probability of first two socks being black is $\frac{\binom52}{\binom92}=\frac5{18}$

So, the probability of first two socks being of same colour is $\frac16+\frac5{18}=\frac49$

Alternatively,

The probability of first socks being white is $\frac4{4+5}=\frac49$

The probability of second socks being white with 1st one also white is $\frac{4-1}{4+5-1}=\frac38$

So, the probability of first two socks being white is $\frac49\cdot\frac38=\frac16$

Similarly, the probability of first two socks being black is $\frac5{4+5}\frac{5-1}{4+5-1}=\frac5{18}$

-
I dont understand how you get 6 ways and 36 ways in the beginning. Also, a minor thing, you addressed the socks as balls in the middle. –  Ghost Feb 3 at 15:27
@Ghost, please find the edited version. Btw, $\binom nr$ is the number of combinations for choosing $r$ elements from the $n$ elements. –  lab bhattacharjee Feb 3 at 15:33