🎉 75% of content is free forever — Unlock Premium from $10/mo →
CW
Search courses…
💼 Servicesℹ️ About✉️ ContactView Pricing Plansfrom $10

Gamma Distribution — Sum of Exponential Variables

Foundations of StatisticsProbability Distributions🟢 Free Lesson

Advertisement

Gamma Distribution — Sum of Exponential Variables

Foundations of Statistics

Flexible Modeling of Positive Data

The gamma distribution extends the exponential to model waiting times for multiple events and right-skewed positive data. Its flexibility makes it ideal for insurance claims, rainfall amounts, and survival analysis.

  • Insurance — Modeling claim sizes and aggregate losses in actuarial science
  • Meteorology — Predicting rainfall amounts and drought durations
  • Healthcare — Survival times in clinical trials and time-to-event data

When data is positive and skewed, the gamma distribution provides the natural framework.


Core Concepts

The gamma distribution generalizes the exponential distribution. It models the waiting time until the α\alpha-th event in a Poisson process and serves as a flexible model for right-skewed, positive-valued data.

DfGamma Distribution

A continuous random variable XX has a gamma distribution with shape parameter α>0\alpha > 0 and rate parameter β>0\beta > 0 if its pdf is:

f(x)=βαΓ(α)xα1eβx,x>0f(x) = \frac{\beta^\alpha}{\Gamma(\alpha)} x^{\alpha - 1} e^{-\beta x}, \quad x > 0

Written XGamma(α,β)X \sim \text{Gamma}(\alpha, \beta). It represents the sum of α\alpha independent Exp(β)\text{Exp}(\beta) variables (when α\alpha is integer).


The Gamma Function

DfThe Gamma Function

The Gamma function is defined for α>0\alpha > 0 by:

Γ(α)=0tα1etdt\Gamma(\alpha) = \int_0^{\infty} t^{\alpha - 1} e^{-t} \, dt

Key properties:

  • Γ(n)=(n1)!\Gamma(n) = (n-1)! for positive integers nn
  • Γ(α+1)=αΓ(α)\Gamma(\alpha + 1) = \alpha \, \Gamma(\alpha) (functional equation)
  • Γ(1/2)=π\Gamma(1/2) = \sqrt{\pi}
  • Γ(n+1/2)=(2n)!4nn!π\Gamma(n + 1/2) = \frac{(2n)!}{4^n n!} \sqrt{\pi}

ThProof that Γ(n) = (n-1)! for Integer n

Base case: Γ(1)=0etdt=1=0!\Gamma(1) = \int_0^\infty e^{-t} dt = 1 = 0!

Inductive step: Assume Γ(k)=(k1)!\Gamma(k) = (k-1)!. Then:

Γ(k+1)=0tketdt\Gamma(k+1) = \int_0^\infty t^k e^{-t} dt

Integration by parts with u=tku = t^k, dv=etdtdv = e^{-t} dt:

=[tket]0+k0tk1etdt=0+kΓ(k)=k(k1)!=k!= \left[-t^k e^{-t}\right]_0^\infty + k \int_0^\infty t^{k-1} e^{-t} dt = 0 + k \cdot \Gamma(k) = k \cdot (k-1)! = k!

PDF of Gamma Distribution

f(x)=βαΓ(α)xα1eβx,x>0f(x) = \frac{\beta^\alpha}{\Gamma(\alpha)} x^{\alpha-1} e^{-\beta x}, \quad x > 0

Here,

  • α\alpha=Shape parameter
  • β\beta=Rate parameter
  • Γ(α)\Gamma(\alpha)=Gamma function (generalization of factorial)

Derivation of Mean and Variance

ThDerivation of E[X] and Var(X)

Mean:

E[X]=0xβαΓ(α)xα1eβxdx=βαΓ(α)0xαeβxdxE[X] = \int_0^{\infty} x \cdot \frac{\beta^\alpha}{\Gamma(\alpha)} x^{\alpha-1} e^{-\beta x} \, dx = \frac{\beta^\alpha}{\Gamma(\alpha)} \int_0^{\infty} x^{\alpha} e^{-\beta x} \, dx

Substitute u=βxu = \beta x, dx=du/βdx = du/\beta:

