Calculator Inputs
Use either rate β or scale θ. The calculator returns density, cumulative probability, survival probability, quantiles, moments, entropy, and characteristic-function values.
Example Data Table
Example parameters: shape α = 4 and scale θ = 1.5. These sample values help you compare PDF, CDF, and survival behavior.
| x | CDF | Survival | |
|---|---|---|---|
| 0.50 | 0.002949 | 0.000395 | 0.999605 |
| 1.00 | 0.016903 | 0.004858 | 0.995142 |
| 2.00 | 0.069425 | 0.046494 | 0.953506 |
| 4.00 | 0.146401 | 0.278573 | 0.721427 |
| 6.00 | 0.130245 | 0.566530 | 0.433470 |
| 8.00 | 0.081380 | 0.778689 | 0.221311 |
| 10.00 | 0.041897 | 0.899116 | 0.100884 |
Formula Used
Probability density: f(x) = βαxα-1e-βx / Γ(α), for x ≥ 0 using rate β.
Scale form: replace β with 1/θ, so f(x) = xα-1e-x/θ / (Γ(α)θα).
CDF: F(x) = P(α, βx), the regularized lower incomplete gamma function.
Survival: S(x) = 1 - F(x).
Moments: mean = α/β = αθ, variance = α/β2 = αθ2, skewness = 2/√α, excess kurtosis = 6/α.
Mode: (α - 1)/β when α > 1, or (α - 1)θ in scale form.
Quantile: the calculator uses numerical bisection to solve F(x) = p.
Characteristic function: φ(t) = (1 - iθt)-α, equivalent to (1 - it/β)-α.
How to Use This Calculator
- Enter the shape α, then choose whether your second parameter is rate β or scale θ.
- Add an x value to evaluate density, cumulative probability, survival probability, and hazard.
- Enter probability p to get both the lower-tail quantile Q(p) and the matching upper-tail quantile.
- Optionally provide t to evaluate the characteristic function numerically as a complex value.
- Click the calculate button. Results appear above the form, followed by export buttons and the Plotly graph.
FAQs
1) What does the gamma distribution model?
It models positive, continuous values and waiting times. It is common in reliability, queueing, rainfall, insurance severity, and Bayesian statistics when data are right-skewed and never negative.
2) What is the difference between rate and scale?
They are reciprocals. If θ is the scale, then β = 1/θ is the rate. Both describe the same distribution, so choose the form used by your textbook or software.
3) How do I interpret the PDF and CDF?
The PDF shows relative density near x, not a direct probability at one point. The CDF gives the probability that the random variable is less than or equal to x.
4) When does the gamma distribution have a mode?
For α > 1, the interior mode is (α − 1)/β or (α − 1)θ. If α = 1, the mode is at zero. If α < 1, the density decreases from a spike near zero.
5) What is the characteristic function of gamma distribution?
Using scale θ, the characteristic function is φ(t) = (1 − iθt)−α. Using rate β, it becomes φ(t) = (1 − it/β)−α. This calculator also evaluates its complex value for your chosen t.
6) How are quantiles calculated here?
The page solves F(x) = p numerically with bisection. That approach is stable, accurate, and useful when a closed-form inverse gamma CDF is not available.
7) What are the mean and variance?
With rate β, the mean is α/β and the variance is α/β². With scale θ, the mean is αθ and the variance is αθ².
8) When should I use gamma instead of exponential?
Use exponential when the shape equals one and the hazard is memoryless. Use gamma when the process is more flexible and can reflect several waiting-time stages.