You are on page 1of 30

Gamma distribution

From Wikipedia, the free encyclopedia


Not to be confused with Gamma function.

Gamma

Probability density function

Cumulative distribution function

k > 0 shape > 0 shape


Parameters

> 0 scale > 0 rate


Support

Probability

density

function (pdf)

Cumulative

distribution

function (CDF)

Mean

(see digamma function) (see digamma function)

Median No simple closed form No simple closed form

Mode

Variance

(see trigamma function) (see trigamma function)

Skewness

Excesskurtosis

Entropy

Moment-

generating

function (mgf)

Characteristic

function

In probability theory and statistics, the gamma distribution is a two-parameter family of continuous probability
distributions. There are three different parametrizations in common use:

1. With a shape parameter k and a scale parameter .

2. With a shape parameter = k and an inverse scale parameter = 1/,


called a rate parameter.

3. With a shape parameter k and a mean parameter = k/.


In each of these three forms, both parameters are positive real numbers.

The parameterization with k and appears to be more common in econometrics and certain other applied
fields, where e.g. 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. [1]

The parameterization with and is more common in Bayesian statistics, where the gamma distribution is
used as a conjugate prior distribution for various types of inverse scale (aka rate) parameters, such as the of
an exponential distribution or a Poisson distribution or for that matter, the of the gamma distribution itself.
(The closely related inverse gamma distribution is used as a conjugate prior for scale parameters, such as
the variance of a normal distribution.)

If k is an integer, then the distribution represents an Erlang distribution; i.e., the sum
of k independent exponentially distributedrandom variables, each of which has a mean of (which is equivalent
to a rate parameter of 1/).

The gamma distribution is the maximum entropy probability distribution for a random variable X for which E[X]
= k = / is fixed and greater than zero, and E[ln(X)] = (k) + ln() = () ln() is fixed ( is the digamma
function).[2]

Contents

[hide]

1 Characterization using shape k and scale

o 1.1 Probability density function

o 1.2 Cumulative distribution function

2 Characterization using shape and rate

o 2.1 Probability density function

o 2.2 Cumulative distribution function

3 Properties

o 3.1 Skewness

o 3.2 Median calculation

o 3.3 Summation

o 3.4 Scaling
o 3.5 Exponential family

o 3.6 Logarithmic expectation

o 3.7 Information entropy

o 3.8 KullbackLeibler divergence

o 3.9 Laplace transform

4 Parameter estimation

o 4.1 Maximum likelihood estimation

o 4.2 Bayesian minimum mean-squared error

5 Generating gamma-distributed random variables

6 Related distributions

o 6.1 Special cases

o 6.2 Conjugate prior

o 6.3 Compound gamma

o 6.4 Others

7 Applications

8 Notes

9 References

10 External links

Characterization using shape k and scale [edit]

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

Probability density function[edit]


Illustration of the gamma PDF for parameter values over k andx with set to
1, 2, 3, 4, 5 and 6. One can see each layer by itself here [1] as well as
by k [2] and x. [3].

The probability density function using the shape-scale parametrization is

Here (k) is the gamma function evaluated at k.

Cumulative distribution function[edit]


The cumulative distribution function is the regularized gamma function:

where (k, x/) is the lower incomplete gamma function.

It can also be expressed as follows, if k is a positive integer (i.e.,


the distribution is an Erlang distribution):[3]

Characterization using shape and rate


[edit]

Alternatively, the gamma distribution can be parameterized in


terms of a shape parameter = k and an inverse scale
parameter = 1/, called a rate parameter. A random
variable X that is gamma-distributed with shape and
rate is denoted

Probability density function[edit]


The corresponding density function in the shape-rate
parametrization is

Both parametrizations are common because either


can be more convenient depending on the situation.

Cumulative distribution
function[edit]
The cumulative distribution function is the
regularized gamma function:

where (, x) is the lower incomplete gamma


function.

If is a positive integer (i.e., the distribution is


an Erlang distribution), the cumulative
distribution function has the following series
expansion:[3]

