Index of Coincidence Applet
This applet will approximate the index of coincidence (IC) between
two strings, or between a string and that same string with its first few
characters deleted (sometimes called a shift of the string). The IC of
a string is the probability that two randomly selected charaters from the
string are equal (i.e. both 'a' or both 'b', etc.). This applet estimates
that probability by lineing up two strings, character by character, and
counting the number of characters that match. The count is divided
by the length of the shorter string.
To estimate the IC between two strings
-
Enter one String in the X Text Area.
-
Enter a second String in the Y Text Area.
-
Press the "Estimate IC(X,Y)" button.
To estimate the IC of a String X and X shifted by k = a to b characters
-
Enter your String in the X Text Area.
-
Fill in a starting k = value (from 1 to something less than the length
of your String).
-
Fill in an ending k = value (larger than your starting value and less than
the length of your string).
-
Press the "Estimate shifted IC(X)" button.
Here is the souce code for this applet, IndexOfCoinApplet.java,
the java application source code and BreezyGUI
information.