Good–Turing frequency estimation

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Good–Turing frequency estimation is a statistical technique for estimating the probability of encountering an object of a hitherto unseen species, given a set of past observations of objects from different species. In drawing balls from an urn, the 'objects' would be balls and the 'species' would be the distinct colors of the balls (finite but unknown in number). After drawing red balls, black balls and green balls, we would ask what is the probability of drawing a red ball, a black ball, a green ball or one of a previously unseen color.

Historical background[edit]

Good–Turing frequency estimation was developed by Alan Turing and his assistant I. J. Good as part of their methods used at Bletchley Park for cracking German ciphers for the Enigma machine during World War II. Turing at first modelled the frequencies as a multinomial distribution, but found it inaccurate. Good developed smoothing algorithms to improve the estimator's accuracy.

The discovery was recognized as significant when published by Good in 1953,[1] but the calculations were difficult so it was not used as widely as it might have been.[2] The method even gained some literary fame due to the Robert Harris novel Enigma.

In the 1990s, Geoffrey Sampson worked with William A. Gale of AT&T, to create and implement a simplified and easier-to-use variant of the Good–Turing method[3][4] described below. Various heuristic justifications[5] and a simple combinatorial derivation have been provided [6].

The method[edit]


  • Assuming that X distinct species have been observed, numbered x = 1, ..., X.
  • Then the frequency vector, , has elements that give the number of individuals that have been observed for species x.
  • The frequency of frequencies vector, , shows how many times the frequency r occurs in the vector R; i.e. among the elements .

For example, is the number of species for which only one individual was observed. Note that the total number of objects observed, N, can be found from

The first step in the calculation is to estimate the probability that a future observed individual (or the next observed individual) is a member of a thus far unseen species. This estimate is:[7]

The next step is to estimate the probability that the next observed individual is from a species which has been seen r times. For a single species this estimate is:

To estimate the probability that the next observed individual is from any species from this group (i.e., the group of species seen r times) one can use the following formula:

Here, the notation means the smoothed or adjusted value of the frequency shown in parenthesis (see also empirical Bayes method). An overview of how to perform this smoothing follows.

We would like to make a plot of versus but this is problematic because for large r many will be zero. Instead a revised quantity, , is plotted versus , where Zr is defined as

and where q, r and t are consecutive subscripts having non-zero. When r is 1, take q to be 0. When r is the last non-zero frequency, take t to be 2r − q.

The assumption of Good–Turing estimation is that the number of occurrence for each species follows a binomial distribution.[8]

A simple linear regression is then fitted to the log–log plot. For small values of r it is reasonable to set (that is, no smoothing is performed), while for large values of r, values of are read off the regression line. An automatic procedure (not described here) can be used to specify at what point the switch from no smoothing to linear smoothing should take place.[9] Code for the method is available in the public domain.[10]

See also[edit]


  1. ^ Good, I.J. (1953). "The population frequencies of species and the estimation of population parameters". Biometrika. 40 (3–4): 237–264. doi:10.1093/biomet/40.3-4.237. JSTOR 2333344. MR 0061330.
  2. ^ Newsise: Scientists Explain and Improve Upon 'Enigmatic' Probability Formula, a popular review of Orlitsky A, Santhanam NP, Zhang J (2003). "Always Good Turing: asymptotically optimal probability estimation". Science. 302 (5644): 427–31. Bibcode:2003Sci...302..427O. doi:10.1126/science.1088284. PMID 14564004.
  3. ^ Sampson, Geoffrey and Gale, William A. (1995) Good‐turing frequency estimation without tears
  4. ^ Orlitsky, Alon; Suresh, Ananda (2015). "Competitive distribution estimation: Why is Good-Turing Good?" (PDF). Neural Information Processing Systems (NIPS): 1–9. Retrieved 28 March 2016.
  5. ^ Nadas, A. (1991). "Good, Jelinek, Mercer, and Robbins on Turing's Estimate of Probabilities". American Journal of Mathematical and Management Sciences. American Sciences Press Syracuse, NY, USA. 11: 299–308.
  6. ^ Hutter, Marcus (2014). "Offline to Online Conversion". Proc. 25th International Conf. on Algorithmic Learning Theory (ALT'14). LNAI. 8776. Bled, Slovenia: Springer. pp. 230–244.
  7. ^ Gale, William A. (1995). "Good–Turing smoothing without tears". Journal of Quantitative Linguistics. 2 (3): 3. doi:10.1080/09296179508590051.
  8. ^ Lecture 11: The Good–Turing Estimate. CS 6740, Cornell University, 2010 [1]
  9. ^ Church, K; Gale, W (1991). "A comparison of the enhanced Good–Turing and deleted estimation methods for estimating probabilities of English bigrams".
  10. ^ Sampson, Geoffrey (2005) Simple Good–Turing Frequency Estimator (code in C)