Properties[edit]
Skewness[edit]
The skewness is equal to , it
depends only on the shape parameter (k)
and approaches a normal distribution when
k is large (approximately when k > 10).
Median calculation[edit]
Unlike the mode and the mean which have
readily calculable formulas based on the
parameters, the median does not have an
easy closed form equation. The median for
this distribution is defined as the value
such that

A formula for approximating the


median for any gamma distribution,
when the mean is known, has been
derived based on the fact that the ratio
/( ) is approximately a linear
function of kwhen k 1.[4] The
approximation formula is

where is the mean.

Summation[edit]
If Xi has a Gamma(ki, )
distribution for i = 1, 2, ..., N (i.e.,
all distributions have the same
scale parameter ), then

provided
all Xi are independent.

For the cases where


the Xi are independent but
have different scale
parameters see Mathai
(1982) and Moschopoulos
(1984).

The gamma distribution


exhibits infinite divisibility.

Scaling[edit]
If

then for any c > 0,

Hence the use of


the term "scale
parameter" to
describe .

Equivalently, if

then for
any c > 0,

Hence the
use of the
term
"inverse
scale
parameter"
to describe
.

Expone
ntial
family[e
dit]
The
gamma
distribution
is a two-
parameter
exponentia
l
family with
natural
parameter
s k 1 and
1/
(equivalent
ly, 1
and ),
and natural
statistics X
and ln(X).

If the
shape
parameter
k is held
fixed, the
resulting
one-
parameter
family of
distribution
s is
a natural
exponentia
l family.

Logarit
hmic
expect
ation[ed
it]
One can
show that

or
equiva
lently,

w
h
er
e

is
th
e
di
g
a
m
m
a
fu
n
cti
o
n.

T
hi
s
c
a
n
b
e
d
er
iv
e
d
u
si
n
g
th
e
e
x
p
o
n
e
nt
ial
fa
m
ily
fo
r
m
ul
a
fo
r
th
e
m
o
m
e
nt
g
e
n
er
at
in
g
fu
n
cti
o
n
of
th
e
s
uf
fic
ie
nt
st
at
ist
ic,
b
e
c
a
u
s
e
o
n
e
of
th
e
s
uf
fic
ie
nt
st
at
ist
ic
s
of
th
e
g
a
m
m
a
di
st
ri
b
ut
io
n
is
ln
(x
).

I
n
f
o
r
m
a
ti
o
n
e
n
tr
o
p
y
[
e
di
t]
T
h
e
in
fo
r
m
at
io
n
e
nt
ro
p
yi
s
In
th
e
k,

pa
ra
m
et
eri
za
tio
n,
th
ei
nf
or
m
ati
on
en
tro
py
is
gi
ve
n
by

Kull
back

Leibl
er
diver
genc
e[edit
]

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.

The Ku
llback
Leibler
diverg
ence (
KL-
diverg
ence),
as with
the
inform
ation
entrop
y and
various
other
theoret
ical
propert
ies,
are
more
comm
only
seen
using
the ,

param
eteriza
tion
becaus
e of
their
uses in
Bayesi
an and
other
theoret
ical
statisti
cs
frame
works.

The
KL-
diverg
ence
of
Gamm
a(p,
p)
("true"
distribu
tion)
from
Gamm
a(q,
q)
("appro
ximatin
g"
distribu
tion) is
given
by[5]

Written
using the k,

parameteriz
ation, the
KL-
divergence
of
Gamma(kp,
p) from
Gamma(kq,
q) is given
by

Laplace
transform[
edit]
The Laplace
transform of the
gamma PDF is

Parameter
estimation[e
t]

Maximum
likelihood
estimation[e
]
The likelihood
function
for N iid observati
s (x1, ..., xN) is

from which we ca
the log-likelihood
Finding the maxim
respect to by tak
derivative and set
to zero yields the
likelihood estimato
parameter:

Substituting this in
likelihood function

