Gamma Distribution | Its 7 Important Properties

Gamma Distribution

One of the continuous random variable and continuous distribution is the Gamma distribution, As we know the continuous random variable deals with the continuous values or intervals so is the Gamma distribution with specific probability density function and probability mass function, in the successive discussion we discuss in detail the concept, properties and results with examples of gamma random variable and gamma distribution.

Gamma random variable or Gamma distribution | what is gamma distribution | define gamma distribution | gamma distribution density function | gamma distribution probability density function | gamma distribution proof

A continuous random variable with probability density function

f(x) = \begin{cases} \frac{lambda e^{-\lambda x}(\lambda x)^{\alpha -1}}{\tau (\alpha )} &\ x\geq 0 \0 &\ x < 0 \end{cases}

is known to be Gamma random variable or Gamma distribution where the α>0, λ>0 and the gamma function

\tau (\alpha )=\int_{0}^{\infty} e^{-y}y^{\alpha -1} dy

we have the very frequent property of gamma function by integration by parts as

\tau (\alpha )=-e^{-y} y^{^{\alpha -1}}\lvert_{\infty }^{0} + \int_{0}^{\infty}e^{-y}(\alpha -1) y^{\alpha -2} dy

= (\alpha -1) \int_{0}^{\infty}e^{-y} y^{\alpha -2} dy

= (\alpha -1) \tau (\alpha -1)

If we continue the process starting from n then

\tau (n)=(n-1) \tau(n-1)

=(n-1) (n-2) \tau(n-2)

=(n-1) (n-2)....3..2\tau(1)

=.... ..

and lastly the value of gamma of one will be

\tau (1)=\int_{0}^{\infty} e^{-x} dx=1

thus the value will be

\tau (n)=(n-1)!

cdf of gamma distribution | cumulative gamma distribution | integration of gamma distribution

The cumulative distribution function(cdf) of gamma random variable or simply the distribution function of gamma random variable is same as that of continuous random variable provided the probability density function is different i.e

F(x)=P(X\leq x)=\int_{-\infty}^{x} f(u) du

here the probability density function is as defined above for the gamma distribution, the cumulative distribution function we can write also as

f(a)=P(X\in (-\infty,a] ) =\int_{-\infty}^{a} f(x)dx

in both of the above formats the value of pdf is as follows

f(x) = \begin{cases} \frac{\lambda e^{-\lambda x}(\lambda x)^{\alpha -1}}{\tau (\alpha )} &\ x\geq 0 \\0 &\ x < 0 \end{cases}

where the α >0, λ>0 are real numbers.

Gamma distribution formula | formula for gamma distribution | gamma distribution equation | gamma distribution derivation

To find the probability for the gamma random variable the probability density function we have to use for different given α >0 , λ >0 is as

f(x) = \begin{cases} \frac{lambda e^{-\lambda x}(\lambda x)^{\alpha -1}}{\tau (\alpha )} &\ x\geq 0 \\0 &\ x < 0 \end{cases}


and using the above pdf the distribution for the gamma random variable we can obtain by

P\left \{ a\leq X\leq b \right \} =\int_{a}^{b} f(x) dx


Thus the gamma distribution formula require the pdf value and the limits for the gamma random variable as per the requirement.

Gamma distribution example


show that the total probability for the gamma distribution is one with the given probability density function i.e

\frac{1}{\Gamma\left(\alpha\right)}\int_{0}^{\infty}{\lambda e^{-\lambda x}{(\lambda x)}^{\alpha-1}dx}=1

for λ >0, α>0.
Solution:
using the formula for the gamma distribution

P\left \{ a\leq X\leq b \right \}=\int_{a}^{b} f(x)dx

P\left \{ X\in (-\infty, \infty) \right \}=\int_{-\infty}^{\infty} f(x)dx


since the probability density function for the gamma distribution is

f(x) = \begin{cases} \frac{lambda e^{-\lambda x}(\lambda x)^{\alpha -1}}{\tau (\alpha )} &\ x\geq 0 \\0 &\ x < 0 \end{cases}


which is zero for all the value less than zero so the probability will be now

