All Topics  
Gamma distribution

 

   Email Print
   Bookmark   Link






 

Gamma distribution



 
 
In probability theory
Probability theory

Probability theory is the branch of mathematics concerned with analysis of Statistical randomness phenomena. The central objects of probability theory are random variables, stochastic processes, and event s: mathematical abstractions of determinism events or measured quantities that may either be single occurrences or evolve over time in an a...
 and statistics
Statistics

Statistics is a Mathematics pertaining to the collection, analysis, interpretation or explanation, and presentation of data. It also provides tools for prediction and forecasting based on data....
, the gamma distribution is a two-parameter family of continuous probability distribution
Probability distribution

In probability theory and statistics, a probability distribution identifies either the probability of each value of an unidentified random variable , or the probability of the value falling within a particular interval ....
s. It has a scale parameter
Scale parameter

In probability theory and statistics, a scale parameter is a special kind of numerical parameter of a parametric family of probability distributions....
 θ and a shape parameter
Shape parameter

In probability theory and statistics, a shape parameter is a kind of numerical parameter of a parametric family of probability distributions....
 k. If k is an integer
Integer

The integers are natural numbers including 0 and their negative and non-negative numberss . They are numbers that can be written without a fractional or decimal component, and fall within the set ....
 then the distribution represents the sum of k independent exponentially distributed
Exponential distribution

In probability theory and statistics, the exponential distributions are a class of continuous probability distributions. They describe the times between events in a Poisson process, i.e....
 random variables, each of which has a mean of θ (which is equivalent to a rate parameter of θ −1) .

ndom variable X that is gamma-distributed with scale θ and shape k is denoted
probability density function
Probability density function

In mathematics, a probability density function is a function that represents a probability distribution in terms of integrals.Formally, a probability distribution has density ƒ, if ƒ is a non-negative Lebesgue integration function such that the probability of the interval [ab] is given by...
 of the gamma distribution can be expressed in terms of the gamma function
Gamma function

In mathematics, the Gamma function is an extension of the factorial function to real number and complex number numbers. For a complex number z with positive real part the Gamma function is defined by...
 parameterized in terms of a shape parameter k and scale parameter θ. Both k and θ will be positive values.

The equation defining the probability density function of a gamma-distributed random variable is

(This parameterization is used in the infobox and the plots.)

Alternatively, the gamma distribution can be parameterized in terms of a shape parameter α = k and an inverse scale parameter β = 1/θ, called a rate parameter:

If α is a positive integer, then



Both parameterizations are common because either can be more convenient depending on the situation.

e β = 1/θ.

Summation
If Xi has a Γ(ki, θ) distribution for i = 1, 2, ..., N, then

provided all Xi' are independent
Statistical independence

In probability theory, to say that two event s are independent intuitively means that the occurrence of one event makes it neither more nor less probable that the other occurs....
.

The gamma distribution exhibits infinite divisibility
Infinite divisibility (probability)

The concepts of infinite divisibility and the Decomposable distributions arise in probability and statistics in relation to seeking families of probability distributions that might be a natural choice in certain applications, in the same way that the normal distribution is....
.

any
t > 0 it holds that tX is distributed Γ(ktθ), demonstrating that θ is a scale parameter
Scale parameter

In probability theory and statistics, a scale parameter is a special kind of numerical parameter of a parametric family of probability distributions....
.

Information entropy The information entropy
Information entropy

In information theory, entropy is a measure of the uncertainty associated with a random variable. The term by itself in this context usually refers to the Shannon entropy, which quantifies, in the sense of an expected value, the self-information contained in a message, usually in units such as bits....
 is given by







where ψ(
k) is the digamma function
Digamma function

In mathematics, the digamma function is defined as the logarithmic derivative of the gamma function:It is the first of the polygamma functions....
.

directed Kullback–Leibler divergence
Kullback–Leibler divergence

In probability theory and information theory, the Kullback?Leibler divergence is a non-commutative measure of the difference between two probability distributions P and Q....
 between Γ(α0, β0) ('true' distribution) and Γ(α, β) ('approximating' distribution) is given by

Laplace transform
Laplace transform

In mathematics, the Laplace transform is one of the best known and most widely used integral transforms. It is commonly used to produce an easily solvable algebraic equation from an ordinary differential equation....
 of the gamma PDF is

which we calculate the log-likelihood function

Finding the maximum with respect to
θ by taking the derivative and setting it equal to zero yields the maximum likelihood
Maximum likelihood

Maximum likelihood estimation is a popular statistics method used for fitting a mathematical model to data. The modeling of real world data using estimation by maximum likelihood offers a way of tuning the free parameters of the model to provide a good fit....
 estimator of the θ parameter:

