Relating Turing's Formula and Zipf's Law

Similar documents
Random variables, probability distributions, binomial random variable

Section 1.3 P 1 = 1 2. = P n = 1 P 3 = Continuing in this fashion, it should seem reasonable that, for any n = 1, 2, 3,..., =

OPTIMAL SELECTION BASED ON RELATIVE RANK* (the "Secretary Problem")

Overview of Violations of the Basic Assumptions in the Classical Normal Linear Regression Model

Section 3-7. Marginal Analysis in Business and Economics. Marginal Cost, Revenue, and Profit. 202 Chapter 3 The Derivative

Exponential Functions. Exponential Functions and Their Graphs. Example 2. Example 1. Example 3. Graphs of Exponential Functions 9/17/2014

( ) is proportional to ( 10 + x)!2. Calculate the

MATH 4330/5330, Fourier Analysis Section 11, The Discrete Fourier Transform

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 5 9/17/2008 RANDOM VARIABLES

CONTINUED FRACTIONS AND FACTORING. Niels Lauritzen

1 if 1 x 0 1 if 0 x 1

9.2 Summation Notation

1 Error in Euler s Method

LIMITS AND CONTINUITY

People have thought about, and defined, probability in different ways. important to note the consequences of the definition:

Review of Fundamental Mathematics

7.7 Solving Rational Equations

A Coefficient of Variation for Skewed and Heavy-Tailed Insurance Losses. Michael R. Powers[ 1 ] Temple University and Tsinghua University

10.2 Series and Convergence

PROPERTIES OF ELLIPTIC CURVES AND THEIR USE IN FACTORING LARGE NUMBERS

Chapter 4. Polynomial and Rational Functions. 4.1 Polynomial Functions and Their Graphs

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

Properties of sequences Since a sequence is a special kind of function it has analogous properties to functions:

Sequences and Series

Chapter 4 One Dimensional Kinematics

By choosing to view this document, you agree to all provisions of the copyright laws protecting it.

1 Gambler s Ruin Problem

Math 1B, lecture 5: area and volume

Continued Fractions and the Euclidean Algorithm

Lecture 13 - Basic Number Theory.

The Characteristic Polynomial

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

About the Gamma Function

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay

A STOCHASTIC MODEL FOR THE SPREADING OF AN IDEA IN A HUMAN COMMUNITY

8 Primes and Modular Arithmetic

Exponential and Logarithmic Functions

The Matrix Elements of a 3 3 Orthogonal Matrix Revisited

CHAPTER 2 Estimating Probabilities

6.4 Normal Distribution

LECTURE 4. Last time: Lecture outline

So let us begin our quest to find the holy grail of real analysis.

Cartesian Products and Relations

Core Maths C3. Revision Notes

Algebra 2 Unit 8 (Chapter 7) CALCULATORS ARE NOT ALLOWED

4.5 Linear Dependence and Linear Independence

Visualizing Differential Equations Slope Fields. by Lin McMullin

Settling a Question about Pythagorean Triples

Development of dynamically evolving and self-adaptive software. 1. Background

Lecture Notes on Elasticity of Substitution

Section 3-3 Approximating Real Zeros of Polynomials

Mathematics Review for MS Finance Students

Moving Least Squares Approximation

Random variables P(X = 3) = P(X = 3) = 1 8, P(X = 1) = P(X = 1) = 3 8.

Review of Basic Options Concepts and Terminology

An Extension Model of Financially-balanced Bonus-Malus System

1 Determine whether an. 2 Solve systems of linear. 3 Solve systems of linear. 4 Solve systems of linear. 5 Select the most efficient

DIFFERENTIABILITY OF COMPLEX FUNCTIONS. Contents

Version. General Certificate of Education (A-level) January Mathematics MPC3. (Specification 6360) Pure Core 3. Final.

sin(x) < x sin(x) x < tan(x) sin(x) x cos(x) 1 < sin(x) sin(x) 1 < 1 cos(x) 1 cos(x) = 1 cos2 (x) 1 + cos(x) = sin2 (x) 1 < x 2