=\frac{1}{\Gamma\left(\alpha\right)}\int_{0}^{\infty}{\lambda e^{-\lambda x}{(\lambda x)}^{\alpha-1}dx}

=\frac{\lambda^\alpha}{\Gamma\left(\alpha\right)}\int_{0}^{\infty}{e^{-\lambda x}{(x)}^{\alpha-1}dx}


using the definition of gamma function

\tau(\alpha )=\int_{0}^{\infty} e^{-y}y^{\alpha -1}dy


and substitution we get

\frac{1}{\Gamma\left(\alpha\right)}\int_{0}^{\infty}{\lambda e^{-\lambda x}{(\lambda x)}^{\alpha-1}dx}=\frac{\lambda^\alpha}{\Gamma\left(\alpha\right)}\ast\frac{\Gamma\left(\alpha\right)}{\lambda^\alpha}

thus

\frac{1}{\Gamma\left(\alpha\right)}\int_{0}^{\infty}{\lambda e^{-\lambda x}{(\lambda x)}^{\alpha-1}dx=1}

Gamma distribution mean and variance | expectation and variance of gamma distribution | expected value and variance of gamma distribution | Mean of gamma distribution | expected value of gamma distribution | expectation of gamma distribution


In the following discussion we will find the mean and variance for the gamma distribution with the help of standard definitions of expectation and variance of continuous random variables,

The expected value or mean of the continuous random variable X with probability density function

f(x) = \begin{cases} \frac{\lambda e^{-\lambda x}(\lambda x)^{\alpha -1}}{\tau (\alpha )} &\ x\geq 0 \\0 &\ x < 0 \end{cases}

or Gamma random variable X will be

E\left[X\right]=\frac{\alpha}{\lambda}

mean of gamma distribution proof | expected value of gamma distribution proof

To obtain the expected value or mean of gamma distribution we will follow the gamma function definition and property,
first by the definition of expectation of continuous random variable and probability density function of gamma random variable we have

E\left[X\right]=\frac{1}{\tau (\alpha )}\int_{0}^{\infty}\lambda xe^{-\lambda x}(\lambda x)^{\alpha -1}dx

=\frac{1}{\lambda \tau (\alpha )}\int_{0}^{\infty}\lambda e^{-\lambda x}(\lambda x)^{\alpha}dx

=\frac{\tau (\alpha +1)}{\lambda \tau (\alpha )}

by cancelling the common factor and using the definition of gamma function

\tau (\alpha ) =\int_{0}^{\infty}e^{-y}y^{\alpha -1} dy

now as we have the property of gamma function

\tau (n)= (n-1)\tau (n-1)

the value of expectation will be

E\left[X\right]=\frac{\alpha\Gamma(\alpha)}{\lambda\Gamma(\alpha)}

thus the mean or expected value of gamma random variable or gamma distribution we get is

E\left[X\right]=\frac{\alpha}{\lambda}

variance of gamma distribution | variance of a gamma distribution

The variance for the gamma random variable with the given probability density function

f(x) = \begin{cases} \frac{\lambda e^{-\lambda x}(\lambda x)^{\alpha -1}}{\tau (\alpha )} &\ x\geq 0 \\0 &\ x < 0 \end{cases}

or variance of the gamma distribution will be

Var(X)=\frac{\alpha }{\lambda ^{^{2}}}

variance of gamma distribution proof


As we know that the variance is the difference of the expected values as

Var(X)=E[X^{2}]-(E[X])^{2}

for the gamma distribution we already have the value of mean

E\left[X\right]=\frac{\alpha}{\lambda}

now first let us calculate the value of E[X2], so by definition of expectation for the continuous random variable we have
since the function f(x) is the probability distribution function of gamma distribution as

E\left[X^2\right]=\int_{-\infty}^{\infty}{x^2f\left(x\right)dx}

so the integral will be from zero to infinity only

E\left[X^2\right]=\frac{1}{\Gamma\left(\alpha\right)}\int_{0}^{\infty}{{\lambda x}^2e^{-\lambda x}{(\lambda x)}^{\alpha-1}dx}

