Gamma Distribution
A gentle introduction to the gamma distribution, including its definition, special cases, real-world medical applications, and the additive property that reveals its intuitive meaning.
What Is the Gamma Distribution?
The gamma distribution is a continuous probability distribution that models the total waiting time until a specific number of events occur.
It is one of the most versatile distributions in statistics and can describe a wide range of phenomena. In fact, both the exponential distribution and the chi-square distribution are special cases of the gamma distribution.
Applications in Medicine and Biostatistics
✅ Exponential distribution (Gamma with )
- Radiation therapy: Time until the first cancer cell is destroyed by a dose.
- Emergency room arrivals: Time until the next patient arrives.
This models the time until the first event occurs.
✅ Gamma distribution (integer )
- Vaccine response time: Total time needed after multiple doses for the immune system to respond.
- Multistep treatment durations: Total time required for multiple phases of a treatment to complete.
This models the time until the -th event occurs.
✅ Chi-square distribution (Gamma with )
- Clinical trials: Statistical testing (e.g. test) for differences between treatment and control groups.
- Genetic association studies: Testing whether a gene is significantly associated with a disease.
This models the total squared variation in independent normal variables.
Probability Density Function
The gamma distribution is defined by the following probability density function:
- : shape parameter
- : rate parameter
- : gamma function, where if is an integer
This formula defines a family of curves depending on and .
Special Cases of the Gamma Distribution
Exponential distribution:
Models the time until the first event.
Chi-square distribution:
The sum of squared standard normal variables.
Visualizing the Gamma Distribution
Interactive Gamma Distribution Explorer
Explore how shape (α) and rate (β) parameters affect the gamma distribution
Parameters
Statistics
Quick Examples
Distribution Visualization
Probability Density Function
Use the interactive tool above to explore how the shape () and rate () affect the distribution.
Quick buttons are also provided to show:
- Exponential distribution ()
- Chi-square distribution (, )
Additive Property: The Key to Intuition
The shape parameter represents how many events we’re waiting for.
Sum of exponentials → gamma distribution
If are independent, then:
This means: the time until the -th event is gamma-distributed.
Proof via Moment Generating Function (MGF)
The MGF of is:
Then the MGF of the sum is:
This matches the MGF of :
So, the sum of exponentials is gamma-distributed.
Mean, Variance, and Their Intuitive Meaning
Once we understand the gamma distribution as the sum of exponential waiting times, it’s natural to ask: how do the parameters and affect the average and the spread?
📌 Mean and Variance
For (with rate parameter ), we have:
Let’s break this down:
- : the number of events we are waiting for
- : the rate at which events occur per unit time
🔄 Scaling and the Role of
We can derive the variance formula using a change of variables. Let and define:
This means we’re slowing down time by a factor of .
Using the change of variables formula with the Jacobian:
Since:
we get:
which is exactly the density of .
Now, from a standard rule in probability:
So:
🎯 Intuition: Why is the variance inversely proportional to ?
- Increasing means waiting for more events → more total time and more variability
- Increasing means time moves faster (events occur more frequently)
→ waiting time becomes shorter and more consistent
But here’s the key:
- Mean is like a “length” → it scales linearly with time:
- Variance is like “spread in squared units” → it scales with the square of time
So doubling the speed () makes the mean half as long, but the variance one-fourth as wide.
This is why:
and not just .
Understanding this scaling helps build strong intuition for how gamma models respond to changes in event frequency and cumulative wait time.
Summary
- The gamma distribution models total waiting time until a number of events occur.
- It generalizes both the exponential and chi-square distributions.
- It is widely used in medicine, from modeling treatment durations to statistical testing.
- The additive property reveals the intuitive meaning of the shape parameter: how many events you’re waiting for.
- The mean and variance depend on both and , with variance inversely proportional to —capturing how faster event rates reduce uncertainty more rapidly.