Explanation
The gamma distribution is a continuous distribution defined for positive values that generalizes the exponential distribution. While the exponential models the time until the first event of a Poisson process, the gamma with shape parameter k models the time until k consecutive events occur. This makes it ideal for cumulative waiting times, insurance claim severities and durations of processes with multiple stages. When k is a positive integer it is called the Erlang distribution. Its mean is k·θ and its variance is k·θ², so increasing θ shifts the distribution to the right and increasing k reduces the skewness, bringing it closer to a normal distribution via the central limit theorem.
Formula
\( f(x;k,\theta)=\frac{x^{k-1}e^{-x/\theta}}{\Gamma(k)\theta^k},\quad x>0 \)
Parameters
- k: shape parameter (k > 0). Integer values correspond to the Erlang distribution.
- θ (theta): scale parameter (θ > 0). Determines the spread and the mean together with k.
- x: positive value at which the distribution is evaluated (x > 0).
Worked example
Situation: The repair time of an industrial machine is modeled with a Gamma distribution with shape parameter \(\alpha = 3\) and scale parameter \(\beta = 2\) hours. This is equivalent to assuming that the repair requires completing 3 independent stages, each with a mean duration of 2 hours.
Question 1: What is the mean repair time and what is the probability of finishing in 8 hours or less, \(P(X \leq 8)\)?
Solution: The mean of Gamma(\(\alpha, \beta\)) is: \[ E[X] = \alpha \cdot \beta = 3 \times 2 = 6 \text{ hours} \] To calculate \(P(X \leq 8)\) we use the regularized incomplete gamma function \(P(X \leq 8) = \Gamma_{\text{reg}}(3;\, 8/2) = \Gamma_{\text{reg}}(3;\, 4)\). Evaluating numerically: \[ P(X \leq 8) = 1 - e^{-4}(1 + 4 + 8) \approx 0.7619 \] There is approximately a 76.19% probability of completing the repair in 8 hours or less.
Question 2: What is the variance and what does it mean for the uncertainty of the repair time?
Solution: The variance of the Gamma is: \[ \text{Var}(X) = \alpha \cdot \beta^2 = 3 \times 4 = 12 \text{ h}^2 \implies \sigma = \sqrt{12} \approx 3.46 \text{ h} \] The standard deviation of 3.46 hours represents more than 57% of the mean, which reflects considerable variability in repair times.
Interpretation: With a mean of 6 hours and \(P(X \leq 8) \approx 0.762\), 23.8% of repairs take longer than 8 hours. If the service-level goal is to complete 90% of repairs on time, the 90th percentile of the Gamma(3, 2) can be used as the guaranteed maximum turnaround time.