moezipfR.mean: Expected value.

Description Usage Arguments Details Value Examples

View source: R/moezipfR.mean.R

Description

Computes the expected value of the MOEZipf distribution for given values of parameters α and β.

Usage

1
moezipfR.mean(alpha, beta, tolerance = 10^(-4))

Arguments

alpha

Value of the α parameter (α > 2).

beta

Value of the β parameter (β > 0).

tolerance

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

Details

The expected value of the MOEZipf distribution only exists for α values strictly greater than 2. In this case, if Y is a random variable that follows a MOEZipf distribution with parameters α and β, the expected value is computed as:

E(Y) = ∑_{x = 1} ^∞ \frac{β ζ(α) x^{-α + 1}}{[ζ(α) - \bar{β}ζ(α, x)][ζ(α) - \bar{β}ζ(α, x + 1)]}\,, α > 2\,, β > 0

The mean is computed calculating the partial sums of the serie, and it stops when two consecutive partial sums differs less than the tolerance value. The last partial sum is returned.

Value

A positive real value corresponding to the mean value of the distribution.

Examples

1
2
moezipfR.mean(2.5, 1.3)
moezipfR.mean(2.5, 1.3, 10^(-3))

moezipfR documentation built on May 2, 2019, 3:25 a.m.