Given is a bag containing 7 white, 5 black and 4 red balls.
By using the formula of probability, we get,
P (E) = favourable outcomes / total possible outcomes
Two balls are drawn at random, so total possible outcomes will be ${}^{16}C_2$
n (S) = 120
Let E be the event of getting both balls of same colour
E = {(B) (B)} or {(W) (W)} or {(R) (R)}
$n (E) = {}^7C_2+{}^5C_2+{}^4C_2 = 37$
P (E) = n (E) / n (S)
= 37 / 120