Zipf's Law
Also Zipf
Zipf's law is the empirical observation that the frequency F_n of the n-th most frequent word of a text collection follows a power law F_n = C · n^(−α), i.e. a falling straight line in a log-log plot.
Formula#
Taking logarithms on both sides:
ProofStraight line in the log-log plot (exam WS 21/22, Task 2.1)
In the plain plot, and . Then . With on the x-axis and on the y-axis this is : a straight line with slope and intercept .
Fitting and when the law holds exactly (frequencies sorted descending, ):
- , so .
- , so .
- Check for .
Properties#
- In the plain plot ( against ) the curve looks like a hyperbola: there are only a few very frequent words, and most words are rare (long tail).
- Frequency here is the collection frequency (sum of the term frequencies over all documents), not the document frequency .
- One way to estimate the number of web pages is based on Zipf’s law (DBIS_VL01 > Keyword Search: Problem and Naive Solution).
Example#
Sources#
- Slides 01, p. 22
- DBIS_VL01 > Zipf’s Law
- Exams: DBIS Exam WS1920 (not published) Task 1.1, DBIS Exam WS2122 (not published) Task 2.1, DBIS Exam WS2324 (not published) Task 1.1, DBIS Exam WS2324-2 (not published) Task 1.3 (1)