=βαΓ(α)Γ(α+1)βα+1=αΓ(α)βΓ(α)=αβ= \frac{\beta^\alpha}{\Gamma(\alpha)} \cdot \frac{\Gamma(\alpha+1)}{\beta^{\alpha+1}} = \frac{\alpha \, \Gamma(\alpha)}{\beta \, \Gamma(\alpha)} = \frac{\alpha}{\beta}

Second moment:

E[X2]=βαΓ(α)0xα+1eβxdx=βαΓ(α)Γ(α+2)βα+2=(α+1)αβ2E[X^2] = \frac{\beta^\alpha}{\Gamma(\alpha)} \int_0^{\infty} x^{\alpha+1} e^{-\beta x} \, dx = \frac{\beta^\alpha}{\Gamma(\alpha)} \cdot \frac{\Gamma(\alpha+2)}{\beta^{\alpha+2}} = \frac{(\alpha+1)\alpha}{\beta^2}

Variance:

Var(X)=α(α+1)β2α2β2=αβ2\text{Var}(X) = \frac{\alpha(\alpha+1)}{\beta^2} - \frac{\alpha^2}{\beta^2} = \frac{\alpha}{\beta^2}

Gamma Mean and Variance

E[X]=αβ,Var(X)=αβ2E[X] = \frac{\alpha}{\beta}, \quad \text{Var}(X) = \frac{\alpha}{\beta^2}

Here,

  • α\alpha=Shape parameter
  • β\beta=Rate parameter

MGF and Additivity

MGF of Gamma Distribution

MX(t)=(ββt)α,t<βM_X(t) = \left(\frac{\beta}{\beta - t}\right)^\alpha, \quad t < \beta

Here,

  • tt=Transform variable
  • α\alpha=Shape parameter
  • β\beta=Rate parameter

ThSum of Independent Gammas with Same Rate

If X1Gamma(α1,β)X_1 \sim \text{Gamma}(\alpha_1, \beta) and X2Gamma(α2,β)X_2 \sim \text{Gamma}(\alpha_2, \beta) are independent, then:

X1+X2Gamma(α1+α2,β)X_1 + X_2 \sim \text{Gamma}(\alpha_1 + \alpha_2, \beta)

Proof: MX1+X2(t)=MX1(t)MX2(t)=(ββt)α1(ββt)α2=(ββt)α1+α2M_{X_1+X_2}(t) = M_{X_1}(t) \cdot M_{X_2}(t) = \left(\frac{\beta}{\beta-t}\right)^{\alpha_1} \cdot \left(\frac{\beta}{\beta-t}\right)^{\alpha_2} = \left(\frac{\beta}{\beta-t}\right)^{\alpha_1+\alpha_2}

This is the MGF of Gamma(α1+α2,β)\text{Gamma}(\alpha_1+\alpha_2, \beta).

Important: This additivity property requires the same rate β\beta. For different rates, the sum does not have a gamma distribution.


Special Cases

Special Cases of the Gamma

  • α=1\alpha = 1: Gamma(1,β)=Exp(β)\text{Gamma}(1, \beta) = \text{Exp}(\beta)
  • α=n/2,β=1/2\alpha = n/2, \beta = 1/2: Gamma(n/2,1/2)=χn2\text{Gamma}(n/2, 1/2) = \chi^2_n (chi-squared with nn degrees of freedom)
  • α=k,β=1\alpha = k, \beta = 1: Gamma(k,1)=Erlang(k)\text{Gamma}(k, 1) = \text{Erlang}(k) — sum of kk i.i.d. Exp(1)\text{Exp}(1) variables
  • As α\alpha \to \infty: Gamma(α,β)N(α/β,α/β2)\text{Gamma}(\alpha, \beta) \to N(\alpha/\beta, \alpha/\beta^2) by the CLT (sum of α\alpha i.i.d. exponentials)

Chi-Squared Connection

ThChi-Squared as a Special Case of Gamma

The chi-squared distribution with ν\nu degrees of freedom is:

χν2=Gamma(ν2,12)\chi^2_\nu = \text{Gamma}\left(\frac{\nu}{2}, \frac{1}{2}\right)

