Good-Turing frequency estimation
From Wikipedia, the free encyclopedia
Good–Turing frequency estimation is a statistical technique for predicting the probability of occurrence of objects belonging to an unknown number of species, given past observations of such objects and their 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 Rred red balls, Rblack black balls and Rgreen 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.)
Contents |
[edit] Historical background
GTFE was developed by Alan Turing and his assistant I.J. Good during World War II. (It was part of their efforts at Bletchley Park to crack German ciphers for the Enigma machine during the war). Turing at first modeled the frequencies as a binomial 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, but the calculations were difficult so it was not used as widely as it might have been.[1]
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 [2] described below.
[edit] The method
Let us define some data structures and notation.
Assume we have observed X distinct species, numbered x = 1, ... , X
The frequency vector Rx gives the number of objects we have observed for species x
The frequency of frequencies vector Nr shows how many times the frequency r occurs in the vector Rx. For example N1 is the number of species for which only 1 object was observed.
Note that the total number of objects observed, N, can be found from .
The first step in the calculation is to find an estimate of the total probability of unseen objects. This estimate is p0 = N1 / N
The next step is to find an estimate of probability for objects which were seen r times, this estimate is
The notation S() means the smoothed or adjusted value of the frequency shown in parenthesis. An overview of how to perform this smoothing will now be given.
We would like to make a plot of logNr versus logr but this is problematic because for large r many Nr will be zero. Instead we plot logZr versus logr where Z is defined as
- where q, r and t are consecutive subscripts having Nq,Nr,Nt non zero.
A linear regression is then fit to the log-log plot. For small values of r we take S(Nr) = Nr (that is, no smoothing is performed), while for large values on r S(Nr) is read off the regression line. An automatic procedure (not described here) specifies at what point the switch from no smoothing to linear smoothing should take place.
Code for the method is available in the public domain.