What Is Gamma Distribution?
The gamma distribution is a flexible model for positive, right-skewed quantities such as waiting times and rainfall amounts. It has a shape parameter k and a scale parameter θ, and the equivalent rate β = 1/θ is shown too, since textbooks and software use both conventions.
The calculator returns the cumulative probability, the probability between two values, the density, the median, the mode, the 5th and 95th percentiles, the mean kθ, the variance kθ² and the skewness and excess kurtosis. The curve shades the probability you asked for.
Below you will find the formulas, a variables table, a worked example and answers to common questions such as scale versus rate and the link with the exponential and chi-square distributions.
How to Use the Gamma Distribution Calculator
- Enter the shape k.
- Choose whether you are supplying the scale θ or the rate β, and enter it. Check which your textbook or software uses.
- Enter x, and optionally an upper bound for an interval probability.
- Read the probabilities and the percentile table.
Gamma Distribution Formula
Density
Cumulative distribution
Moments
Gamma Distribution Variables Explained
| Symbol | Meaning | Notes |
|---|---|---|
| k | Shape parameter | k > 0 |
| θ | Scale parameter | θ > 0 |
| β | Rate parameter | 1 ÷ θ |
| μ | Mean | kθ |
| σ² | Variance | kθ² |
Gamma Distribution Worked Example
With the example values loaded in the calculator above, the steps are:
- Shape k = 3, scale θ = 2 (rate β = 0.5).
- Density: f(x) = x^(k−1) e^(−x/θ) ÷ (Γ(k) θ^k); at x = 5 this is 0.12825781.
- Cumulative probability P(X ≤ x) = P(k, x/θ) = 0.45618688, where P is the regularised lower incomplete gamma function.
- Mean = kθ = 6; variance = kθ² = 12.
Result: P(X ≤ 5) = 0.45618688; P(X > 5) = 0.54381312.
How to Read a Gamma Distribution
The gamma distribution models positive, right-skewed quantities such as waiting times for several events. The shape k controls how skewed it is, and the scale θ stretches it. The mean is kθ and the variance is kθ².
With shape 1 the gamma is the exponential distribution. For large shapes it looks more and more like a bell curve. The percentile table shows where 50%, 90% and other shares of the distribution fall.
Shape, scale and rate: avoiding parameter mix-ups
The gamma has two common parameterisations. In the shape-scale form (used by many textbooks and by R’s scale argument) the mean is kθ. In the shape-rate form (used by R’s default, by Excel’s GAMMA.DIST with beta = scale, and in Bayesian work) the mean is k/β. Entering the wrong one changes every result, so check what your source calls its second parameter.
| Source | Parameters | Mean |
|---|---|---|
| Most textbooks | shape k, scale θ | kθ |
| Bayesian statistics | shape α, rate β | α/β |
| R dgamma | shape, rate (or scale=) | shape/rate |
| Excel GAMMA.DIST | alpha, beta (scale) | alpha × beta |
| SciPy gamma | a, scale | a × scale |
Relationships with other distributions
If waiting times between events are exponential, the time to the k-th event is gamma with shape k. This links the gamma to the Poisson process and, through the chi-square, to statistical tests.
| Distribution | Gamma form |
|---|---|
| Exponential with mean θ | k = 1 |
| Chi-square with ν df | k = ν/2, θ = 2 |
| Erlang with k stages | Integer k |
| Normal for large k | Approximately normal as k grows |
Typical applications
- Reliability and queueing: time until the k-th failure or arrival.
- Insurance: sizes of claims.
- Hydrology: rainfall totals.
- Bayesian statistics: conjugate prior for a Poisson rate.
- Medicine: lengths of stay and survival times.
Where Gamma Distribution Is Used
Waiting times
Model the time until k events occur.
Skewed positive data
Fit sizes, rainfall or claim amounts.
Percentiles
Find the value below which a chosen share falls.
Relating distributions
See the link to the exponential and chi-square.
Common Gamma Distribution Mistakes to Avoid
- Check whether your source uses scale θ or rate β = 1 ÷ θ. The calculator asks which you have.
- Shape below 1 gives a density that is infinite at 0.
- The mean is kθ and the mode is (k − 1)θ for k above 1.
- Mixing up scale and rate is the commonest error.
Gamma Distribution Terms and Definitions
- Shape
- The parameter controlling skew and form of the curve.
- Rate
- The reciprocal of the scale; the events-per-unit-time view.
- Incomplete gamma function
- The special function whose normalised form gives the gamma CDF.
Gamma Distribution FAQs
What is the gamma distribution used for?
Modelling positive, right-skewed quantities such as waiting times until the k-th event, claim sizes and rainfall.
What is the difference between the scale and rate parameters?
They are reciprocals: rate β = 1/θ. The mean is kθ with scale and k/β with rate.
How is the gamma related to the exponential?
An exponential distribution is a gamma with shape k = 1. A gamma with integer shape k is the sum of k independent exponentials.
How is the gamma related to chi-square?
A chi-square distribution with ν degrees of freedom is a gamma with shape ν/2 and scale 2.
How do I find a percentile of a gamma distribution?
Use the inverse CDF. The percentile table above lists common ones for your parameters.
Can the shape be less than 1?
Yes. The density then goes to infinity at 0 and decreases steadily.