E\left[X^2\right]=\frac{1}{\lambda^2\Gamma\left(\alpha\right)}\int_{0}^{\infty}{\lambda e^{-\lambda x}{(\lambda x)}^{\alpha+1}dx}

so by definition of the gamma function we can write

E\left[X^2\right]=\frac{\Gamma\left(\alpha + 2 \right)}{\lambda ^{2} \tau (\alpha ) }=\frac{(\alpha +1)\Gamma\left(\alpha + 1 \right)}{\lambda ^{2} \tau (\alpha ) } =\frac{(\alpha +1)\alpha \Gamma\left(\alpha \right)}{\lambda ^{2} \tau (\alpha ) }

E\left[X^2\right]=\frac{\Gamma\left(\alpha + 2 \right)} {\lambda ^{2}}

Thus using the property of the gamma function we got the value as

E\left[X^2\right]=\frac{\alpha(\alpha+1)}{\lambda^2}


Now putting the value of these expectation in

Var\left(X\right)=E[X^{2}]- (E[X])^{2}

Var\left(X\right)=\frac{\alpha(\alpha+1)}{\lambda^2}-\left(\frac{\alpha}{\lambda}\right)^2

Var\left(X\right)=\frac{\alpha^2+\alpha}{\lambda^2}-\frac{\alpha^2}{\lambda^2}=\frac{\alpha}{\lambda^2}

thus, the value of variance of gamma distribution or gamma random variable is

Var\left(X\right)=\frac{\alpha }{\lambda ^{2}}


Gamma distribution parameters | two parameter gamma distribution | 2 variable gamma distribution


The Gamma distribution with the parameters λ>0, α>0 and the probability density function

f(x) = \begin{cases} \frac{\lambda e^{-\lambda x}(\lambda x)^{\alpha -1}}{\tau (\alpha )} &\ x\geq 0 \\0 &\ x < 0 \end{cases}

has statistical parameters mean and variance as

E\left[X\right]=\frac{\alpha}{\lambda}

and

Var(X)=\frac{\alpha }{\lambda ^{2}}

since λ is positive real number, to simplify and easy handling another way is to set λ=1/β so this gives the probability density function in the form

f(x) = \begin{cases} \frac{ e^{-\frac{x}{\beta }}(x)^{\alpha -1}}{\beta ^{\alpha }\tau (\alpha )} , &\ x\geq 0 \\0 &\ x < 0 \end{cases}

in brief the distribution function or cumulative distribution function for this density we can express as

F(x) = \begin{cases} 0 , &\ x\leq 0 , \\ \frac{1}{\tau (\alpha )\beta ^{\alpha }}\int_{0}^{x}y^{\alpha -1}e^-{(y/\beta) } dy &\ x > 0 \end{cases}

this gamma density function gives the mean and variance as

E[X]={\alpha\beta}

and

Var(X)={{\alpha}\beta}^2


which is obvious by the substitution.
Both the way are commonly used either the gamma distribution with the parameter α and λ denoted by gamma (α, λ) or the gamma distribution with the parameters β and λ denoted by gamma (β, λ) with the respective statistical parameters mean and variance in each of the form.
Both are nothing but the same.

Gamma distribution plot | gamma distribution graph| gamma distribution histogram

The nature of the gamma distribution we can easily visualize with the help of graph for some of specific values of the parameters, here we draw the plots for the probability density function and cumulative density function for some values of parameters
let us take probability density function as

f(x) = \begin{cases} \frac{ e^{-\frac{x}{\beta }}(x)^{\alpha -1}}{\beta ^{\alpha }\tau (\alpha )} , &\ x\geq 0 \\0 &\ x < 0 \end{cases}

then cumulative distribution function will be

F(x) = \begin{cases} 0 , &\ x\leq 0 , \\ \frac{1}{\tau (\alpha )\beta ^{\alpha }}\int_{0}^{x}y^{\alpha -1}e^-{(y/\beta) } dy &\ x > 0 \end{cases}

gamma distribution

Description: graphs for the probability density function and cumulative distribution function by fixing the value of alpha as 1 and varying the value of beta.

