Letter frequency explained

LetterRelative frequency in the English language[1]
TextsDictionaries
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z

Letter frequency is the number of times letters of the alphabet appear on average in written language. Letter frequency analysis dates back to the Arab mathematician Al-Kindi (–873 AD), who formally developed the method to break ciphers. Letter frequency analysis gained importance in Europe with the development of movable type in 1450 AD, where one must estimate the amount of type required for each letterform. Linguists use letter frequency analysis as a rudimentary technique for language identification, where it is particularly effective as an indication of whether an unknown writing system is alphabetic, syllabic, or ideographic.

The use of letter frequencies and frequency analysis plays a fundamental role in cryptograms and several word puzzle games, including hangman, Scrabble, Wordle[2] and the television game show Wheel of Fortune. One of the earliest descriptions in classical literature of applying the knowledge of English letter frequency to solving a cryptogram is found in Edgar Allan Poe's famous story "The Gold-Bug", where the method is successfully applied to decipher a message giving the location of a treasure hidden by Captain Kidd.[3]

Herbert S. Zim, in his classic introductory cryptography text Codes and Secret Writing, gives the English letter frequency sequence as "ETAON RISHD LFCMU GYPWB VKJXZQ", the most common letter pairs as "TH HE AN RE ER IN ON AT ND ST ES EN OF TE ED OR TI HI AS TO", and the most common doubled letters as "LL EE SS OO TT FF RR NN PP CC".[4] Different ways of counting can produce somewhat different orders.

Letter frequencies also have a strong effect on the design of some keyboard layouts. The most frequent letters are placed on the home row of the Blickensderfer typewriter, the Dvorak keyboard layout, Colemak and other optimized layouts.

Background

The frequency of letters in text has been studied for use in cryptanalysis, and frequency analysis in particular, dating back to the Arab mathematician al-Kindi (c. 801–873 AD), who formally developed the method (the ciphers breakable by this technique go back at least to the Caesar cipher used by Julius Caesar, so this method could have been explored in classical times). Letter frequency analysis gained additional importance in Europe with the development of movable type in 1450 AD, where one must estimate the amount of type required for each letterform, as evidenced by the variations in letter compartment size in typographer's type cases.

No exact letter frequency distribution underlies a given language, since all writers write slightly differently. However, most languages have a characteristic distribution which is strongly apparent in longer texts. Even language changes as extreme as from Old English to modern English (regarded as mutually unintelligible) show strong trends in related letter frequencies: over a small sample of Biblical passages, from most frequent to least frequent, of Old English compares to of modern English, with the most extreme differences concerning letterforms not shared.[5]

Linotype machines for the English language assumed the letter order, from most to least common, to be based on the experience and custom of manual compositors. The equivalent for the French language was .

Arranging the alphabet in Morse into groups of letters that require equal amounts of time to transmit, and then sorting these groups in increasing order, yields .[6] Letter frequency was used by other telegraph systems, such as the Murray Code.

Similar ideas are used in modern data-compression techniques such as Huffman coding.

Letter frequencies, like word frequencies, tend to vary, both by writer and by subject. For instance, occurs with greater frequency in fiction, as most fiction is written in past tense and thus most verbs will end in the inflectional suffix -ed / -d. One cannot write an essay about x-rays without using frequently. Different authors have habits which can be reflected in their use of letters. Hemingway's writing style, for example, is visibly different from Faulkner's. Letter, bigram, trigram, word frequencies, word length, and sentence length can be calculated for specific authors, and used to prove or disprove authorship of texts, even for authors whose styles are not so divergent.

Accurate average letter frequencies can only be gleaned by analyzing a large amount of representative text. With the availability of modern computing and collections of large text corpora, such calculations are easily made. Examples can be drawn from a variety of sources (press reporting, religious texts, scientific texts and general fiction) and there are differences especially for general fiction with the position of and, with becoming more common.

Different dialects of a language will also affect a letter's frequency. For example, an author in the United States would produce something in which is more common than an author in the United Kingdom writing on the same topic: words like "analyze", "apologize", and "recognize" contain the letter in American English, whereas the same words are spelled "analyse", "apologise", and "recognise" in British English. This would highly affect the frequency of the letter, as it is rarely used by British writers in the English language.[7]

