# Cryptanalyst’s Index of Coincidence

Index of coincidence measures how likely it is to draw two matching letters by choosing two random letters from a text.

## Definition

Given a text of length $n$ using an alphabet consisting of $c$ letters and given the number of appearances $f_i$ for each letter $i$, the Index of coincidence (IC) is defined by the sum:

$\text{IC} = \frac{\sum_{i=1}^cf_i(f_i-1)}{n(n-1)}$

The normalized Index of coincidence can be obtained by multiplying the above $\text{IC}$ by $c$.

This article is a work in progress.