Probabilities.ZipfCDF Method

Overload List

#SignatureDescription
1procedure ZipfCDF(const X: TMtxVecInt; s: Double; N: Integer; const Res: TDenseMtxVec);Zipf distribution CDF (vectorized).
2function ZipfCDF(x: Integer; s: Double; N: Integer): Double;Zipf (finite/truncated) cumulative distribution function (CDF).

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

Zipf distribution CDF (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 CDF 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 ZipfCDF(x: Integer; s: Double; N: Integer): Double;

Zipf (finite/truncated) cumulative distribution function (CDF).

#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 cumulative distribution function (CDF) 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 CDF P(X <= x):

CDF(x| s,N)=H(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.ZipfPDF, Probabilities.ZipfCDFInv