Dulranga's Notes
Semester 3MathematicsApplied StatisticsDistributions

Gamma Distribution

This is the opposite of Poisson Distribution. In poisson, we measure how many rare events would happen in a fixed continuous interval.

In Gamma, we measure how much continuous interval would require for a fixed number of rare events to occur.

DistributionWhat is Fixed?What is Random VariableQuestion Asked
PoissonTime (tt)Number of Events (NN)"In 1 hour, what is the probability I would get 5 calls?"
GammaNumber of Events (kk)Time (TT)"To get 5 calls, what is the probability I have to wait 1 hour?"

Since the random variable is the Continuous Interval, this is a Continuous Distribution.

gamma.png

Gamma distribution is defined using two different parameterization methods.

  1. Shape-Rate parameterization (α,λ\alpha, \lambda)
  2. Shape-Scale parameterization (α,β\alpha,\beta) β=1λ\beta=\frac{1}{\lambda}

This course will forward with the shape-scale parameterization

PDF

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

Interactive Graph - https://www.desmos.com/calculator/vk2tqrxpk5

Parameters & Key Properties:

  • Shape (α>0\alpha > 0): Controls the profile and skewness.
  • Scale (β>0\beta > 0): Controls the horizontal scale/stretch along the xx-axis.
  • Mean: E[X]=αβ\mathbb{E}[X] = \alpha\beta
  • Variance: Var(X)=αβ2\text{Var}(X) = \alpha\beta^2
  • Scaling Factor for Area to be 1 : 1Γ(α)βα\frac{1}{\Gamma(\alpha)\beta^\alpha}
Note

This is known as Gamma distribution since it uses the gamma function as the formula Γ(s)=∫0∞xs−1e−xdx\Gamma(s) = \int_{0}^{\infty} x^{s-1}e^{-x}dx

Derivation of kk (Constant Factor)

We need the kk factor to keep the area always 11 for given α,β\alpha,\beta values Starting with generic Gamma based PDF,

∫0∞kxα−1e−xβ dx=1k∫0∞xα−1e−xβ dx=1u=xβ  ⟹  x=βu  ⟹  dx=β du∫0∞(βu)α−1e−u(β du)=∫0∞βα−1uα−1e−uβ du=βα∫0∞uα−1e−u du=βαΓ(α)\begin{align*} \int_{0}^{\infty} k x^{\alpha-1} e^{-\frac{x}{\beta}} \, dx &= 1 \\ k \int_{0}^{\infty} x^{\alpha-1} e^{-\frac{x}{\beta}} \, dx &= 1 \\ u = \frac{x}{\beta} \implies x = \beta u \implies dx = \beta \, du \\ \int_{0}^{\infty} (\beta u)^{\alpha-1} e^{-u} (\beta \, du) &= \int_{0}^{\infty} \beta^{\alpha-1} u^{\alpha-1} e^{-u} \beta \, du \\ &= \beta^{\alpha} \int_{0}^{\infty} u^{\alpha-1} e^{-u} \, du \\ &= \beta^{\alpha} \Gamma(\alpha) \\ \\ \end{align*} k⋅βαΓ(α)=1k=1Γ(α)βα\begin{align*} k \cdot \beta^{\alpha} \Gamma(\alpha) &= 1 \\ k &= \frac{1}{\Gamma(\alpha) \beta^{\alpha}} \end{align*}

Shape Vs Scale

  1. α\alpha - Changes shape/profile low α\alpha - skewed to left high α\alpha - more even like normal distribution

    Shape determines how many events we waiting for

  2. β\beta - Changes horizontal stretch low β\beta - less stretch high β\beta - more stretch

    Scale determines how many intervals between 2 events

α\alpha changeβ\beta change
gamma-alpha.pnggamma-beta.png
Different profiling
α\alpha= 1 - no left
2 - huge left skew
3 - less huge left skew
5 - more into even
10 - more even
Same profiling different stretch
β\beta= 1 - tiny stretch
2 - a bit stretched
5 - more stretched
10 - further stretched

Properties

  • Gamma distribution has a additive property similar to Poisson Distribution Only when the Scale parameter is same. If X1∼Gamma(α1,β)andX2∼Gamma(α2,β)\text{If } X_1 \sim \text{Gamma}(\alpha_1, \beta) \quad \text{and} \quad X_2 \sim \text{Gamma}(\alpha_2, \beta)
  ⟹  X1+X2∼Gamma(α1+α2, β)\implies X_1 + X_2 \sim \text{Gamma}(\alpha_1 + \alpha_2, \, \beta)

On this page