gbeta {giniVarCI}R Documentation

Gini index for the Beta distribution with user-defined shape parameters

Description

Calculates the Gini index for the Beta distribution with shape parameters aa (shape1) and bb (shape2).

Usage

gbeta(shape1, shape2)

Arguments

shape1

A positive real number specifying the shape1 parameter aa of the Beta distribution.

shape2

A positive real number specifying the shape2 parameter bb of the Beta distribution.

Details

The Beta distribution with shape parameters aa (argument shape1) and bb (argument shape2) and denoted as Beta(a,b)Beta(a,b), where a>0a>0 and b>0b>0, has a probability density function given by (Kleiber and Kotz, 2003; Johnson et al., 1995; Yee, 2022)

f(y)=1B(a,b)ya1(1y)b1,f(y) = \displaystyle \frac{1}{B(a,b)}y^{a-1}(1-y)^{b-1},

and a cumulative distribution function given by

F(y)=B(y;a,b)B(a,b)F(y)= \displaystyle \frac{B(y;a,b)}{B(a,b)}

where 0y10 \leq y \leq 1,

B(a,b)=Γ(a)Γ(b)Γ(a+b)B(a,b) = \displaystyle \frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)}

is the beta function,

Γ(α)=0tα1etdt\Gamma(\alpha) = \int_{0}^{\infty}t^{\alpha-1}e^{-t}dt

is the gamma function, and

B(y;a,b)=0yta1(1t)b1dtB(y;a,b) = \displaystyle \int_{0}^{y}t^{a-1}(1-t)^{b-1}dt

is the incomplete beta function.

The Gini index can be computed as

G=2aB(a+b,a+b)B(a,a)B(b,b).G = \displaystyle \frac{2}{a}\frac{B(a+b,a+b)}{B(a,a)B(b,b)}.

Value

A numeric value with the Gini index. A NA is returned when a shape parameter is non-numeric or non-positive.

Author(s)

Juan F Munoz jfmunoz@ugr.es

Jose M Pavia pavia@uv.es

Encarnacion Alvarez encarniav@ugr.es

References

Kleiber, C. and Kotz, S. (2003). Statistical Size Distributions in Economics and Actuarial Sciences, Hoboken, NJ, USA: Wiley-Interscience.

Johnson, N. L., Kotz, S. and Balakrishnan, N. (1995). Continuous Univariate Distributions, volume 1, chapter 14. Wiley, New York.

Yee, T. W. (2022). VGAM: Vector Generalized Linear and Additive Models. R package version 1.1-7, https://CRAN.R-project.org/package=VGAM.

See Also

gf, gunif, gweibull, ggamma, gchisq

Examples

# Gini index for the Beta distribution with shape parameters 'a = 2' and 'b = 1'.
gbeta(shape1 = 2, shape2 = 1)

# Gini index for the Beta distribution with shape parameters 'a = 1' and 'b = 2'.
gbeta(shape1 = 1, shape2 = 2)

[Package giniVarCI version 0.0.1-3 Index]