Skip to main content

Gamma Distribution

Shape of Distribution

Basic Properties

  • Two parameters α,β\alpha, \beta are required (How can you get these?)

    α>0,β>0\alpha>0,\beta>0
  • Continuous distribution defined on semi-bounded range x0x \geq 0

  • This distribution is asymmetric.

Probability

  • Probability density function

    f(x)=1βαΓ(α)exp(xβ)xα1f(x)=\frac{1}{\beta^{\alpha}\Gamma(\alpha)}\exp\left(-\frac{x}{\beta}\right)x^{\alpha-1}

    , where Γ()\Gamma(\cdot) is gamma function.

  • Cumulative distribution function

    F(x)=Γxβ(α)Γ(α)F(x)=\frac{\Gamma_{\frac{x}{\beta}}(\alpha)}{\Gamma(\alpha)}

    , where Γx()\Gamma_{x}(\cdot) is incomplete gamma function.

  • How to compute these on Excel.

AB
1DataDescription
25Value for which you want the distribution
34Value of parameter Alpha
42.3Value of parameter Beta
5FormulaDescription (Result)
6=NTGAMMADIST(A2,A3,A4,TRUE)Cumulative distribution function for the terms above
7=NTGAMMADIST(A2,A3,A4,FALSE)Probability density function for the terms above

Quantile

AB
1DataDescription
20.7Probability associated with the distribution
34Value of parameter Alpha
42.3Value of parameter Beta
5FormulaDescription (Result)
6=GAMMAINV(A2,A3,A4)Inverse of the cumulative distribution function for the terms above

Characteristics

Mean -- Where is the "center" of the distribution? (Definition)

  • Mean of the distribution is given as

    αβ\alpha\beta
  • How to compute this on Excel

AB
1DataDescription
24Value of parameter Alpha
32.3Value of parameter Beta
4FormulaDescription (Result)
5=NTGAMMAMEAN(A2,A3)Mean of the distribution for the terms above

Standard Deviation -- How wide does the distribution spread? (Definition)

AB
1DataDescription
24Value of parameter Alpha
32.3Value of parameter Beta
4FormulaDescription (Result)
5=NTGAMMASTDEV(A2,A3)Standard deviation of the distribution for the terms above

Skewness -- Which side is the distribution distorted into? (Definition)

  • Skewness of the distribution is given as

    2α\frac{2}{\sqrt{\alpha}}
  • How to compute this on Excel

AB
1DataDescription
24Value of parameter Alpha
3FormulaDescription (Result)
4=NTGAMMASKEW(A2)Skewness of the distribution for the terms above

Kurtosis -- Sharp or Dull, consequently Fat Tail or Thin Tail (Definition)

  • Kurtosis of the distribution is given as

    6α\frac{6}{\alpha}
  • This distribution can be leptokurtic or platykurtic.

  • How to compute this on Excel

AB
1DataDescription
24Value of parameter Alpha
3FormulaDescription (Result)
4=NTGAMMAKURT(A2)Kurtosis of the distribution for the terms above

Random Numbers

  • How to generate random numbers on Excel.
AB
1DataDescription
24Value of parameter Alpha
32.3Value of parameter Beta
4FormulaDescription (Result)
5=NTRANDGAMMA(100,A2,A3,0)100 gamma deviates based on Mersenne-Twister algorithm for which the parameters above

Note The formula in the example must be entered as an array formula. After copying the example to a blank worksheet, select the range A5:A104 starting with the formula cell. Press F2, and then press CTRL+SHIFT+ENTER.

NtRand Functions

  • If you already have parameters of the distribution
  • If you know mean and standard deviation of the distribution

Reference