This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

ZipfDistribution

Updated In 8 Graphic
ZipfDistribution[]
represents a zeta distribution with parameter .
ZipfDistribution
represents a Zipf distribution with range n.
  • The probability for value and finite is given by and for infinite given by .
  • ZipfDistribution allows to be any positive real number and n any positive integer.
Probability density function:
With finite range:
Cumulative distribution function:
With finite range:
Mean:
Variance:
Probability density function:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
With finite range:
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input
Out[5]=
 
Cumulative distribution function:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
With finite range:
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input
Out[5]=
 
Mean:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
 
Variance:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Generate a set of pseudorandom numbers that have a Zipf distribution:
Compare its histogram to the PDF:
Distribution parameters estimation:
Estimate the distribution parameters from sample data:
Compare the density histogram of the sample with the PDF of the estimated distribution:
Skewness:
In the limit, skewness is infinite:
Skewness attains its minimum:
With range n:
Kurtosis:
In the limit, kurtosis is infinite:
Kurtosis attains its minimum:
With range n:
Different moments with closed forms as functions of parameters:
Moment has closed form:
With range n:
Closed form for symbolic order:
With range n:
With range n:
With range n:
Hazard function:
With range n:
Quantile function:
With range n:
CDF of ZipfDistribution is an example of a right-continuous function:
The word count in a text follows Zipf distribution:
Fit a ZipfDistribution to the word frequency data:
Compare the frequency histogram with the estimated distribution:
Find the probability that a word appears more than 10 times:
Find the average number of word occurrences:
Rank 15 web pages according to popularity. The access frequencies follow Zipf distribution with . Find the distribution of access frequencies:
Find the probability of the top-ranked site request:
Find the probability of the request for one of the bottom five websites:
Simulate 30 independent requests:
An online movie rental website has 2000 titles, keeping the most popular ones in cache to provide faster service. Find the minimum number of titles that must be in cache, so that with probability 0.99, a requested movie is in the cache:
ZipfDistribution can be used to model the distribution of GCD between random numbers:
Create a random sample:
Fit a Zipf distribution to the data:
Fit a Zipf distribution with a range to the data:
Compare the histogram of the sample with both estimated distributions:
Compare log-likelihoods:
The finite range condition significantly changes the distribution statistics:
And the standard deviations:
Medians are the same:
The number of dead and injured in a terrorist attack follows ZipfDistribution:
Fit a Zipf distribution to the data:
Compare the histogram of the data with the PDF of the estimated distribution:
The probability of getting any real number except a positive integer is zero:
The probability mass and random variable have a power-law relationship:
The relative frequency of the ^(th) value to the first value in Zipf distribution is the power of :
In the limit, the second value will have the frequency of the first value, the third value will have the frequency of the first value, etc.
Zipf distribution is closed under truncation:
With range:
Relationships to other distributions:
Both Zipf distributions become equal in the limit:
ZipfDistribution is not defined when is non-positive:
Substitution of invalid parameters into symbolic outputs gives results that are not meaningful:
New in 6 | Last modified in 8