GEARING UP EXAMPLES. 4 to 3 4:3

Understanding Poles and Zeros

RESULTANT AND DISCRIMINANT OF POLYNOMIALS

Student Outcomes. Lesson Notes. Classwork. Discussion (10 minutes)

SECTION P.5 Factoring Polynomials

Lies My Calculator and Computer Told Me

Section 1-4 Functions: Graphs and Properties

3 Contour integrals and Cauchy s Theorem

Nonlinear Systems of Ordinary Differential Equations

S-Parameters and Related Quantities Sam Wetterlin 10/20/09

Zero and Negative Exponents and Scientific Notation. a a n a m n. Now, suppose that we allow m to equal n. We then have. a am m a 0 (1) a m

Version 1.0. General Certificate of Education (A-level) January Mathematics MPC4. (Specification 6360) Pure Core 4. Final.

Probability and Statistics Prof. Dr. Somesh Kumar Department of Mathematics Indian Institute of Technology, Kharagpur

1 Teaching notes on GMM 1.

Approximation of Aggregate Losses Using Simulation

HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)!

Lecture 2. Marginal Functions, Average Functions, Elasticity, the Marginal Principle, and Constrained Optimization

I remember that when I

The sample space for a pair of die rolls is the set. The sample space for a random number between 0 and 1 is the interval [0, 1].

The continuous and discrete Fourier transforms

Identities for Present Values of Life Insurance Benefits

C3: Functions. Learning objectives

Least-Squares Intersection of Lines

Solutions to Homework 10

Solving Linear Systems, Continued and The Inverse of a Matrix

Standard Deviation Estimator

CHAPTER 5 Round-off errors

Math 115 Spring 2011 Written Homework 5 Solutions

1. First-order Ordinary Differential Equations

MPE Review Section III: Logarithmic & Exponential Functions

Chem 115 POGIL Worksheet - Week 4 Moles & Stoichiometry

Differentiation of vectors

Mathematics 31 Pre-calculus and Limits

Chapter 31 out of 37 from Discrete Mathematics for Neophytes: Number Theory, Probability, Algorithms, and Other Stuff by J. M.

1 Interest rates, and risk-free investments

Infinitely Repeated Games with Discounting Ù

1 Short Introduction to Time Series

Substitute 4 for x in the function, Simplify.

Chapter 4: Exponential and Logarithmic Functions

Polynomial Degree and Finite Differences

Transcription:

Relating Turing's Formula and Zipf's Law Christer Samuelsson Universit t des Saarlandes, FR 8.7, Computerlinguistik Postfach 50, D-6604 Saarbriicken, Germany chr ± st er~col i. uni- sb. de Abstract An asymptote is derived from Turing's local reestimation formula for population frequencies, and a local reestimation formula is derived from Zipf's law for the asymptotic behavior of population frequencies. The two are shown to be qualitatively different asymptotically, but nevertheless to be instances of a common class of reestimation-formula-asymptote pairs, in which they constitute the upper and lower bounds of the convergence region of the cumulative of the frequency function, as rank tends to infinity. The results demonstrate that Turing's formula is qualitatively different from the various etensions to Zipf's law, and suggest that it smooths the frequency estimates towards a geometric distribution. Introduction Turing's formula [Good 953] and Zipf's law [Zipf 935] indicate how population frequencies in general tend to behave. Turing's formula estimates locally what the frequency count of a species that occurred r times in a sample really would have been, had the sample accurately reflected the underlying population distribution. Zipf's law prescribes the asymptotic behavior of the relative frequencies of species as a function of their rank. The ranking scheme in question orders the species by frequency, with the most common species ranked first. The reason that these formulas are of interest in computational linguistics is that they can be used to improve probability estimates from relative frequencies, and to predict the frequencies of unseen phenomena, e.g., the frequency of previously unseen words encountered in running tet. Due to limitations in the amount of available training data, the so-called sparse-data problem, estimating probabilities directly from observed relative frequencies may not always be very accurate. For this reason, Turing's formula, in the incarnation of Katz's back-off scheme [Katz 987], has become a standard technique for improving parameter estimates for probabilistic language models used by speech recognizers. A more theoretical treatment of Turing's formula itseff can be found in [N das 985]. Zipf's law is commonly regarded as an empirically accurate description of a wide variety of (linguistic) phenomena, but too general to be of any direct use. For a bit of historic controversy on Zipf's law, we refer to [Simon 955], [Mandelbrot 959], and subsequent articles in Information and Control. The model presented there for the stochastic source generating the various Zipfian distributions is however linguistically highly dubious: a version of the monkeywith-typewriter scenario. The remainder if this article is organized as follows. In Section 2, we induce a recurrence equation from Turing's local reestimation formula and from this derive the asymptotic behavior of the relative frequency as a function of rank, using a continuum approimation. The resulting probability distribution is then eamined, and we rederive the recurrence equation from it. In Section 3, we start with the asymptotic behavior stipulated by Zipf's law, and derive a recurrence equation similar to that associated with Turing's formula, and from this 770