The "top twelve" letters constitute about 80% of the total usage. The "top eight" letters constitute about 65% of the total usage. Letter frequency as a function of rank can be fitted well by several rank functions, with the two-parameter Cocho/Beta rank function being the best.[8] Another rank function with no adjustable free parameter also fits the letter frequency distribution reasonably well[9] (the same function has been used to fit the amino acid frequency in protein sequences.[10]) A spy using the VIC cipher or some other cipher based on a straddling checkerboard typically uses a mnemonic such as "a sin to err" (dropping the second "r")[11] [12] or "at one sir"[13] to remember the top eight characters.

Relative frequencies of letters in the English language

There are three ways to count letter frequency that result in very different charts for common letters. The first method, used in the chart below, is to count letter frequency in lemmas of a dictionary. The lemma is the word in its canonical form. The second method is to include all word variants when counting, such as "abstracts", "abstracted" and "abstracting" and not just the lemma of "abstract". This second method results in letters like appearing much more frequently, such as when counting letters from lists of the most used English words on the Internet. is especially common in inflected words (non-lemma forms) because it is added to form plurals and third person singular present tense verbs. A final method is to count letters based on their frequency of use in actual texts, resulting in certain letter combinations like becoming more common due to the frequent use of common words like "the", "then", "both", "this", etc. Absolute usage frequency measures like this are used when creating keyboard layouts or letter frequencies in old fashioned printing presses.

An analysis of entries in the Concise Oxford dictionary, ignoring frequency of word use, gives an order of "EARIOTNSLCUDPMHGBFYWKVXZJQ".[14]

The letter-frequency table below is taken from Pavel Mička's website, which cites Robert Lewand's Cryptological Mathematics.[15]

According to Lewand, arranged from most to least common in appearance, the letters are: etaoinshrdlcumwfgypbvkjxqz. Lewand's ordering differs slightly from others, such as Cornell University Math Explorer's Project, which produced a table after measuring 40,000 words.[16]

In English, the space character occurs almost twice as frequently as the top letter [17] and the non-alphabetic characters (digits, punctuation, etc.) collectively occupy the fourth position (having already included the space) between and .[18]

Relative frequencies of the first letters of a word in English language

LetterRelative frequency as the first letter of an English word
TextsDictionaries
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
The frequency of the first letters of words or names is helpful in pre-assigning space in physical files and indexes.[19] Given 26 filing cabinet drawers, rather than a 1:1 assignment of one drawer to one letter of the alphabet, it is often useful to use a more equal-frequency-letter code by assigning several low-frequency letters to the same drawer (often one drawer is labeled VWXYZ), and to split up the most-frequent initial letters into several drawers (often 6 drawers Aa-An, Ao-Az, Ca-Cj, Ck-Cz, Sa-Si, Sj-Sz). The same system is used in some multi-volume works such as some encyclopedias. Cutter numbers, another mapping of names to a more equal-frequency code, are used in some libraries.

Both the overall letter distribution and the word-initial letter distribution approximately match the Zipf distribution and even more closely match the Yule distribution.[20]

Often the frequency distribution of the first digit in each datum is significantly different from the overall frequency of all the digits in a set of numeric data, an observation known as Benford's law.

An analysis by Peter Norvig on words that appear 100,000 times or more in Google Books data transcribed using optical character recognition (OCR) determined the frequency of first letters of English words, among other things.[21]

Relative frequencies of letters in other languages

July 2014.

