WOLFRAM|DEMONSTRATIONS PROJECT

Zipf's Law Applied to Word and Letter Frequencies

​
corpus fragment
Alice In Wonderland
by
words
letters
frequencies
the632
and338
a278
to252
she242
of199
it189
i178
was167
alice167
in163
said144
you118
her108
that105
as91
at79
with67
s66
had65
all64
on64
little59
out54
down52
this51
t50
for48
but47
they45
The frequency of words and letters in bodies of text has been heavily studied for several purposes, one being cryptography. This Demonstration performs an analysis of several texts, including fragments of popular works in several languages. It shows the distribution of frequencies, sorted from most common to least common.
Plotting word frequencies illustrates Zipf's law. This is a phenomenological law related to rank data frequencies, primarily of linguistic corpora. It says that the most frequent word will occur approximately twice as often as the second most frequent word, which will occur approximately twice as often as the fourth most frequent word. When the plot approximates a straight line it indicates that the data follows this law. It has also been shown that random bodies of text exhibit a word frequency distribution like Zipf's law, suggesting that the law is more a statistical phenomenon than specific to linguistics. The term has therefore come to be used to refer to any of a family of related power-law probability distributions.