Gamma distribution

[2] There are two equivalent parameterizations in common use: In each of these forms, both parameters are positive real numbers.

The distribution has important applications in various fields, including econometrics, Bayesian statistics, life testing.

Bayesian statisticians prefer the (α,λ) parameterization, utilizing the gamma distribution as a conjugate prior for several inverse scale parameters, facilitating analytical tractability in posterior distribution computations.

Its mathematical properties, such as mean, variance, skewness, and higher moments, provide a toolset for statistical analysis and inference.

Practical applications of the distribution span several disciplines, underscoring its importance in theoretical and applied statistics.

[5] The parameterization with α and θ appears to be more common in econometrics and other applied fields, where the gamma distribution is frequently used to model waiting times.

For instance, in life testing, the waiting time until death is a random variable that is frequently modeled with a gamma distribution.

A random variable X that is gamma-distributed with shape α and rate λ is denoted

A random variable X that is gamma-distributed with shape α and scale θ is denoted by

The skewness of the gamma distribution only depends on its shape parameter, α, and it is equal to

Unlike the mode and the mean, which have readily calculable formulas based on the parameters, the median does not have a closed-form equation.

A rigorous treatment of the problem of determining an asymptotic expansion and bounds for the median of the gamma distribution was handled first by Chen and Rubin, who proved that (for

Berg and Pedersen also proved many properties of the median, showing that it is a convex function of α,[12] and that the asymptotic behavior near

only, was provided in 2021 by Gaunt and Merkle,[13] relying on the Berg and Pedersen result that the slope of

by taking the max with the chord shown in the figure, since the median was proved convex.

He conjectured values of A and B for which this approximation is an asymptotically tight upper or lower bound for all

can be regarded as the inverse of Lévy's stability parameter in the stable count distribution:

Finding the maximum with respect to α by taking the derivative and setting it equal to zero yields

There exist consistent closed-form estimators of α and θ that are derived from the likelihood of the generalized gamma distribution.

Integration with respect to θ can be carried out using a change of variables, revealing that 1/θ is gamma-distributed with parameters α = Nα, λ = y.

which shows that the mean ± standard deviation estimate of the posterior distribution for θ is

Then the waiting time for the n-th event to occur is the gamma distribution with integer shape

[38][39] In bacterial gene expression where protein production can occur in bursts, the copy number of a given protein often follows the gamma distribution, where the shape and scale parameters are, respectively, the mean number of bursts per cell cycle and the mean number of protein molecules produced per burst.

[40] In genomics, the gamma distribution was applied in peak calling step (i.e., in recognition of signal) in ChIP-chip[41] and ChIP-seq[42] data analysis.

Maximum likelihood and Bayesian methods typically use a discrete approximation to the continuous gamma distribution.

[44][45] Given the scaling property above, it is enough to generate gamma variables with θ = 1, as we can later convert to any value of λ with a simple division.

Random generation of gamma variates is discussed in detail by Devroye,[46]: 401–428  noting that none are uniformly fast for all shape parameters.

While the above approach is technically correct, Devroye notes that it is linear in the value of α and generally is not a good choice.

generates a gamma distributed random number in time that is approximately constant with &alpha.

In Matlab numbers can be generated using the function gamrnd(), which uses the α, θ representation.

Illustration of the gamma PDF for parameter values over α and x with θ set to 1, 2, 3, 4, 5, and 6 . One can see each θ layer by itself here [2] as well as by α [3] and x . [4] .
Bounds and asymptotic approximations to the median of the gamma distribution. The cyan-colored region indicates the large gap between published lower and upper bounds before 2021.
Two gamma distribution median asymptotes which were proved in 2023 to be bounds (upper solid red and lower dashed red), of the from , and an interpolation between them that makes an approximation (dotted red) that is exact at α = 1 and has maximum relative error of about 0.6%. The cyan shaded region is the remaining gap between upper and lower bounds (or conjectured bounds), including these new bounds and the bounds in the previous figure.
Log–log plot of upper (solid) and lower (dashed) bounds to the median of a gamma distribution and the gaps between them. The green, yellow, and cyan regions represent the gap before the Lyon 2021 paper. The green and yellow narrow that gap with the lower bounds that Lyon proved. Lyon's bounds proved in 2023 further narrow the yellow. Mostly within the yellow, closed-form rational-function-interpolated conjectured bounds are plotted along with the numerically calculated median (dotted) value. Tighter interpolated bounds exist but are not plotted, as they would not be resolved at this scale.
Illustration of the Kullback–Leibler (KL) divergence for two gamma PDFs. Here λ = λ 0 + 1 which are set to 1, 2, 3, 4, 5, and 6 . The typical asymmetry for the KL divergence is clearly visible.