Enter Distribution Inputs
Use the responsive grid below. Large screens show three columns, smaller screens show two, and mobile shows one.
Example Data Table
Sample distribution: shape = 3 and scale = 2. These values show how density, cumulative probability, and survival change across x.
| x | PDF f(x) | CDF P(X ≤ x) | Survival P(X > x) |
|---|---|---|---|
| 1.00 | 0.037908 | 0.014388 | 0.985612 |
| 2.00 | 0.091970 | 0.080301 | 0.919699 |
| 4.00 | 0.135335 | 0.323324 | 0.676676 |
| 6.00 | 0.112021 | 0.576810 | 0.423190 |
| 8.00 | 0.073263 | 0.761897 | 0.238103 |
Formula Used
Probability density function
f(x) = xk-1 e-x/θ / (Γ(k) θk), for x ≥ 0, k > 0, θ > 0
Cumulative distribution function
F(x) = P(k, x/θ), where P is the regularized lower incomplete gamma function.
Survival and interval probability
S(x) = 1 - F(x) = Q(k, x/θ), and P(a ≤ X ≤ b) = F(b) - F(a).
Moments and related measures
Mean = kθ, Variance = kθ², Standard deviation = √(kθ²), Mode = (k - 1)θ for k ≥ 1, and Hazard = f(x) / S(x).
This calculator uses a Lanczos approximation for Γ(k) and stable series or continued-fraction methods for incomplete gamma probabilities.
How to Use This Calculator
- Enter the shape parameter and choose whether to provide scale or rate.
- Select the primary output type you want highlighted.
- Provide x for point-based outputs and graph placement.
- Enter lower and upper bounds if interval probability matters.
- Choose decimals and graph density, then submit the form.
- Review the summary, detailed results table, and Plotly graph.
- Use the export buttons to save a CSV or PDF copy.
FAQs
1) What does the gamma distribution model?
It models positive continuous values, especially waiting times, lifetimes, accumulated durations, rainfall amounts, and service times with right-skewed behavior.
2) What is the difference between scale and rate?
They are reciprocal forms. Scale is θ. Rate is β = 1/θ. Changing the entry mode does not change the distribution if the reciprocal value is used correctly.
3) When should I use PDF instead of CDF?
Use PDF to examine density at a specific x. Use CDF when you need the probability that the random variable is less than or equal to x.
4) What does the survival function tell me?
It gives the probability that X is greater than x. This is useful in reliability, queuing, and duration studies where exceedance matters.
5) Why can the density be very large near zero?
When shape is below 1, the gamma density has a sharp spike near zero. That does not break probability rules because total area still equals one.
6) What happens when shape equals 1?
The gamma distribution becomes the exponential distribution. In that case, the mode is zero and the waiting-time interpretation becomes especially common.
7) Why does the calculator show both interval and point outputs?
That gives a fuller statistical view. You can inspect local density, cumulative probability, tail probability, and interval probability from the same input set.
8) How accurate are the numerical results?
The calculator uses stable numerical methods suitable for most practical inputs. Extreme parameter combinations may still produce rounding effects, especially near machine precision limits.