Gamma Distribution Calculator

Enhanced version: scale/rate parameterization · PDF/CDF toggle · critical quantiles · extreme‑value stability.

Scale parameter (θ). Mean = k·θ
Parameters too large, display may be truncated.
Presets: Exp(λ=1) k=1,θ=1 Erlang k=2,θ=1 Gamma(3,2) Chi‑square (df=10) approx k=0.5, θ=2 k=4,θ=1 (waiting time)
Computing...

Understanding the Gamma Distribution

The Gamma distribution is a two‑parameter family with shape (k) and scale (θ) (or rate λ = 1/θ). It is the waiting time for the k‑th event in a Poisson process and the conjugate prior for Poisson rate in Bayesian statistics.

Parameterizations
  • Scale (θ): f(x) = 1/(Γ(k)θ^k) x^{k-1} e^{-x/θ}
  • Rate (λ): f(x) = λ^k/Γ(k) x^{k-1} e^{-λ x}, λ = 1/θ
  • Mean = k·θ = k/λ
  • Variance = k·θ² = k/λ²
Special Cases
  • k = 1 → Exponential
  • k = ν/2, θ = 2 → Chi‑square (ν df)
  • Integer k → Erlang
  • k → ∞ → Normal (approx.)
Applications
  • Reliability: time to failure of systems with standby redundancy.
  • Bayesian inference: Gamma prior for Poisson rate (conjugate).
  • Meteorology: precipitation amount modeling.
  • Queueing theory: service times (Erlang).
  • Insurance: aggregate claim sizes.

Frequently Asked Questions

Shape (k) determines the skewness and peakedness. Scale (θ) stretches/compresses the distribution. Increasing θ while keeping k fixed spreads the curve to the right.

This calculator uses jStat's robust numerical inverse CDF (based on NR algorithm) which is highly accurate for most parameter ranges.

Gamma distribution is defined for x ≥ 0. PDF at x=0: if k=1, f(0)=1/θ; if k<1, f(0)=∞; if k>1, f(0)=0. For negative x, PDF=0 and CDF=0 (not supported, we clamp to 0).