mean_var_hp function

Mean and variance for hyper-Poisson distribution

Mean and variance for hyper-Poisson distribution

This function calculates the mean and variance for the hyper-Poisson distribution with parameters μ\mu and σ\sigma.

mean_var_hp(mu, sigma) mean_var_hp2(mu, sigma)

Arguments

  • mu: value of the mu parameter.
  • sigma: value of the sigma parameter.

Returns

the function returns a list with the mean and variance.

Details

The hyper-Poisson distribution with parameters μ\mu and σ\sigma

has a support 0, 1, 2, ... and density given by

f(xμ,σ)=μx1F1(1;μ;σ)Γ(σ)Γ(x+σ)f(x | \mu, \sigma) = \frac{\mu^x}{_1F_1(1;\mu;\sigma)}\frac{\Gamma(\sigma)}{\Gamma(x+\sigma)}

where the function 1F1(a;c;z)_1F_1(a;c;z) is defined as

1F1(a;c;z)=r=0(a)r(c)rzrr!_1F_1(a;c;z) = \sum_{r=0}^{\infty}\frac{(a)_r}{(c)_r}\frac{z^r}{r!}

and (a)r=γ(a+r)γ(a)(a)_r = \frac{\gamma(a+r)}{\gamma(a)} for a>0a>0 and rr positive integer.

This function calculates the mean and variance of this distribution.

Examples

# Example 1 # Theoretical values mean_var_hp(mu=5.5, sigma=0.1) # Using simulated values y <- rHYPERPO(n=1000, mu=5.5, sigma=0.1) mean(y) var(y) # Example 2 # Theoretical values mean_var_hp2(mu=5.5, sigma=1.9) # Using simulated values y <- rHYPERPO2(n=1000, mu=5.5, sigma=1.9) mean(y) var(y)

References

\insertRef saez2013hyperpoDiscreteDists

See Also

HYPERPO .

Author(s)

Freddy Hernandez, fhernanb@unal.edu.co

  • Maintainer: Freddy Hernandez-Barajas
  • License: MIT + file LICENSE
  • Last published: 2024-09-13