gamma distribution

Description: graphs for the probability density function and cumulative distribution function by fixing the value of alpha as 2 and varying the value of beta

gamma distribution

Description: graphs for the probability density function and cumulative distribution function by fixing the value of alpha as 3 and varying the value of beta

gamma distribution

Description: graphs for the probability density function and cumulative distribution function by fixing the value of beta  as 1 and varying the value of alpha

gamma distribution

Description: graphs for the probability density function and cumulative distribution function by fixing the value of beta  as 2 and varying the value of alpha

gamma distribution

Description: graphs for the probability density function and cumulative distribution function by fixing the value of beta as 3 and varying the value of alpha.

In general different curves as for alpha varying is

Gamma distribution
Gamma distribution graph

Gamma distribution table | standard gamma distribution table


The numerical value of gamma function

F(x;\alpha ) =\int_{0}^{x}\frac{1}{\tau (\alpha )}y^{\alpha -1}e^{-y} dy


known as incomplete gamma function numerical values as follows

Gamma distribution



The gamma distribution numerical value for sketching the plot for the probability density function and cumulative distribution function for some initial values are as follows

1xf(x),α=1,β=1f(x),α=2,β=2f(x),α=3,β=3P(x),α=1,β=1P(x),α=2,β=2P(x),α=3,β=3
0100000
0.10.9048374180.023780735611.791140927E-40.095162581960.0012091042746.020557215E-6
0.20.81873075310.04524187096.929681371E-40.18126924690.004678840164.697822176E-5
0.30.74081822070.064553098230.0015080623630.25918177930.010185827111.546530703E-4
0.40.6703200460.081873075310.002593106130.3296799540.017523096313.575866931E-4
0.50.60653065970.097350097880.0039188968750.39346934030.026499021166.812970042E-4
0.60.54881163610.11112273310.0054582050210.45118836390.036936313110.001148481245
0.70.49658530380.12332041570.0071856645830.50341469620.048671078880.001779207768
0.80.44932896410.13406400920.0090776691950.55067103590.061551935550.002591097152
0.90.40656965970.14346633410.011112273310.59343034030.075439180150.003599493183
10.36787944120.15163266490.013269098340.63212055880.090204010430.004817624203
1.10.33287108370.15866119790.015529243520.66712891630.10572779390.006256755309
1.20.30119421190.16464349080.017875201230.69880578810.12190138220.007926331867
1.30.2725317930.16966487750.02029077660.7274682070.13862446830.00983411477
1.40.24659696390.17380485630.022761011240.75340303610.15580498360.01198630787
1.50.22313016010.17713745730.025272110820.77686983990.17335853270.01438767797
1.60.2018965180.17973158570.027811376330.7981034820.19120786460.01704166775
1.70.18268352410.18165134610.030367138940.81731647590.20928237590.01995050206
1.80.16529888820.18295634690.032928698170.83470111180.22751764650.02311528775
1.90.14956861920.18370198610.035486263270.85043138080.24585500430.02653610761
20.13533528320.18393972060.038030897710.86466471680.26424111770.03021210849
2.10.12245642830.18371731830.040554466480.87754357170.28262761430.03414158413
2.20.11080315840.1830790960.043049586250.88919684160.30097072420.03832205271
2.30.10025884370.18206614240.045509578110.89974115630.31923094580.04275032971
2.40.090717953290.18071652720.047928422840.90928204670.33737273380.04742259607
2.50.082084998620.1790654980.050300718580.91791500140.35536420710.052334462
2.60.074273578210.17714566550.052621640730.92572642180.3731768760.05748102674
2.70.067205512740.17498717590.054886904070.93279448730.39078538750.0628569343
2.80.060810062630.17261787480.057092726880.93918993740.40816728650.06845642568
2.90.055023220060.17006345890.059235797090.94497677990.42530279420.07427338744
30.049787068370.16734762010.06131324020.95021293160.44217459960.08030139707
Gamma Distribution Graph

finding alpha and beta for gamma distribution | how to calculate alpha and beta for gamma distribution | gamma distribution parameter estimation


