The Weibull distribution with scale parameter \(\sigma\), shape parameter \(a\), and denoted as \(Weibull(\sigma, a)\), where \(\sigma>0\) and \(a>0\), has a probability density function given by (Kleiber and Kotz, 2003; Johnson et al., 1995; Yee, 2022)
$$f(y) = \displaystyle \frac{a}{\sigma}\left(\frac{y}{\sigma}\right)^{a-1}e^{-(y/\sigma)^{a}},$$ and a cumulative distribution function given by
$$F(y) = \displaystyle 1 - e^{-(y/\sigma)^{a}},$$
where \(y \geq 0\).
The Gini index can be computed as
$$G = 1-2^{-1/a}.$$
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.
# Gini index for the Weibull distribution with 'shape = 1'.gweibull(shape = 1)
# Gini indices for the Weibull distribution and different shape parameters.gweibull(shape = 1:10)