0.448084
1.5
0.75
0.866025
1
0.57735
0.5
0.448084
1.5
0.75
0.866025
1
0.57735
0.5
The Gamma Distribution Calculator evaluates the probability density function (PDF) and computes essential statistical properties of the gamma distribution. This continuous probability distribution is defined for positive real numbers and is parameterized by a shape parameter α and a rate parameter β. The gamma distribution is one of the foundational distributions in statistics, serving as a generalization of several important special cases including the exponential and chi-squared distributions.
The gamma distribution arises naturally in many real-world scenarios. It models waiting times — specifically, the time until the α-th event in a Poisson process with rate β. In reliability engineering, it describes the lifetime of systems that degrade gradually. In Bayesian statistics, it serves as the conjugate prior for the Poisson rate parameter and the precision (inverse variance) of a normal distribution. Insurance actuaries use gamma models for claim sizes, meteorologists use it for rainfall amounts, and queuing theorists apply it to service time modeling.
The shape parameter α controls the distribution's form: when α < 1, the PDF is monotonically decreasing (J-shaped); when α = 1, it reduces to the exponential distribution; and when α > 1, the PDF is unimodal with a peak at the mode (α − 1)/β. The rate parameter β acts as a scaling factor — larger values compress the distribution toward zero, while smaller values stretch it out. Some textbooks use the scale parameterization θ = 1/β instead, so be mindful of which convention is being used.
The gamma distribution also plays a key role in generating other distributions. The sum of independent gamma variables with the same rate is gamma-distributed, and ratios of gamma variables produce beta and F-distributions. The distribution is a member of the exponential family, which ensures that maximum likelihood estimation has desirable properties including consistency and asymptotic efficiency. These connections make the gamma distribution a cornerstone of modern statistical theory.
This calculator uses the rate parameterization where the PDF includes the term e^(−βx). It employs the Stirling approximation for the log-gamma function to ensure numerical stability across a wide range of parameter values, computing everything in log-space before exponentiating for the final PDF result.
The gamma distribution PDF with shape α and rate β is:
$$f(x; \alpha, \beta) = \frac{\beta^\alpha}{\Gamma(\alpha)} x^{\alpha - 1} e^{-\beta x}, \quad x > 0$$
In log-space, this becomes:
$$\ln f(x) = \alpha \ln(\beta) + (\alpha - 1)\ln(x) - \beta x - \ln\Gamma(\alpha)$$
The key moments are:
$$\mu = \frac{\alpha}{\beta}, \quad \sigma^2 = \frac{\alpha}{\beta^2}, \quad \text{Mode} = \frac{\alpha - 1}{\beta} \; (\alpha \geq 1)$$
Note that the mode is 0 when α < 1, as the PDF approaches infinity near the origin in that case.
The PDF value represents the density at point x; higher values mean x is in a more probable region. The mean α/β gives the expected value — for example, in a Poisson process interpretation, it is the expected waiting time for α events. The variance α/β² quantifies uncertainty; note that for a fixed mean, increasing α while increasing β proportionally reduces the variance, yielding a more concentrated distribution. The mode shows the most likely value, which is always less than the mean for the right-skewed gamma distribution.
Inputs
Results
For shape=3, rate=2 (waiting for 3rd event with rate 2/unit time), the PDF at x=1.5 is 0.665. The mean wait is 1.5 time units and the most likely wait is 1.0.
Inputs
Results
Gamma(5, 0.5) models claim sizes with mean $10K and mode $8K. The PDF at x=8 is 0.084, and the standard deviation of $4.47K indicates moderate spread.
The gamma distribution has two common parameterizations. The shape-rate form uses parameters (α, β) where the PDF contains e^(−βx) and the mean is α/β. The shape-scale form uses (α, θ) where θ = 1/β, the PDF contains e^(−x/θ), and the mean is αθ. They describe the same family of distributions — just be consistent and check which convention your software or textbook uses. This calculator uses the rate parameterization.
The exponential distribution is a special case of the gamma distribution with shape parameter α = 1. Gamma(1, β) = Exponential(β). Furthermore, a Gamma(α, β) random variable (with integer α) equals the sum of α independent Exponential(β) random variables. This is why the gamma distribution models the waiting time for the α-th event in a Poisson process.
The chi-squared distribution with k degrees of freedom is a special case: χ²(k) = Gamma(k/2, 1/2). This connection arises because the chi-squared distribution is defined as the sum of squared standard normal variables, and sums of exponential-family variables yield gamma distributions. This relationship is used in deriving confidence intervals and hypothesis tests.
Use the gamma distribution when modeling positive continuous quantities that are right-skewed. Common applications include: waiting times in Poisson processes, rainfall amounts, insurance claim sizes, income distributions, the lifetime of components that degrade gradually, and as a Bayesian prior for rate parameters. If your data are positive, continuous, and right-skewed, the gamma distribution is often an excellent starting model.
The gamma distribution is the conjugate prior for the Poisson rate parameter λ and for the precision (1/σ²) of a normal distribution. Starting with a Gamma(α, β) prior for a Poisson rate and observing n data points with sum s, the posterior is Gamma(α + s, β + n). This conjugacy enables closed-form Bayesian inference for common models involving rates and precisions.
The shape parameter α controls the form of the distribution: α < 1 gives a J-shape (decreasing), α = 1 gives exponential decay, and α > 1 gives a bell-shaped curve with increasing right skew as α decreases. The rate parameter β compresses or stretches the distribution horizontally: larger β shifts the distribution toward zero (shorter expected values), while smaller β spreads it out (longer expected values). The mean α/β combines both effects.
Roboculator Team
The Roboculator Team explains calculations, planning tools, and practical formulas in clear language for real-life situations.
How helpful was this calculator?
Be the first to rate!
Normal Distribution Calculator
Probability Distributions
Standard Normal Distribution Calculator
Probability Distributions
Poisson Distribution Calculator
Probability Distributions
Exponential Distribution Calculator
Probability Distributions
Uniform Distribution Calculator
Probability Distributions
Geometric Distribution Calculator
Probability Distributions