stat - Perform statistical analysis on a string


stat option string


stat ioc string
Calculates the index of coincidence of the given string. The index of coincidence is defined as
(sum of (nj * (nj-1))) / (ntotal * (ntotal - 1))
for all letters j where nj is the number of times the letter j appears in the string.

stat histogram string
Generates a histogram of the characters from a to z in string. For example:

stat histogram foobar

returns a 1 b 1 c 0 d 0 e 0 f 1 g 0 h 0 i 0 j 0 k 0 l 0 m 0 n 0 o 2 p 0 q 0 r 1 s 0 t 0 u 0 v 0 w 0 x 0 y 0 z 0

stat histfit histogram1 histogram2
Slides the second histogram along the first looking for the best match. The best left shift for the second histogram is returned.

stat histvals histogram1 histogram2
Display the histogram fit values when the second histogram is slid along the first. Each value are calculated by multiplying the values for each corresponding bin of the histograms and adding up the results.

stat alphfit string
This performs the same function as the histfit method, except that a histogram is generated from a single string and the histogram is fit against a standard English distribution.

stat kasiski string ?minperiod maxperiod?
Perform a kasiski analysis on the string. The minimum and maximum periods to use may be specified and default to the range 3 - 15.

Back to the Index
Created on Wed Mar 31 08:18:24 PST 2004 Logo