zipfpssVariance {zipfextR}R Documentation

Variance of the Zipf-PSS distribution.

Description

Computes the variance of the Zipf-PSS distribution for given values of parameters \alpha and \lambda.

Usage

zipfpssVariance(alpha, lambda, isTruncated = FALSE)

Arguments

alpha

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

lambda

Value of the \lambda parameter (\lambda > 0).

isTruncated

Logical; if TRUE Use the zero-truncated version of the distribution to calculate the expected value (default = FALSE).

Details

The variance of the Zipf-PSS distribution only exists for \alpha values strictly greater than 3. The value is obtained from the law of total variance that says that:

Var[Y] = E[N]\, Var[X] + E[X]^2 \, Var[N],

where X follows a Zipf distribution with parameter \alpha, and N follows a Poisson distribution with parameter \lambda. From where one has that:

Var[Y] = \lambda\, \frac{\zeta(\alpha - 2)}{\zeta(\alpha)}

Particularlly, if one is working with the zero-truncated version of the Zipf-PSS distribution. This values is computed as:

Var[Y^{ZT}] = \frac{\lambda\, \zeta(\alpha)\, \zeta(\alpha - 2)\, (1 - e^{-\lambda}) - \lambda^2 \, \zeta(\alpha - 1)^2 \, e^{-\lambda}}{\zeta(\alpha)^2 \, (1 - e^{-\lambda})^2}

Value

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

References

Sarabia Alegría, JM. and Gómez Déniz, E. and Vázquez Polo, F. Estadística actuarial: teoría y aplicaciones. Pearson Prentice Hall.

Examples

zipfpssVariance(4.5, 2.3)
zipfpssVariance(4.5, 2.3, TRUE)

[Package zipfextR version 1.0.2 Index]