Substituting this into the log-likelihood function gives

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

where



is the digamma function
Digamma function

In mathematics, the digamma function is defined as the logarithmic derivative of the gamma function:It is the first of the polygamma functions....
.

There is no closed-form solution for
k.






Discussion
Ask a question about 'Gamma distribution'
Start a new discussion about 'Gamma distribution'
Answer questions from other users
Full Discussion Forum



Encyclopedia


In probability theory
Probability theory

Probability theory is the branch of mathematics concerned with analysis of Statistical randomness phenomena. The central objects of probability theory are random variables, stochastic processes, and event s: mathematical abstractions of determinism events or measured quantities that may either be single occurrences or evolve over time in an a...
 and statistics
Statistics

Statistics is a Mathematics pertaining to the collection, analysis, interpretation or explanation, and presentation of data. It also provides tools for prediction and forecasting based on data....
, the gamma distribution is a two-parameter family of continuous probability distribution
Probability distribution

In probability theory and statistics, a probability distribution identifies either the probability of each value of an unidentified random variable , or the probability of the value falling within a particular interval ....
s. It has a scale parameter
Scale parameter

In probability theory and statistics, a scale parameter is a special kind of numerical parameter of a parametric family of probability distributions....
 θ and a shape parameter
Shape parameter

In probability theory and statistics, a shape parameter is a kind of numerical parameter of a parametric family of probability distributions....
 k. If k is an integer
Integer

The integers are natural numbers including 0 and their negative and non-negative numberss . They are numbers that can be written without a fractional or decimal component, and fall within the set ....
 then the distribution represents the sum of k independent exponentially distributed
Exponential distribution

In probability theory and statistics, the exponential distributions are a class of continuous probability distributions. They describe the times between events in a Poisson process, i.e....
 random variables, each of which has a mean of θ (which is equivalent to a rate parameter of θ −1) .

Characterization

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

Probability density function

The probability density function
Probability density function

In mathematics, a probability density function is a function that represents a probability distribution in terms of integrals.Formally, a probability distribution has density ƒ, if ƒ is a non-negative Lebesgue integration function such that the probability of the interval [ab] is given by...
 of the gamma distribution can be expressed in terms of the gamma function
Gamma function

In mathematics, the Gamma function is an extension of the factorial function to real number and complex number numbers. For a complex number z with positive real part the Gamma function is defined by...
 parameterized in terms of a shape parameter k and scale parameter θ. Both k and θ will be positive values.

The equation defining the probability density function of a gamma-distributed random variable is

(This parameterization is used in the infobox and the plots.)

Alternatively, the gamma distribution can be parameterized in terms of a shape parameter α = k and an inverse scale parameter β = 1/θ, called a rate parameter:

If α is a positive integer, then



Both parameterizations are common because either can be more convenient depending on the situation.

Cumulative distribution function


The cumulative distribution function
Cumulative distribution function

In probability theory and statistics, the cumulative distribution function or just distribution function, completely describes the probability distribution of a real-valued random variable X....
 is the regularized gamma function, which can be expressed in terms of the incomplete gamma function
Incomplete gamma function

In mathematics, the gamma function is defined by a integral. The incomplete gamma function is defined as an integral function of the same integral....
,

It can also be expressed as follows, if k is an integer
Integer

The integers are natural numbers including 0 and their negative and non-negative numberss . They are numbers that can be written without a fractional or decimal component, and fall within the set ....
 (i.e., the distribution is an Erlang distribution
Erlang distribution

The Erlang distribution is a continuous probability distribution with wide applicability primarily due to its relation to the exponential distribution and Gamma distribution distributions....
):

where β = 1/θ.

Properties


Summation


If Xi has a Γ(ki, θ) distribution for i = 1, 2, ..., N, then

provided all Xi' are independent
Statistical independence

In probability theory, to say that two event s are independent intuitively means that the occurrence of one event makes it neither more nor less probable that the other occurs....
.

The gamma distribution exhibits infinite divisibility
Infinite divisibility (probability)

The concepts of infinite divisibility and the Decomposable distributions arise in probability and statistics in relation to seeking families of probability distributions that might be a natural choice in certain applications, in the same way that the normal distribution is....
.

Scaling

For any
t > 0 it holds that tX is distributed Γ(ktθ), demonstrating that θ is a scale parameter
Scale parameter

In probability theory and statistics, a scale parameter is a special kind of numerical parameter of a parametric family of probability distributions....
.

Exponential family


The Gamma distribution is a two-parameter exponential family
Exponential family

