Computational Linguistics 2, Exercise 3: testing Zipf's law on the Brown Corpus counts Counts from the Zipf's law article: the 69,971; of 36,411; and 28,852. Code (run with py -X utf8): t, o, a = 69971, 36411, 28852 print(round(t / o, 2), round(t / a, 2)) print(round(t / 1), round(t / 2), round(t / 3)) Output from the run: 1.92 2.43 69971 34986 23324 Prediction: frequency proportional to 1/rank gives rank 2 = 69,971 / 2 = 34,986 and rank 3 = 69,971 / 3 = 23,324. Comparison: the real rank 2 count (36,411) is close to the prediction; the real rank 3 count (28,852) is noticeably higher than 23,324. The ratio of rank 1 to rank 2 is 1.92 (law says 2); rank 1 to rank 3 is 2.43 (law says 3). What it shows: the relation is a good first approximation, not an exact law. The article itself says it holds only approximately, with deviations at the ends and across languages, texts and spellings, and only about 15% of a large set of English texts fit well. "Law" here means a regularity, not a guarantee; that comment on the word is mine.