Proof: If Z1,,ZνZ_1, \ldots, Z_\nu are i.i.d. N(0,1)N(0,1), then Q=Z12++Zν2χν2Q = Z_1^2 + \cdots + Z_\nu^2 \sim \chi^2_\nu.

Each Zi2Z_i^2 has pdf: fZ2(x)=12πxex/2=(1/2)1/2Γ(1/2)x1/21ex/2f_{Z^2}(x) = \frac{1}{\sqrt{2\pi x}} e^{-x/2} = \frac{(1/2)^{1/2}}{\Gamma(1/2)} x^{1/2 - 1} e^{-x/2}

This is Gamma(1/2,1/2)\text{Gamma}(1/2, 1/2). By additivity: sum of ν\nu such variables is Gamma(ν/2,1/2)=χν2\text{Gamma}(\nu/2, 1/2) = \chi^2_\nu.


Log-Gamma Distribution

The Log-Gamma

If XGamma(α,β)X \sim \text{Gamma}(\alpha, \beta), then Y=lnXY = \ln X follows a log-gamma distribution. As α\alpha \to \infty, YE[Y]Y - E[Y] approaches a normal distribution. For α=1\alpha = 1 (exponential), lnX\ln X follows the Gumbel distribution.


Worked Example

Example: Claim Processing Time

An insurance company finds that claim processing times follow Gamma(α=3,β=0.5)\text{Gamma}(\alpha = 3, \beta = 0.5) (in hours).

Mean processing time: E[X]=α/β=3/0.5=6E[X] = \alpha/\beta = 3/0.5 = 6 hours

Variance: Var(X)=α/β2=3/0.25=12\text{Var}(X) = \alpha/\beta^2 = 3/0.25 = 12 hours2^2

SD: σ=123.46\sigma = \sqrt{12} \approx 3.46 hours

Probability that a claim takes more than 10 hours:

P(X>10)=1F(10)P(X > 10) = 1 - F(10) where FF is the gamma CDF. Using the CDF integral or tables:

P(X>10)=P(Poisson(0.5×10)2)=e5(1+5+12.5)=18.5e50.125P(X > 10) = P(\text{Poisson}(0.5 \times 10) \leq 2) = e^{-5}(1 + 5 + 12.5) = 18.5 e^{-5} \approx 0.125

(The relationship P(X>x)=P(N(x)<α)P(X > x) = P(N(x) < \alpha) where NPoisson(βx)N \sim \text{Poisson}(\beta x) holds for integer α\alpha.)


Specific Applications

  1. Insurance and finance — Aggregate claim amounts, ruin probability, and loss modeling.
  2. Hydrology — Rainfall amounts, flood frequency analysis (often as gamma or Pearson Type III).
  3. Bayesian statistics — Conjugate prior for the Poisson rate parameter.
  4. Queueing theory — Erlang distributions model total service time for multiple sequential tasks.

Key Takeaways

Summary: Gamma Distribution

  • Generalizes the exponential; models waiting time for α\alpha-th event
  • PDF: f(x)=βαΓ(α)xα1eβxf(x) = \frac{\beta^\alpha}{\Gamma(\alpha)} x^{\alpha-1} e^{-\beta x}
  • Mean: α/β\alpha/\beta, Variance: α/β2\alpha/\beta^2
  • MGF: MX(t)=(β/(βt))αM_X(t) = (\beta/(\beta-t))^\alpha; sum of same-rate gammas is gamma
  • α=1\alpha = 1 gives Exponential; α=n/2,β=1/2\alpha = n/2, \beta = 1/2 gives Chi-squared
  • CLT: approaches N(α/β,α/β2)N(\alpha/\beta, \alpha/\beta^2) as α\alpha \to \infty
  • The Gamma function Γ(α)\Gamma(\alpha) generalizes factorial: Γ(n)=(n1)!\Gamma(n) = (n-1)!

Premium Content

Gamma Distribution — Sum of Exponential Variables

Unlock this lesson and 900+ advanced tutorials with a Premium plan.

🎯End-to-end Projects
💼Interview Prep
📜Certificates
🤝Community Access

Already a member? Log in

Need Expert Statistics Help?

Get personalized tutoring, project support, or professional consulting.

Advertisement