In theory of probability and statistics, an exponential family is a class of probability distributions sharing a certain form, specified below. It is said that such distributions belong to the exponential class of density functions....
 with natural parameters
k − 1 and −1/θ, and natural statistics X and ln (X).

Information entropy

The information entropy
Information entropy

In information theory, entropy is a measure of the uncertainty associated with a random variable. The term by itself in this context usually refers to the Shannon entropy, which quantifies, in the sense of an expected value, the self-information contained in a message, usually in units such as bits....
 is given by







where ψ(
k) is the digamma function
Digamma function

In mathematics, the digamma function is defined as the logarithmic derivative of the gamma function:It is the first of the polygamma functions....
.

Kullback–Leibler divergence

The directed Kullback–Leibler divergence
Kullback–Leibler divergence

In probability theory and information theory, the Kullback?Leibler divergence is a non-commutative measure of the difference between two probability distributions P and Q....
 between Γ(α0, β0) ('true' distribution) and Γ(α, β) ('approximating' distribution) is given by

Laplace transform

The Laplace transform
Laplace transform

In mathematics, the Laplace transform is one of the best known and most widely used integral transforms. It is commonly used to produce an easily solvable algebraic equation from an ordinary differential equation....
 of the gamma PDF is

Parameter estimation


Maximum likelihood estimation


The likelihood function for
N iid
Independent and identically-distributed random variables

In probability theory and statistics, a sequence or other collection of random variables is independent and identically distributed if each has the same probability distribution as the others and all are mutually statistical independence....
 observations (
x1, ..., xN) is

from which we calculate the log-likelihood function

Finding the maximum with respect to
θ by taking the derivative and setting it equal to zero yields the maximum likelihood
Maximum likelihood

Maximum likelihood estimation is a popular statistics method used for fitting a mathematical model to data. The modeling of real world data using estimation by maximum likelihood offers a way of tuning the free parameters of the model to provide a good fit....
 estimator of the θ parameter:

Substituting this into the log-likelihood function gives

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

where



is the digamma function
Digamma function

In mathematics, the digamma function is defined as the logarithmic derivative of the gamma function:It is the first of the polygamma functions....
.

There is no closed-form solution for
k. The function is numerically very well behaved, so if a numerical solution is desired, it can be found using, for example, Newton's method
Newton's method

In numerical analysis, Newton's method is perhaps the best known method for finding successively better approximations to the zeroes of a Real number-valued function ....
. An initial value of
k can be found either using the method of moments
Method of moments (statistics)

In statistics, the method of moments is a method of estimation of population parameters such as mean, variance, median, etc. , by equating sample moment with unobservable population moments and then solving those equations for the quantities to be estimated....
, or using the approximation

If we let

then
k is approximately

which is within 1.5% of the correct value. An explicit form for the Newton-Raphson update of this initial guess is given by Choi and Wette (1969) as the following expression:

where denotes the trigamma function (the derivative of the digamma function).

The digamma and trigamma functions can be difficult to calculate with high precision. However, approximations known to be good to several significant figures can be computed using the following approximation formulae:

and

For details, see Choi and Wette (1969).

Bayesian minimum mean-squared error


With known
k and unknown , the posterior PDF for theta (using the standard scale-invariant prior for ) is

Denoting

Integration over θ can be carried out using a change of variables, revealing that 1/θ is gamma-distributed with parameters .

The moments can be computed by taking the ratio (
m by m = 0)

which shows that the mean +/- standard deviation estimate of the posterior distribution for theta is

+/-

Generating gamma-distributed random variables


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

Using the fact that a Γ(1, 1) distribution is the same as an Exp(1) distribution, and noting the method of generating exponential variables
Exponential distribution

In probability theory and statistics, the exponential distributions are a class of continuous probability distributions. They describe the times between events in a Poisson process, i.e....
, we conclude that if
U is uniformly distributed
Uniform distribution (continuous)

In probability theory and statistics, the continuous uniform distribution is a family of probability distributions such that for each member of the family, all interval s of the same length on the distribution's support are equally probable....
 on (0, 1], then −ln(
U) is distributed Γ(1, 1). Now, using the "α-addition" property of gamma distribution, we expand this result:

where
Uk are all uniformly distributed on (0, 1] and independent
Statistical independence

In probability theory, to say that two event s are independent intuitively means that the occurrence of one event makes it neither more nor less probable that the other occurs....
.

All that is left now is to generate a variable distributed as Γ(δ, 1) for 0 < δ < 1 and apply the "α-addition" property once more. This is the most difficult part.

We provide an algorithm without proof. It is an instance of the acceptance-rejection method
Rejection sampling