induce a corresponding reestimation formula. We then rederive the Zipfian asymptote from the established recurrence equation. In Section 4, similar techniques are used to establish the asymptotic behavior inherent in a general class of recurrence equations, parameterized by a real-valued parameter, and then to rederive the recurrence equations from their asymptotes. The convergence region of this parameter for the cumulative of the frequency function, as rank approaches infinity, is also investigated. In Section 5, we summarize the results, discuss how they might be used practically, and compare them with related work. 2 An Asymptote for Turing's Formula Turing's formula reestimates population frequencies locally: * = (+l). N.+~ N~ () Here N~ is the number of species with frequency count, and * is the improved estimate of. Let N be the size of the entire population and note that N = ~'N. and f~ = ~r ---- where is the count of the most populous species and f~ is the relative frequency of any species with frequency count. Let r() be the rank of the last species with frequency count. This means that quite in general r() = Z Nk k= 2. A continuum approimation i = ~ ik - ~ ik = r(~)- r( + ) (2) k= k=+l We first make a continuum approimation by etending N from the integer points =, 2,... to a continuous function N() on [, oo). This means that r() = ~Nk,~ ~ N(y)dy Differentiating this w.r.t, z, the lower bound of the integral, yields k---- dr() d f d - d N(y) dy = -N() and using the chain rule for differentiation yields dr dr d = d~'~ = -N(l.N (a) Continuum approimations are useful techniques for establishing the dependence of a sum on its bounds, to the leading term, and for determining convergence. For eample, if we wish to 7

n study the sum ~ in n 3 -- k 2, we note that the corresponding integral Jl 2 d = - - and conclude k--- 3 that the sum behaves like n 3. 2n 3 -F 3n 2 + n The eact formula is 6, so we in fact even got CO the leading coefficient right. Likewise, we can establish for what values of a the sum ~ k ~ converges by eplicitly calculating k=l fl a d = c~+l [~-~-ljl for o~ -~ - indicating that the integral, and thus the sum, converge for c~ < - and diverge for ~ > -. We have to be a bit careful with the transition to the continuous case. We will first let N become large and then establish what happens for small, but non-zero, values of ff = ~. So although will be small compared to N, it will be large compared to any constant C. This means that f = lim ~ = lim +C N-*oo N N--+co N for any additive constant C, and we may approimate + C with, motivating and similar approimations in the following. z+l 2.2 The asymptotic distribution For an ideal Turing population, we would have = z*. This gives us the recurrence equation Ig N=+i = + l " N= (4) implying that there are equally many inhabitants for frequency count as for frequency count +. This introduces several additional constraints, namely N= =. N and thus N= = N = 'N and thus f -.N N N (5) We are now prepared to derive the asymptotic behavior of the relative frequency f(r) of species as a function of their rank r implicit in Eq. (4). Combining Eq. (5) with Eq. (3) yields dr N N df - N(). N = ---. z N = - y This determines the rank r(f) as a function of the relative frequency f: Inverting this gives us the sought-for function f(r): r(f) = C-Nllnf (6) C--r /(r) = em- = C'e- r 72

- - Nlln(l+:) Utilizing the fact that the relative frequencies should be normalized to one, we find that and that thus "Turing's asymptotic law" is oo = f(r) dr = C'.Nle-~" r-- f(r) = ~-e "~ (7) Note that, reassuringly, the relative frequency of the most populous species, f, is preserved: f() = N N - f r-- Upon eamining the frequency function --N e ~, we realize that we have an eponential distribution with intensity parameter ~-, the probability of the most common species. This distribution was created by approimating our original discrete distribution with a continuous one. The discrete counterpart of an eponential distribution is a geometric distribution P(r) = p. (- p)r- r=l,2,... parameterized by p, the probability of some outcome occurring in one trial. P(r) can then be interpreted as the probability of waiting r trials for the first occurrence of the outcome. Thus, Turing's formula seems to be smoothing the frequency estimates towards a geometric distribution. 2.3 Rederiving Turing's formula To test our derivation of the asymptotic equation (7) from the recurrence equation (4), we will attempt to rederive Eq. (4) from Eq. (7). Since Eq. (7) implies Eq. (6), we start from the latter and establish that Inserting this into Eq. (2) yields r() = c - gl ln ~ z +l = NllnZ+l N~ = r(z)-r(z+l) = -N~lny+N~ln-N-- This means that We first note that < in:+! < +l - \ ] - We also note that the numerator can bewrittenasg(+l)-g()forg(y)= yln( +~), wmch in turn can be written as J g(y) dy, i.e., as ~, In + + 73

further note that if A < h(y) <_ B on (a, b), then A(b - a) < /b h(y) dy < B(b - a). Hence ( ) ( ~) l'+'( ( ) ) (+l)in i+.~-~-~ -ln I+ in 4~ l 'y ely 0 < = ~ - ( + )ln (+ ~) ( + )ln (+ ~) /.+(~ ) /~+' /'+' < J~ l+y dy = J y(l - - + y) dy < dy < -- -- J V -- 2 < We have thus proved that ]N+l +l [ < ~ and since we assume that >>, this reestablishes Eq. (4) (to the second power of ~). 3 A Reestimation Formula for Zipf's Law Zipf's law concerns the asymptotic behavior of the relative frequencies f(r) of a population as a function of rank r. It states that, asymptotically, the relative frequency is inversely proportional to rank: A f(~) = B+~ (8) This implies a finite total population, since the cumulative (i.e, the sum or integral) of the relative frequency over rank does not converge as rank approaches infinity: lim F(r) ~ -.4. 00 fi f(k) F(r) = k=~ f /(o) dp in the discrete case lim Aln(B+r) = c~ r---moo in the continuous case To localize Zipf's law, we utilize Eq. (2) and observe that r() = A' A t g~+: ~(~ + ) - ~( + 2) + + 2 g ~(~) - ~(~ + ) A' A' +l This suggests "Zipf's local reestimation formula" * = (T + 2)" N+l N A m-b f() A I = ---B, ( + ). ( + 2) - +2 (9).(+l) which is deceptively similar to Turing's formula, Eq. (), the only difference being that it +2 assigns ~ more relative-frequency mass to frequency count. 3. Rederiving Zipf's law If we rederive the asymptotic behavior, we again obtain Zipf's law. Assuming the recurrence equation N~+~ = 74 ~.N~ +2 (0)

- C we have that...- 2 C N+l = +---~'N~, = (+2)...3"N = (+2).(+l)'N ~, (+l)2 () We again use the equation for the derivative of the rank, Eq. (3), but now C I Integration yields r = 7 dr C C' = -N().N ~ -~.N = -f--~ + C" and function inversion f(r) = r - C I tt Identifying C ~ with A and C" with -B recovers Eq. (8). 4 A General Correspondence If we generalize the rederivation of Zipf's law in Eq. () to p = 2, 3,...,, we find that '..."! C N+l = +---~'N = (+p)...(l+p)'n = i.i~=l(k+p)'il,~, (+l)p C C' We integrate ~ to get r(f) - fp- + C", yielding a r-7:i" asymptote for f(r). Although a nontrivial generalization, it is in fact the case that for real-valued 0 : # 0 < z, results in the asymptote N+l = --'N~ (2) z+8 f(r) = Cr -o-i (3) The key observation here is that also for real-valued O < in general, z! C I-II_-l(k + o) ( + )o This means that we have a single reestimation equation * = ( + 0)- N+l (4) parameterized by the real-valued parameter O, with the asymptotic behavior Cr-~:r 0 # (5).f(r) = Ce 0= Although this correspondence was derived with the requirement that 0 <, we can in view of the discussion in Section 2. assume that is not only considerably larger than, but also greater than any fied value of 0. The etension to the negative real numbers is straightforward, although perhaps not very sensible. In fact, the convergence region for the cumulative of the frequency function as rank goes to infinity, oo f(r) or /(r) dr is 0 E [, 2), establishing Turing's formula and Zipf's law as the two etremes of this reestimation formula, in terms of resulting in a proper probability distribution for infinite populations; while the former does so, the latter does not. If 9 =, we have the Turing case with an eponentially declining asymptote, cf. Eq. (7). 75

4. Reversing the directions Finally, assuming the asymptotic behavior of Eq. (3), we rederive the recurrence equation (2). The mathematics are very similar to those used to rederive Turing's formula in Section 2.3. C t Inverting the asymptotic behavior f(r) = Cr-~=~ gives us r(f) - f0-, which in turn yields C tt r() - e- For notational convenience, let (2 denote 6 -, and assume that 0 < 0 #, i.e., - < (2 # O. ~+ +a+l ~ = I ~ ~(~+)-~(~+2)] (~+)- (~+2) +a+l 7(7-) = ;(TT T) = +(2+ ) (i ) (+l)~' --(+(2+l) (+l)a (+2)o ` _ (z+(2+ )(~ ( + )") + "b (2 +l ~ ( _._+_a (+2) a - (+l) "]- \(+l) a ~-a] (: : ) (+(2+l) ~ (+l) ~ ~ (z + )" y+(2 As before, the numerator can be written as g( + ) - g(), now for g(y) = (y + ) a ya- : I/ ~+(.- (a-- )y+ (22 -- ~ j. \ yo --T~-7-V)o-~--] dy./ ' [ (+a+)l~j-(+i). ) < I f~+l (2 dy (2- (~ (Y+l) ~ (y+l) ~+) +(2+ " " ( + )" I +l y+l (2 (2 +(2+l" [~+ a j~ y~+l dy /+l( )dy (2-., ~ (Y + ) a+i +(2+ [~+ Jz yc~+l dy (/S o+: ) (2- [ J v z~+2 dz dy + (2 + [+l J y~+l dy < < 76

/ =+I < [a 2-[."z y,~+2dy < [a 2-[. _ < [~2_[ - + a + Jz/z+l ya+ll dy - + a + - 2 This recaptures Eq. (2). Note that the derivation of Zipf's recurrence equation in Eq. (9) of Section 3 corresponds to the special case where a =, i.e., where 8 = 2. 5 Conclusions The relationship between Turing's formula and Zipf's law, which both concern population frequencies, was eplored in the present article. The asymptotic behavior of the relative frequency as a function of rank implicit in one interpretation of Turing's local reestimation formula was derived and compared with Zipf's law. While the latter relates the rank and relative frequency as asymptotically inversely proportional, the former states that the frequency declines eponentially with rank. This means that while Zipf's law implies a finite total population, Turing's formula yields a proper probability distribution also for infinite populations. In fact, it is tempting to interpret Turing's formula as smoothing the relative-frequency estimates towards a geometric distribution. This could potentially be used to improve sparsedata estimates by assuming a geometric distribution (tail), and introducing a ranking based on direct frequency counts, frequency counts when backing off to more general conditionings, order of appearance in the training data, or, to break any remaining ties, leicographical order. Conversely, a local reestimation formula in the vein of Turing's formula was derived from Zipf's law. Although the two equations are similar, Turing's formula shifts the frequency mass towards more frequent species. The two cases were generalized to a single spectrum of reestimarion formulas and corresponding asymptotes, parameterized by one real-valued parameter. Furthermore, the two cases correspond to the upper and lower bounds of this parameter for which the cumulative of the frequency function converges as rank tends to infinity. These results are in sharp contrast to common belief in the field; in [Baayen 99], for eample, we read: "Other models, such as Good (953)... have been put forward, all of which have Zipf's law as some special or limiting form." All of the Zipf-Simon-Mandelbrot distributions ehibit the same basic asymptotic behavior, C f(r) = r"'~ parameterized by the positive real-valued parameter 8- Comparing this with Eq. (5), we find that ~ - 8--Z- > 0 and thus 8 = + ~ >. In view of the established eponentially declining asymptote of the ideal Turing distribution, corresponding to 8 =, we can conclude that the latter is qualitatively different. Acknowledgements This article originated from inspiring discussions with David Milward and Slava Katz. Many thanks! Most of the work was done while the author was visiting IRCS at the University of Pennsylvania at the invitation of Aravind Joshi, and a number of New York pubs at the invitation of Jussi Karlgren, both of which was very much appreciated. I wish to thank Mark Lauer for helpful comments and suggestions to improvements, Seif Haridi for constituting the entire audience at a seminar on this work and focusing the question session on the convergence region of the parameter 0, and/~.ke Samuelsson for providing a bit of mathematical elegance. 77

I also gratefully acknowledge Rens Bod's encouraging comments and useful pointers to related work. Special credit is due to Mark Liberman for sharing his insights about Zipf's law, for drawing my attention to the Simon-Mandelbrot controversy, and for supplying various background material. This article, like others, has benefited greatly from comments by Khalil Sima'an. References [Baayen 99] Harald Baayen. 99. "A Stochastic Process for Word Frequency Distributions". In Proceedings of the 29th Annual Meeting of the Association for Computational Linguistics, pp. 27-278, ACL. [Good 953] I. J. Good. "The Population Frequencies of Species and the Estimation of Population Parameters". In Biometrika ~0(3~4), pp. 237-264, 953. [Katz 987] Slava M. Katz. "Estimation of Probabilities from Sparse Data for the Language Model Component of a Speech Recognizer". In IEEE Transactions on Acoustics, Speech, and Signal Processing 35(3), pp. 400-40, 987. [N das 985] Arthur N das. "On Turing's Formula for Word Probabilities". In IEEE Transactions on Acoustics, Speech, and Signal Processing 33(6), pp. 44-46, 985. [Zipf 935] G. K. Zipf. The Psychobiology off Language. Houghton Mifflin, Boston, 935. The Simon-Mandelbrot Dispute [Simon 955] Herbert A. Simon. "On a Class of Skew Distribution Functions". In Biometrika 42, pp. 425-440(?), 953. [Mandelbrot 959] Benoit Mandelbrot. "A Note on a Class of Skew Distribution Functions: Analysis and Critique of a Paper by H. A. Simon". In Information and Control 2, pp. 90-99, 959. [Simon 960] Herbert A. Simon. "Some Further Notes on a Class of Skew Distribution Functions". In Information and Control 3, pp. 80-88, 960. [Mandelbrot 96] Benoit Mandelbrot. "Final Note on a Class of Skew Distribution Functions = Analysis and Critique of a Model due to H. A. Simon". In Information and Control 4, pp. 98-???, 96. [Simon 96] Herbert A. Simon. "Reply to 'Final Note' by Benoit Mandelbrot". In Information and Control 4, PP. 27-223, 96. [Mandelbrot 96] Benoit Mandelbrot. "Post Scriptum to 'Final Note' ". In Information and Control 4, PP. 300-304(?), 96. [Simon 96] Herbert A. Simon. "Reply to Dr. Mandelbrot's Post Scriptum". In Information and Control 4, PP- 305-308, 96. 78