Gamma Distribution
Gamma Distribution
The Gamma distribution is a continuous probability distribution used to model:
-
⏱ waiting time until multiple events occur
-
📊 positive-valued quantities (time, rainfall, insurance claims, lifetimes)
-
🧠 Bayesian statistics (conjugate prior for Poisson, Exponential rates)
It generalizes the Exponential distribution.
Definition
A random variable follows a Gamma distribution:
Probability density function (rate form)
Parameters
| Symbol | Meaning |
|---|---|
| shape parameter | |
| rate parameter | |
| Gamma function (generalized factorial) |
Gamma function intuition
Mean and variance
For
Intuition: Waiting for events
Imagine:
-
Events occur randomly at rate
-
You wait until α events happen
👉 That waiting time follows Gamma(α, β).
Special case
If :
So exponential = waiting for first event.
Gamma = waiting for α-th event.
Example 1 — Machine failures
Suppose failures occur at 2 per hour.
Time until 3rd failure:
Mean waiting time:
Example 2 — Rainfall accumulation
Let rainfall intensity be random.
If total rain collected over time follows:
Then:
Shape behavior
When α < 1
-
sharply decreasing
-
heavy near zero
When α = 1
-
exponential decay
When α > 1
-
bell-shaped but skewed right
As α increases:
-
distribution becomes more symmetric
Important properties
✅ Sum of Gamma variables
If
independent, then
✅ Relation to Chi-square
Used in hypothesis testing.
✅ Bayesian statistics (very important)
Gamma is conjugate prior for:
-
Poisson rate λ
-
Exponential rate β
If:
and data are Poisson, posterior is also Gamma.
Summary
| Distribution | What it models |
|---|---|
| Exponential | wait for first event |
| Gamma | wait for α events |
| Poisson | count events in time |
Python example
✔️ Final takeaway
Gamma distribution is used when:
-
values are continuous and positive
-
modeling waiting time
-
Bayesian inference for rates
-
reliability and queueing systems
It generalizes exponential and connects to Poisson processes.
Comments
Post a Comment