Gamma Distribution Calculator - Statistical Analysis Tool
Find the mean, variance, skewness, kurtosis, and mode of a gamma distribution from its shape and scale parameters, plus a probability density chart and formula.
Gamma Distribution Calculator
Documentation
What Is a Gamma Distribution Calculator?
A gamma distribution calculator finds the mean, variance, skewness, kurtosis, and mode of a gamma distribution from two inputs: a shape parameter and a scale parameter. It also draws the distribution's probability density function as a curve.
What Is a Gamma Distribution?
The gamma distribution is a continuous probability distribution for positive values. It is defined by two parameters: a shape parameter, usually written as k, and a scale parameter, usually written as θ (theta). Both must be greater than zero. The gamma distribution is used to model quantities that cannot be negative, such as rainfall totals, insurance claim sizes, and the time until a machine part fails.
Gamma Distribution Formula
The probability density function (PDF) of the gamma distribution is:
f(x; k, θ) = x^(k−1) · e^(−x/θ) / (θ^k · Γ(k))
Here x is the value where the density is measured, and Γ(k) is the gamma function, a generalization of the factorial to non-integer numbers. The formula only holds for x > 0; the density is zero everywhere else.
How to Calculate Gamma Distribution Properties
From the shape parameter k and the scale parameter θ, the calculator finds:
- Mean: k × θ
- Variance: k × θ²
- Skewness: 2 / √k
- Kurtosis: 3 + 6 / k
- Mode: (k − 1) × θ when k ≥ 1, otherwise 0
Skewness measures how lopsided the curve is. A smaller k produces a longer right tail. Kurtosis measures how heavy the tails are compared with a normal distribution, which has a kurtosis of 3. The mode is the x-value where the curve reaches its peak. When k is below 1, the density keeps rising as x approaches 0, so there is no interior peak, and the calculator reports a mode of 0.
Worked Example
Take a shape parameter k = 2 and a scale parameter θ = 3.
- Mean = 2 × 3 = 6
- Variance = 2 × 3² = 18
- Skewness = 2 / √2 ≈ 1.4142
- Kurtosis = 3 + 6 / 2 = 6
- Mode = (2 − 1) × 3 = 3
At the mode, x = 3, the density works out to f(3; 2, 3) = 3¹ · e^(−1) / (3² · Γ(2)) = (3 × 0.3679) / 9 ≈ 0.1226. The calculator plots the full curve automatically once both parameters are entered.
How to Use the Gamma Distribution Calculator
- Enter the shape parameter (k), a positive number.
- Enter the scale parameter (θ), a positive number.
- The mean, variance, skewness, kurtosis, and mode appear as soon as both fields hold valid numbers. There is no separate calculate button; results update as the numbers are entered.
- The chart below the results shows the probability density function over a range of x values.
Both parameters must be positive, finite numbers. The tool accepts values up to 1000 for each parameter.
Where the Gamma Distribution Is Used
The gamma distribution models many real quantities that are always positive and often skewed to the right:
- Insurance: claim sizes and payout amounts
- Meteorology: rainfall totals over a fixed period
- Engineering: time until a component fails
- Queueing theory: waiting times built from several exponential steps
- Biology: gene expression levels and species-count data
Related Distributions
Two well-known distributions are special cases of the gamma distribution:
- Exponential distribution: a gamma distribution with k = 1
- Chi-squared distribution: a gamma distribution with k = n/2 and θ = 2, where n is the degrees of freedom
The Weibull and log-normal distributions are common alternatives for modeling positive, skewed data.
Frequently Asked Questions
What is the gamma distribution used for? It models continuous, positive quantities such as waiting times, rainfall amounts, and insurance claims, especially when the data leans toward large values.
How do you find the mean of a gamma distribution? Multiply the shape parameter by the scale parameter: mean = k × θ. For k = 2 and θ = 3, the mean is 6.
What is the difference between the shape and scale parameters? The shape parameter (k) controls the form of the curve, including its skewness. The scale parameter (θ) stretches or compresses the curve along the x-axis without changing its basic shape.
How is the gamma distribution related to the exponential distribution? The exponential distribution is the gamma distribution with shape parameter k = 1.
Can the gamma distribution take negative values? No. It is defined only for x > 0. Data that can be negative needs a different distribution, such as the normal distribution.
Does this calculator compute the cumulative distribution function? No. It computes the mean, variance, skewness, kurtosis, and mode, and plots the probability density function. It does not output cumulative probability values.
References
- "Gamma distribution." Wikipedia, Wikimedia Foundation. https://en.wikipedia.org/wiki/Gamma_distribution
- Johnson, N. L., Kotz, S., & Balakrishnan, N. (1994). Continuous Univariate Distributions, Volume 1. John Wiley & Sons.