Finding the maxim


to k by taking the
it equal to zero yie

There is no closed
function is numeri
so if a numerical s
be found using, fo
method. An initial
either using the m
using the approxim

If we let

then k is approxim
which is within 1.5
form for the Newto
is:[7]

Bayesian mi
error[edit]
With known k and
for theta (using th

Denoting

Integration over
revealing that 1/

The moments can

which shows that


distribution for the

Generating

Given the scaling


1 as we can later

Using the fact tha


and noting the me
if U is uniformly di
using the "-addit

where Uk are all u


generate a variab
property once mo

Random generatio
none are uniforml
parameter, the alg
parameter, one ca
Algorithm GD (sha
and Feast Algorith

The following is a

1. Let m be 1.

2. Generate V3m

3. If

4. Let

5. Let

6. If

7. Assume =

A summary of this

where

is the inte

has been ge
Uk and Vl are

While the above a


of k and in genera
or table-based me

Related dist
Special case

If X ~ Gamma

If X ~ Gamma
distribution w
constant, then

If k is an integ
distribution of

process with
then

If X has a Ma
.

X ~ Gamma(k
parameters p

an exponentia

Conjugate p
In Bayesian infere
distributions: the P
known shape ,in
parameter.

The gamma distri


where Z is the nor
can be found by u

where n is the num

Compound g
If the shape param
unknown, then a g
distribution, which
the compound ga

Others[edit]

If X ~ Gamma
parameter k a
distribution.

If X ~ Gamma
distribution w

If Xi are indep
where S = X1

For large k th
variance 2 =

The gamma d
known mean.

The Wishart d
positive-defin
The gamma d
integer gamm

Among the di
discrete analo

Tweedie distr
dispersion mo

Applications

The gamma distri


means that aggre
modelled by a gam
level Poisson regr
distribution is a ne

In neuroscience, t
intervals.[19] Althou
biophysical motiva

In bacterial gene e
gamma distributio
bursts per cell cyc
lifetime.[20]

The gamma distri


prior for the precis
for the exponentia
Notes[edit]

1. Jump up^ Se

2. Jump up^ Pa

heteroskedast

3. ^ Jump up to:a

4. Jump up^ Ba

distribution". V

5. Jump up^ W.

Gamma, Dirich

6. Jump up^ Min

us/um/people/

7. Jump up^ Ch

Distribution an

8. Jump up^ Lu

Chapter 9, Se

9. Jump up^ De

10. ^ Jump up to:a

technique. Co

11. Jump up^ Ah

binomial distrib

12. Jump up^ Ch

290-295.

13. Jump up^ Ma

321-325.

14. Jump up^ Lu

Chapter 9, Se

15. Jump up^ Fin

enhancement
16. Jump up^ Du

31. doi:10.100

17. Jump up^ p.

CRC 2007

18. Jump up^ Ak

24, 419 428

19. Jump up^ J. G

cells of the cat

20. Jump up^ N.

An analytical f

References

R. V. Hogg an
Macmillan. (S

P. G. Moscho
variables, An

A. M. Mathai
Statistical M

External link

Hazewinkel, M
Mathematics,

Weisstein, Er

Engineering S
Categories:
Continuous d
Factorial and
Conjugate pri
Exponential fa
Infinitely divis

Navigatio
Create accoun

Log in
Article
Talk
Read
Edit
View history

Main page
Contents
Featured cont
Current events
Random articl
Donate to Wik

Interaction
Help
About Wikiped
Community po
Recent chang
Contact page
Tools
Print/export
Languages

Azrbaycanca

Catal
Deutsch
Espaol

Franais

Italiano

Magyar
Nederlands

Novial
Polski
Portugus

Slovenina
Slovenina
Basa Sunda
Suomi
Svenska
Trke

This page was


Text is availabl

By using this si
Wikipedia is a

Privacy policy

About Wikipedi

Disclaimers

Contact Wikipe

Developers

Mobile view

You might also like