In mathematics, rejection sampling is a technique used to generate observations from a probability distribution. It is also commonly called the acceptance-rejection method or "accept-reject algorithm"....
:

  1. Let m be 1.
  2. Generate , and — independent uniformly distributed on (0, 1] variables.
  3. If , where , then go to step 4, else go to step 5.
  4. Let . Go to step 6.
  5. Let .
  6. If , then increment m and go to step 2.
  7. Assume to be the realization of
Now, to summarize,

where [
k] is the integral part of k, and ξ has been generated using the algorithm above with δ = (the fractional part of k), Uk and Vl are distributed as explained above and are all independent.

The GNU Scientific Library
GNU Scientific Library

In computing, the GNU Scientific Library is a software library written in the C for numerical calculations in applied mathematics and science....
 has robust routines for sampling many distributions including the Gamma distribution.

Related distributions


Specializations

  • If , then X has an exponential distribution
    Exponential distribution

    In probability theory and statistics, the exponential distributions are a class of continuous probability distributions. They describe the times between events in a Poisson process, i.e....
     with rate parameter λ.
  • If , then X is identical to χ2(ν), the chi-square distribution
    Chi-square distribution

    In probability theory and statistics, the chi-square distribution is one of the most widely used theoretical probability distributions in inferential statistics, e.g., in statistical significance tests....
     with
    ν degrees of freedom.
  • If is an integer
    Integer

    The integers are natural numbers including 0 and their negative and non-negative numberss . They are numbers that can be written without a fractional or decimal component, and fall within the set ....
    , the gamma distribution is an Erlang distribution
    Erlang distribution

    The Erlang distribution is a continuous probability distribution with wide applicability primarily due to its relation to the exponential distribution and Gamma distribution distributions....
     and is the probability distribution of the waiting time until the -th "arrival" in a one-dimensional Poisson process
    Poisson process

    A Poisson process, named after the French mathematician Sim?on-Denis Poisson , is the stochastic process in which events occur continuously and memorylessness ....
     with intensity 1/θ.
  • If , then X has a Maxwell-Boltzmann distribution with parameter a.


  • , then


Others

  • If X has a Γ(k, θ) distribution, then 1/X has an inverse-gamma distribution
    Inverse-gamma distribution

    In probability theory and statistics, the inverse gamma distribution is a two-parameter family of continuous probability distributions on the positive real line, which is the distribution of the multiplicative inverse of a variable distributed according to the gamma distribution....
     with parameters
    k and θ-1.
  • If X and Y are independently distributed Γ(α, θ) and Γ(β, θ) respectively, then X / (X + Y) has a beta distribution
    Beta distribution

    In probability theory and statistics, the beta distribution is a family of continuous probability distributions defined on the interval [0, 1] parameterized by two positive shape parameters, typically denoted by α and β....
     with parameters α and β.
  • If Xi are independently distributed Γ(αi,θ) respectively, then the vector (X1 / S, ..., Xn / S), where S = X1 + ... + Xn, follows a Dirichlet distribution
    Dirichlet distribution

    In probability and statistics, the Dirichlet distribution , often denoted Dir, is a family of Continuous probability distribution multivariate random variable probability distributions parametrized by the vector α of positive real number....
     with parameters α1, ..., α
    n.
  • For large k the gamma distribution converges to Gaussian distribution with mean and variance .
  • The Gamma distribution is the conjugate prior
    Conjugate prior

    In Bayesian probability theory, a class of prior probability distributions p is said to be conjugate to a class of likelihood functions p if the resulting posterior probability p are in the same family as p; the prior and posterior are then called conjugate distributions, and the prior is called a conjugate prior f...
     for the precision of the normal distribution
    Normal distribution

    The normal distribution, also called the Gaussian distribution, is an important family of continuous probability distributions, applicable in many fields....
     with known mean
    Mean

    In statistics, mean has two related meanings:* the arithmetic mean .* the expected value of a random variable, which is also called the population mean....
    .
  • The Wishart distribution
    Wishart distribution

    In statistics, the Wishart distribution, named in honor of John Wishart , is a generalization to multiple dimensions of the chi-square distribution, or, in the case of non-integer degrees of freedom, of the gamma distribution....
     is a multivariate generalization of the Gamma distribution (samples are positive-definite matrices rather than positive real numbers).


Applications

The gamma distribution is frequently a probability model for waiting times; for instance, in life testing, the waiting time until death is a random variable which is frequently modeled with a gamma distribution.

See also

  • Gamma process
    Gamma process

    A Gamma process is a L?vy process with Statistical independence Gamma distribution increments. Often written as , it is a pure-jump increasing Levy process with intensity measure , for positive ....