I have the following definition for the index of coincidence for breaking Vignère cipher where $n_c$ is the number of indices $i$ for which $x_i = c$. 
I don't really know how to deduce the right-hand side exprexion. I have some notes from class but they are not complete something like:
$Pr(x_I = x_J : I < J ) = \sum_{c \in Z} Pr(x_I = x_J =c : I <J) = \sum_{c \in Z} \frac{{n_c} \choose {2}}{\frac{n}{c}}$.
Do you know the deduction of this expression?
$$\Pr(x_I = x_J : I < J ) ~=~ \sum_{c \in Z} Pr(x_I = x_J =c : I <J) ~=~ \sum_{c \in Z} \frac{{n_c} \choose {2}}{{n}\choose{2}} ~=~ \sum_{c\in Z} \dfrac{n_c(n_c-1)}{n(n-1)}$$
By reason that: The probability that two distinct members in the sequence have the same value is determined by:
That is all.