Consider a bag containing colored marbles. There are $n$ marbles in the bag such that there is exactly one pair of marbles of color $i$ for each $i \in\{1, \ldots, m\}$ and the rest of the marbles are of distinct colors (different from colors $\{1, \ldots, m\}$ ). You draw two marbles uniformly at random (without replacement). What is the probability that both marbles are of same color?

The first marble can be picked out in $n$ ways and the second one in $n-1$ ways, the total number of ways of picking $2$ marbles will be $n(n-1)$ ways.

For getting 2 marble of the same colour the first one can be selected in $\binom{2m}{1}$ way and the second marble can be selected in only $1$ way(the same colour as the first draw), the total number of ways of picking 2 marble of the same colour will be $2mÃ—1 = 2m$ ways.

Probability that both marbles are of same colour = $2m/n(n-1)$