Letterdata-sort-type=numberEnglishdata-sort-type=numberFrench[22] data-sort-type=numberGerman[23] data-sort-type=numberSpanish[24] data-sort-type=numberPortuguese[25] data-sort-type=numberItalian[26] data-sort-type=numberTurkish[27] data-sort-type=numberSwedish[28] data-sort-type=numberPolish[29] data-sort-type=numberDutch[30] data-sort-type=numberDanish[31] data-sort-type=numberIcelandic[32] data-sort-type=numberFinnish[33] data-sort-type=numberCzechdata-sort-type=numberHungarian
a8.167%7.636%6.516%11.525%14.634%11.745%11.920%9.383%8.965%7.49%6.025%10.110%12.217%8.421%8.89%
b1.492%0.901%1.886%2.215%1.043%0.927%2.844%1.535%1.482%1.58%2.000%1.043%0.281%0.822%1.94%
c2.782%3.260%2.732%4.019%3.882%4.501%0.963%1.486%3.988%1.24%0.565%~0%0.281%0.740%0.646%
d4.253%3.669%5.076%5.010%4.992%3.736%4.706%4.702%3.293%5.93%5.858%1.575%1.043%3.475%1.92%
e12.702%14.715%16.396%12.181%12.570%11.792%8.912%10.149%7.921%18.91%15.453%6.418%7.968%7.562%11.6%
f2.228%1.066%1.656%0.692%1.023%1.153%0.461%2.027%0.312%0.81%2.406%3.013%0.194%0.084%0.548%
g2.015%0.866%3.009%1.768%1.303%1.644%1.253%2.862%1.377%3.40%4.077%4.241%0.392%0.092%3.79%
h6.094%0.937%4.577%1.973%1.281%0.136%1.212%2.090%1.072%2.38%1.621%1.871%1.851%1.356%1.26%
i6.966%7.529%6.550%6.247%6.186%10.143%8.600%*5.817%8.286%6.50%6.000%7.578%10.817%6.073%4.25%
j0.253%0.813%0.268%2.493%0.879%0.011%0.034%0.614%2.343%1.46%0.730%1.144%2.042%1.433%1.48%
k1.772%0.074%1.417%0.026%0.015%0.009%4.683%3.140%3.411%2.25%3.395%3.314%4.973%2.894%4.85%
l4.025%5.456%3.437%4.967%2.779%6.510%5.922%5.275%2.136%3.57%5.229%4.532%5.761%3.802%6.71%
m2.406%2.968%2.534%3.157%4.738%2.512%3.752%3.471%2.911%2.21%3.237%4.041%3.202%2.446%3.82%
n6.749%7.095%9.776%6.712%4.446%6.883%7.487%8.542%5.600%10.03%7.240%7.711%8.826%6.468%6.82%
o7.507%5.796%2.594%8.683%9.735%9.832%2.476%4.482%7.590%6.06%4.636%2.166%5.614%6.695%3.65%
p1.929%2.521%0.670%2.510%2.523%3.056%0.886%1.839%3.101%1.57%1.756%0.789%1.842%1.906%0.48%
q0.095%1.362%0.018%0.877%1.204%0.505%00.020%0.003%0.009%0.007%00.013%0.001%~0%
r5.987%6.693%7.003%6.871%6.530%6.367%6.722%8.431%4.571%6.41%8.956%8.581%2.872%4.799%2.65%
s6.327%7.948%7.270%7.977%6.805%4.981%3.014%6.590%4.263%3.73%5.805%5.630%7.862%5.212%6.99%
t9.056%7.244%6.154%4.632%4.336%5.623%3.314%7.691%3.966%6.79%6.862%4.953%8.750%5.727%6.96%
u2.758%6.311%4.166%3.927%3.639%2.813%3.235%1.919%2.347%1.99%1.979%4.562%5.008%2.160%0.392%
v0.978%1.838%0.846%1.138%1.575%2.097%0.959%2.415%0.034%2.85%2.332%2.437%2.250%5.344%2.31%
w2.360%0.049%1.921%0.027%0.037%0.033%00.142%4.549%1.52%0.069%00.094%0.016%~0%
x0.250%0.427%0.034%0.515%0.453%0.008%00.159%0.019%0.036%0.028%0.046%0.031%0.027%~0%
y1.974%0.708%0.039%1.433%0.006%0.020%3.336%0.708%3.857%0.035%0.698%0.900%1.745%1.043%2.56%
z0.074%0.326%1.134%0.467%0.470%1.181%1.500%0.070%5.620%1.39%0.034%00.051%1.599%4.3%
à~0%0.486%0~0%0.072%0.635%000000000
â~0%0.051%000.562%~0%~0%00000000
á~0%000.502%0.118%0000001.799%00.867%3.44%
å~0%0000001.34%001.190%~0%0.003%00
ä~0%00.578%00001.80%00003.577%00
ã00000.733%0000000000
ą000000001.021%000000
æ~0%0000000000.872%0.867%000
œ~0%0.018%0000000000000
ç~0%0.085%0~0%0.530%01.156%0000~0%000
ć000000000.448%000000
č~0%0000000000000.462%0
ď00000000000000.015%0
ð000000000004.393%000
è~0%0.271%0~0%00.263%000000000
é~0%1.504%00.433%0.337%000~0%000.647%00.633%4.25%
ê00.218%000.450%~0%000000000
ë~0%0.008%0000000000000
ę000000001.131%000000
ě00000000000001.222%0
ğ0000001.125%00000000
î00.045%000~0%~0%00000000
ì00000(0.030%)000000000
í0000.725%0.132%0.030%000001.570%01.643%0.47%
ï~0%0.005%0000000000000
ı0000005.114%*00000000
ł000000001.746%000000
ľ0000000000000~0%0
ñ~0%000.311%00000000000
ń000000000.185%000000
ň00000000000000.007%0
ò000000.002%000000000
ö~0%00.443%0000.777%1.31%0000.777%0.444%00.784%
ô~0%0.023%000.635%~0%000000000
ó0000.827%0.296%~0%000.823%000.994%00.024%0.597%
ő000000000000000.823%
õ00000.040%0000000000
ø~0%0000000000.939%0000
ř00000000000000.380%0
ŝ000000000000000
ş0000001.780%00000000
ś000000000.683%000000
š000000000000~0%0.688%0
ß000.307%000000000000
ť00000000000000.006%0
þ000000000001.455%000
ù00.058%000(0.166%)000000000
ú0000.168%0.207%0.166%000000.613%00.045%0.098%
û~0%0.060%000~0%~0%00000000
ü~0%00.995%0.012%0.026%01.854%00000000.617%
ű000000000000000.117%
ů00000000000000.204%0
ý000~0%00000000.228%00.995%0
ź000000000.061%000000
ż000000000.885%000000
ž000000000000~0%0.721%0

