3 ms·
Nice review! I tried using the K-S test once for some of the old Matasano crypto challenges, to determine if the letter frequency of the text after running it t
by losvedir 11y ago
Nice review! I tried using the K-S test once for some of the old Matasano crypto challenges, to determine if the letter frequency of the text after running it through some deciphering algorithm was from the same distribution as the letter frequency of a sample of the English language. Couldn't ever get it to work, though... maybe that's an inappropriate use of the test, or maybe my sample (Pride and Prejudice, IIRC) was unrepresentative. In the end, simply computing the distance of the two letter frequency vectors (sum of squares) worked.
I did it all in ruby at the time, but it looks like rust may have some stats libraries now? Should give it a whirl again this time using rust, or maybe do tpatcek's new Stockfighter game instead.
- capnrefsmmat 11y agoThe K-S test assumes the data comes from a continuous distribution, so count data would mess up the test's false positive rate. You could avoid that by doing a permutation test, or one of the variations of the K-S test designed to account for data with ties.