Statistics/Distributions/Gamma: Difference between revisions

From testwiki
Jump to navigation Jump to search
imported>Pi zero
normalizing book category
 
(No difference)

Latest revision as of 00:20, 16 November 2016

Gamma Distribution

Template:Probability distribution The Gamma distribution is very important for technical reasons, since it is the parent of the exponential distribution and can explain many other distributions.

The probability distribution function is:

fx(x)={1apΓ(p)xp1ex/a,if x00,if x<0a,p>0

Where Γ(p)=0tp1etdt is the Gamma function. The cumulative distribution function cannot be found unless p=1, in which case the Gamma distribution becomes the exponential distribution. The Gamma distribution of the stochastic variable X is denoted as XΓ(p,a).

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

g(x;α,β)=Kxα1eβx for x>0.

where the K constant can be calculated setting the integral of the density function as 1:

+g(x;α,β)dt=0+Kxα1eβxdx=1

following:

K0+xα1eβxdx=1
K=10+xα1eβxdx

and, with change of variable y=βx :

K=10+yα1βα1eydyβ=11βα0+yα1eydy=βα0+yα1eydy=βαΓ(α)

following:

g(x;α,β)=xα1βαeβxΓ(α) for x>0.

Probability Density Function

We first check that the total integral of the probability density function is 1.

1apΓ(p)xp1ex/adx

Now we let y=x/a which means that dy=dx/a

1Γ(p)0yp1eydy
1Γ(p)Γ(p)=1

Mean

E[X]=x1apΓ(p)xp1ex/adx

Now we let y=x/a which means that dy=dx/a.

E[X]=0ay1Γ(p)yp1eydy
E[X]=aΓ(p)0ypeydy
E[X]=aΓ(p)Γ(p+1)

We now use the fact that Γ(z+1)=zΓ(z)

E[X]=aΓ(p)pΓ(p)=ap

Variance

We first calculate E[X^2]

E[X2]=x21apΓ(p)xp1ex/adx

Now we let y=x/a which means that dy=dx/a.

E[X2]=0a2y21aΓ(p)yp1eyady
E[X2]=a2Γ(p)0yp+1eydy
E[X2]=a2Γ(p)Γ(p+2)=pa2(p+1)

Now we use calculate the variance

Var(X)=E[X2](E[X])2
Var(X)=pa2(p+1)(ap)2=pa2

Template:BookCat