Learn R Programming

zipfextR (version 1.0.2)

zipfpeMean: Expected value of the Zipf-PE distribution.

Description

Computes the expected value of the Zipf-PE distribution for given values of parameters \(\alpha\) and \(\beta\).

Usage

zipfpeMean(alpha, beta, tolerance = 10^(-4))

Arguments

alpha

Value of the \(\alpha\) parameter (\(\alpha > 2\)).

beta

Value of the \(\beta\) parameter (\(\beta \in (-\infty, +\infty)\)).

tolerance

Tolerance used in the calculations (default = \(10^{-4}\)).

Value

A positive real value corresponding to the mean value of the Zipf-PE distribution.

Details

The mean of the distribution only exists for \(\alpha\) strictly greater than 2. It is computed by calculating the partial sums of the serie, and stopping when two consecutive partial sums differ less than the tolerance value. The value of the last partial sum is returned.

Examples

Run this code
# NOT RUN {
zipfpeMean(2.5, 1.3)
zipfpeMean(2.5, 1.3, 10^(-3))
# }

Run the code above in your browser using DataLab