*See İ and dotless I.

The figure below illustrates the frequency distributions of the 26 most common Latin letters across some languages. All of these languages use a similar 25+ character alphabet.

Based on these tables, the 'etaoin shrdlu' equivalent for each language is as follows:

See also

External links

Useful tables

Useful tables for single letter, digram, trigram, tetragram, and pentagram frequencies based on 20,000 words that take into account word-length and letter-position combinations for words 3 to 7 letters in length:

Notes and References

  1. Web site: Mička . Pavel . Letter frequency (English) . Algoritmy.net . 14 June 2022 . 4 March 2021 . https://web.archive.org/web/20210304152631/http://en.algoritmy.net/article/40379/Letter-frequency-English . live. Source is Leland, Robert. Cryptological mathematics. [s.l.] : The Mathematical Association of America, 2000. 199 p. ISBN 0-88385-719-7 .
  2. Guinness. Harry. The Best Starting Words to Win at Wordle. en-US. Wired. 2022-02-12. 1059-1028.
  3. Web site: The works of Edgar Allan Poe in five volumes. Poe, Edgar Allan. Project Gutenberg.
  4. Book: Zim, Herbert Spencer . Codes & Secret Writing: Authorized Abridgement . Scholastic Book Services . 1961 . 317853773.
  5. Web site: Frequency Analysis in Light of Language Innovation . Moreno . Marsha Lynn . Spring 2005 . Math . University of California – San Diego . 19 February 2015.
  6. [Morse code|American Morse code]
  7. Web site: British and American spelling - Oxford Dictionaries . https://web.archive.org/web/20111228045450/http://oxforddictionaries.com/words/british-and-american-spelling . dead . December 28, 2011 . Oxford Dictionaries - English . 18 April 2018.
  8. Li, Wentian . Miramontes, Pedro . Fitting ranked English and Spanish letter frequency distribution in US and Mexican presidential speeches . Journal of Quantitative Linguistics . 18 . 4 . 2011 . 10.1080/09296174.2011.608606 . 359 . 1103.2950. 1716455 .
  9. Gusein-Zade, S.M.. Sabir Gusein-Zade . Frequency distribution of letters in the Russian language . Probl. Peredachi Inf. . 24 . 4 . 102–107 . 1988.
  10. Gamow, George . Ycas, Martynas . Statistical correlation of protein and ribonucleic acid composition . Proc. Natl. Acad. Sci. . 41 . 12 . 1011–1019 . 1955 . 528190 . 10.1073/pnas.41.12.1011 . 16589789. 1955PNAS...41.1011G. free .
  11. Book: Bauer, Friedrich L. . Decrypted Secrets: Methods and maxims of cryptology . 2006 . 57 . Springer . 9783540481218 . Google Books.
  12. Book: Goebel, Greg . The Rise Of Field Ciphers: straddling checkerboard ciphers . 2009.
  13. Web site: Dirk . Rijmenants . One-time Pad.
  14. Web site: What is the frequency of the letters of the alphabet in English? . https://web.archive.org/web/20111224230632/http://oxforddictionaries.com/words/what-is-the-frequency-of-the-letters-of-the-alphabet-in-english . dead . December 24, 2011 . Oxford Dictionary . Oxford University Press . 29 December 2012.
  15. Web site: Mička . Pavel . Letter frequency (English) . Algoritmy.net.
  16. Web site: English Letter Frequency (based on a sample of 40,000 words) . 2021-01-24 . cornell.edu.
  17. Web site: Statistical Distributions of English Text . data-compression.com . https://web.archive.org/web/20170918020907/http://www.data-compression.com/english.html . 2017-09-18 . dead.
  18. Web site: Lee . E. Stewart . Essays about Computer Security . University of Cambridge Computer Laboratory . 181.
  19. Book: Herbert Marvin Ohlman . Ohlman, Herbert Marvin . Subject-Word Letter Frequencies with Applications to Superimposed Coding . Proceedings of the International Conference on Scientific Information . 1959. 10.17226/10866 . 978-0-309-57421-1 .
  20. Pande, Hemlata . Dhami, H.S. . Mathematical Modelling of Occurrence of Letters and Word's Initials in Texts of Hindi Language . JTL . 16.
  21. Web site: English Letter Frequency Counts: Mayzner revisited or ETAOIN SRHLDCU . norvig.com . 18 April 2018.
  22. Web site: Corpus de Thomas Tempé . 2007-06-15 . dead . https://web.archive.org/web/20070930194046/http://gpl.insa-lyon.fr/Dvorak-Fr/CorpusDeThomasTemp%C3%A9 . 2007-09-30 . dmy-all.
  23. Book: Beutelspacher, Albrecht . Kryptologie . Vieweg . Wiesbaden . 2005 . 3-8348-0014-7 . 10 . 7.
  24. Book: Pratt, Fletcher. Secret and Urgent: The story of codes and ciphers. Blue Ribbon Books. 1942. Garden City, NY. 254–5. 795065.
  25. Web site: Frequência da ocorrência de letras no Português . 2009-06-16 . dmy-all . https://web.archive.org/web/20090803182254/http://www.numaboa.com/criptografia/criptoanalise/310-Frequencia-no-Portugues . 2009-08-03 . dead .
  26. Book: Simon . Singh . Stefano . Galli . Codici e Segreti . 1999 . Milano . Rizzoli . 978-8-817-86213-4 . 535461359 . it.
  27. Serengil, Sefik Ilkin . Akin, Murat . Attacking Turkish Texts Encrypted by Homophonic Cipher . Proceedings of the 10th WSEAS International Conference on Electronics, Hardware, Wireless and Optical Communications . 123–126 . Cambridge, UK . 20–22 February 2011.
  28. Web site: Practical Cryptography . 2013-10-30 . dmy-all.
  29. Web site: Frekwencja liter w polskich tekstach - Poradnia językowa PWN.
  30. Web site: Letterfrequenties . 2009-05-17 . dmy-all . Genootschap OnzeTaal.
  31. Web site: Danish letter frequencies . Practical Cryptography . 2013-10-24 . dmy-all.
  32. Web site: Icelandic letter frequencies . Practical Cryptography . 2013-10-24 . dmy-all.
  33. Web site: Finnish letter frequencies . Practical Cryptography . 2013-10-24 . dmy-all.
  34. Perec, Georges; Alphabets; Éditions Galilée, 1976