Probabilities.ZipfPDF Method

Overload List

#SignatureDescription
1procedure ZipfPDF(const X: TMtxVecInt; s: Double; N: Integer; const Res: TDenseMtxVec);Zipf distribution PDF (vectorized).
2function ZipfPDF(x: Integer; s: Double; N: Integer): Double;Zipf (finite/truncated) probability mass function (PMF).

Overload 1: procedure ZipfPDF(const X: TMtxVecInt; s: Double; N: Integer; const Res: TDenseMtxVec);

Zipf distribution PDF (vectorized).

#NameDescription
1XDefines distribution domain, real vector or matrix with integer values on interval [1,Inf).
2sDistribution parameter, real positive value.
3NDistribution parameter, positive integer.
4ResAfter calculation stores the PDF calculated from X,s and N. Length and Complex properties of Res are adjusted automatically to match Length and Complex properties of X.

Result: stored in self (calling object)

Overload 2: function ZipfPDF(x: Integer; s: Double; N: Integer): Double;

Zipf (finite/truncated) probability mass function (PMF).

#NameDescription
1xFunction domain, positive integer on the closed interval [1,N].
2sExponent (shape) parameter, real positive value.
3NNumber of elements (support upper bound), positive integer.

Returns: Double - the finite Zipf probability mass function (PMF) at x using parameters s and N. Returns NAN when s<=0, N<=0, or x outside [1,N].

Remarks:

Computes the finite (truncated) Zipf PMF over the rank support 1,...,N:

PMF(x| s,N)=(1/x^s)/H(N,s), H(N,s)=sum_(k=1)^N1/k^s

where H(N,s)H(N,s) is the generalized harmonic number. Domain: x in {1,...,N}, s>0, N>0; otherwise the result is NaN.

See Also: Probabilities.ZipfCDF, Probabilities.ZipfCDFInv