Education
 

Gamma distribution

From Psychology Wiki

Community portal · Tasks to do · News · Help

Clinical · Educational · Ind&Org · Other fields · Professional · Transpersonal · World

Assessment | Biopsychology | Comparative | Cognitive | Developmental | Language
Personality | Philosophy | Research Methods | Social | Statistics

Statistics: Scientific method · Research methods · Experimental design · Undergraduate statistics courses · Statistical tests · Game theory · Decision theory


Gamma
Probability density function
Probability density plots of gamma distributions
Cumulative distribution function
Cumulative distribution plots of gamma distributions
Parameters math shape (real)
math scale (real)
Support math
pdf math
cdf math
Mean math
Median
Mode math for math
Variance math
Skewness math
Kurtosis math
Entropy math
math
mgf math for math
Char. func. math

In probability theory and statistics, the gamma distribution is a continuous probability distribution. For integer values of the parameter k it is also known as the Erlang distribution.

Contents

[edit] Probability density function

The probability density function of the gamma distribution can be expressed in terms of the gamma function:

math

where math is the shape parameter and math is the scale parameter of the gamma distribution. (NOTE: this parameterization is what is used in the infobox and the plots.)

Alternatively, the gamma distribution can be parameterized in terms of a shape parameter math and an inverse scale parameter math, called a rate parameter:

math

Both parameterizations are common because they are convenient to use in certain situations and fields.

[edit] Properties

The cumulative distribution function can be expressed in terms of the incomplete gamma function,

math

The information entropy is given by:

math

where math is the polygamma function.

If math for math and math then

math

provided all math are independent. The gamma distribution exhibits infinite divisibility.

If math, then math. Or, more generally, for any math it holds that math. That is the meaning of θ (or β) being the scale parameter.

[edit] Parameter estimation

The likelihood function is

math

from which we calculate the log-likelihood function

math

Finding the maximum with respect to math by taking the derivative and setting it equal to zero yields the maximum likelihood estimate of the math parameter:

math

Substituting this into the log-likelihood function gives:

math

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

math

where math is the digamma function.

There is no closed-form solution for math. The function is numerically very well behaved, so if a numerical solution is desired, it can be found using Newton's method. An initial value of math can be found either using the method of moments, or using the approximation:

math

If we let math then math is approximately

math

which is within 1.5% of the correct value.

[edit] Generating Gamma random variables

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

Using the fact that if math, then also math, and the method of generating exponential variables, we conclude that if U is uniformly distributed on (0, 1], then math. Now, using the "α-addition" property of Gamma distribution, we expand this result:

math,

where math are all uniformly distributed on (0, 1 ] and independent.

All that is left now is to generate a variable distributed as math for math and apply the "α-addition" property once more. This is the most difficult part, however.

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

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

Now, to summarize,

math ,

where math is the integral part of α, ξ has been generating using the algorithm above with math (the fractional part of α), math and math are distributed as explained above and are all independent.

[edit] Related distributions

[edit] References

  • R. V. Hogg and A. T. Craig. Introduction to Mathematical Statistics, 4th edition. New York: Macmillan, 1978. (See Section 3.3.)

[edit] See also

es:Distribución gammafi:Gamma-jakauma sv:Gammafördelning

Smallwikipedialogo.png This page uses content from the English-language version of Wikipedia. The original article was at Gamma_distribution. The list of authors can be seen in the page history. As with Psychology Wiki, the text of Wikipedia is available under the GNU Free Documentation License.