For a gamma distribution finding alpha and beta we will take mean and variance of the gamma distribution

E[X]={\alpha\beta}

and

Var(X)={{\alpha}\beta}^2


now we will get value of beta as

\frac{Var\left(X\right)}{E\left[X\right]}=\frac{{{\alpha}\beta}^2}{{\alpha\beta}}={\beta}


so

{\beta}=\frac{Var\left(X\right)}{E\left[X\right]}


and

\frac{{E[X]}^2}{Var\left(X\right)}=\frac{\left({\alpha\beta}\right)^\mathbf{2}}{{{\alpha}\beta}^2}={\alpha}

thus

{\alpha}=\frac{{E[X]}^2}{Var(X)}

only taking some fractions from the gamma distribution we will get the value of alpha and beta.

gamma distribution problems and solutions | gamma distribution example problems | gamma distribution tutorial | gamma distribution question

1. Consider the time require to resolve the problem for a customer is gamma distributed in hours with the mean 1.5 and variance 0.75 what would be the probability that the problem resolving time exceed 2 hours, if time exceeds 2 hours what would be the probability that the problem will resolved in at least 5 hours.

solution: since the random variable is gamma distributed with mean 1.5 and variance 0.75 so we can find the values of alpha and beta and with the help of these values the probability will be

P(X>2)=13e-4=0.2381

and

P(X>5 | X>2)=(61/13)e-6=0.011631

2. If the negative feedback in week from the users is modelled in gamma distribution with parameters alpha 2 and beta as 4 after the 12 week negative feedback came after restructuring the quality, from this information can restructuring improves the performance ?

solution: As this is modelled in gamma distribution with α=2, β=4

we will find the mean and standard deviation as μ =E(x)=α * β=4 * 2=8

\sigma=\sqrt{\alpha\beta^2}=\sqrt{2\ast4^2}=4\sqrt2=5.6568

since the value X=12 is within the standard deviation from the mean so we can not say this is improvement or not by the restructuring the quality, to prove the improvement caused by the restructuring information given is insufficient.

3. Let X be the gamma distribution with parameters α=1/2, λ=1/2 , find the probability density function for the function Y=Square root of X

Solution: let us calculate the cumulative distribution function for Y as

F_{Y}(y)=P(Y\leq y)=(P\sqrt{X}\leq y)=P(X\leq y^{2})=\int_{0}^{y^{2}}\frac{(\frac{1}{2})^{\frac{1}{2}}}{\tau (\frac{1}{2})} x^{-1/2}e^{-x/2}

now differentiating this with respect to y gives the probability density function for Y as

f_{Y}(y)=\frac{(\frac{1}{2})^{\frac{1}{2}}}{\tau (\frac{1}{2})} y^{-1}e^{-y^{2}/2}\frac{\mathrm{d} }{\mathrm{d} y}y^{2}=\frac{\sqrt{2}}{\tau (\frac{1}{2})}e^{-y^{2}/2}

and the range for y will be from 0 to infinity


Conclusion:

The concept of gamma distribution in probability and statistic is the one of the important day to day applicable distribution of exponential family, all the basic to higher level concept were discussed so far related to gamma distribution, if you require further reading, please go through mentioned books. You can also visit out mathematics page for more Topic

https://en.wikipedia.org/wiki/Gamma_distribution
A first course in probability by Sheldon Ross
Schaum’s Outlines of Probability and Statistics
An introduction to probability and statistics by ROHATGI and SALEH

About DR. MOHAMMED MAZHAR UL HAQUE

I am DR. Mohammed Mazhar Ul Haque , Assistant professor in Mathematics. Having 12 years of experience in teaching. Having vast knowledge in Pure Mathematics , precisely on Algebra. Having the immense ability of problem designing and solving. Capable of Motivating candidates to enhance their performance.
I love to contribute to Lambdageeks to make Mathematics Simple , Interesting & Self Explanatory for beginners as well as experts.
Let's connect through LinkedIn - https://www.linkedin.com/in/dr-mohammed-mazhar-ul-haque-58747899/