Why a Common Rate Matters
When independent waiting times are added, their individual distributions do not always make the distribution of the total easy to see. Gamma variables are an important exception: if the variables are independent and share a rate, their sum is also gamma, with the shape parameters added. This rule includes sums of independent exponential variables and sums of Erlang variables with a common rate.
The parameterization matters. This tutorial uses shape \(\alpha>0\) and rate \(\lambda>0\); the rate is the reciprocal of the scale. The shared-rate condition means that the coefficients of the variables in the exponential factor of their densities are equal. It is not enough for the variables to have the same units or to be gamma distributed.
For this parameterization, the moment-generating function is \(M_X(t)=(1-t/\lambda)^{-\alpha}\) for \(t<\lambda\). In particular,
These expressions can be obtained by differentiating the moment-generating function at \(t=0\). The rate has units reciprocal to those of \(X\), so the mean has the units of \(X\), and the variance has squared units.
The Common-Rate Closure Result
The result can be proved directly from the convolution formula. Because \(X\) and \(Y\) are independent and both are supported on positive values, the density of \(T=X+Y\), for \(t>0\), is the integral of \(f_X(x)f_Y(t-x)\) from \(x=0\) to \(x=t\). Substituting the two gamma densities gives
The exponential factors combine to \(e^{-\lambda t}\), which is where using the same rate is essential. In the integral, set \(w=x/t\), so \(x=tw\), \(dx=t\,dw\), and \(t-x=t(1-w)\). Therefore,
where \(B(\alpha,\beta)=\Gamma(\alpha)\Gamma(\beta)/\Gamma(\alpha+\beta)\). This identity follows by changing variables in the product integral for \(\Gamma(\alpha)\Gamma(\beta)\): set \(r=u+v\) and \(w=u/(u+v)\) for \(u,v>0\), with Jacobian \(r\). The product integral then separates into \(\Gamma(\alpha+\beta)\) times the integral defining \(B(\alpha,\beta)\). Substitution now yields
which is precisely the density of \(\operatorname{Gamma}(\alpha+\beta,\lambda)\). For more than two variables, apply the two-variable result repeatedly; at each step, the accumulated sum remains independent of the next variable and has the same rate.
Exponential and Erlang Variables as Special Cases
An exponential variable with rate \(\lambda\) is a gamma variable with shape \(1\) and rate \(\lambda\). Thus, the sum of \(n\) independent exponential variables with a common rate \(\lambda\) has a gamma distribution with shape \(n\) and rate \(\lambda\). When the gamma shape is a positive integer \(n\), this distribution is also called an Erlang distribution.
For integer shape \(n\), the gamma survival probability has a convenient finite-sum form:
For example, when \(n=3\), this gives \(P(T>t)=e^{-\lambda t}\{1+\lambda t+(\lambda t)^2/2\}\). The formula is useful for calculating probabilities without integrating the density term by term.
Worked Example: Combining Gamma Variables and Finding a Tail Probability
Two independent hypothetical service durations have distributions \(X\sim\operatorname{Gamma}(2,3)\) and \(Y\sim\operatorname{Gamma}(4,3)\), with durations measured in hours and rates measured per hour. Find the distribution, mean, and variance of their total \(T=X+Y\), and calculate \(P(T>2)\).
Method and distribution. The variables are independent and have the same rate, \(3\) per hour, so the closure theorem applies. Add the shapes and retain the common rate: $$ T\sim\operatorname{Gamma}(2+4,3)=\operatorname{Gamma}(6,3). $$
Moments. The total shape is \(6\). Therefore, $$ E[T]=\frac{6}{3}=2\text{ hours}, \qquad \operatorname{Var}(T)=\frac{6}{3^2}=\frac{2}{3}\text{ hours}^2. $$ These also agree with adding the individual means, \(2/3+4/3=2\), and individual variances, \(2/9+4/9=2/3\), since the variables are independent.
Tail probability. Here the shape is the integer \(6\), and \(\lambda t=3(2)=6\). Apply the Erlang survival formula: $$ P(T>2)=e^{-6}\left(1+6+\frac{6^2}{2!}+\frac{6^3}{3!}+\frac{6^4}{4!}+\frac{6^5}{5!}\right). $$ The terms inside the parentheses are \(1,6,18,36,54,64.8\), whose sum is \(179.8\). Thus \(P(T>2)=179.8e^{-6}\approx 0.4457\), to four decimal places.
Check and common mistake avoided. The mean is \(2\), and the requested event is a right-tail event beyond that value; a probability of about \(0.4457\) is plausible for this right-skewed gamma distribution. Do not add the rates: the total has shape \(6\) and the common rate remains \(3\).
Worked Example: A Total of Exponential Waiting Times
Suppose three independent hypothetical waiting times, measured in hours, are each exponential with rate \(0.5\) per hour. Find the probability that their total \(W\) is between 2 and 6 hours.
Method and distribution. Each exponential variable is \(\operatorname{Gamma}(1,0.5)\). Independence and the common rate give $$ W\sim\operatorname{Gamma}(3,0.5). $$ For shape \(3\), the survival function is \(P(W>t)=e^{-0.5t}\{1+0.5t+(0.5t)^2/2\}\). The interval probability is the survival probability at 2 minus the survival probability at 6: $$ P(2<W<6)=P(W>2)-P(W>6). $$
At \(t=2\), \(0.5t=1\), so $$ P(W>2)=e^{-1}(1+1+1/2)=2.5e^{-1}\approx 0.9197. $$ At \(t=6\), \(0.5t=3\), so $$ P(W>6)=e^{-3}(1+3+9/2)=8.5e^{-3}\approx 0.4232. $$ Using the unrounded expressions for the subtraction, $$ P(2<W<6)=2.5e^{-1}-8.5e^{-3}\approx 0.4965. $$ The answer is \(0.4965\), to four decimal places.
Check and common mistake avoided. The result is positive and less than \(P(W>2)\), as an interval probability must be. Keep the time in hours and the rate in per hour, and use \(\lambda t\), not \(t/\lambda\), in the survival formula.
Worked Example: Adding Erlang Variables With Different Shapes
Two independent hypothetical processing stages have durations \(U\sim\operatorname{Gamma}(2,2)\) and \(V\sim\operatorname{Gamma}(3,2)\), with times measured in days and rates measured per day. Find the distribution and mean of \(R=U+V\), then calculate \(P(R>1.5)\).
Method and distribution. Both shapes are positive integers, so both variables are Erlang. They are independent and share rate \(2\) per day. Hence $$ R\sim\operatorname{Gamma}(2+3,2)=\operatorname{Gamma}(5,2), \qquad E[R]=\frac{5}{2}=2.5\text{ days}. $$
For the tail probability, the shape is \(5\) and \(\lambda t=2(1.5)=3\). Therefore, $$ \begin{aligned} P(R>1.5) &=e^{-3}\left(1+3+\frac{3^2}{2!}+\frac{3^3}{3!}+\frac{3^4}{4!}\right)\\ &=e^{-3}(1+3+4.5+4.5+3.375)\\ &=16.375e^{-3}\approx 0.8153. \end{aligned} $$ The probability is \(0.8153\), to four decimal places.
Check and common mistake avoided. The mean exceeds the threshold of 1.5 days, and a large right-tail probability is reasonable. Add the shapes even though the two Erlang variables have different shapes; retain the shared rate.
When the Rule Applies—and When It Does Not
The theorem has two essential assumptions: independence and a common rate. Independence allows the convolution density to be formed as the product of the two densities. The common rate makes the exponential terms combine as \(e^{-\lambda x}e^{-\lambda(t-x)}=e^{-\lambda t}\), leaving a gamma density after integration.
A common exam error is to apply the result merely because both variables are gamma. For example, if \(X\sim\operatorname{Gamma}(2,1)\) and \(Y\sim\operatorname{Gamma}(3,2)\), the incorrect calculation is to claim \(X+Y\sim\operatorname{Gamma}(5,1)\), or \(\operatorname{Gamma}(5,2)\), by adding shapes and selecting one of the rates. Neither conclusion follows from this theorem: the rates differ. The correction is to check the assumptions before using closure. Independence still gives \(E[X+Y]=2/1+3/2=3.5\), but that fact alone does not establish a gamma distribution for the sum.
Likewise, equal rates do not compensate for dependence. Without independence, the product-density convolution argument is not justified, and adding the shapes need not give the distribution of the sum. In an exam solution, state both conditions before applying the closure rule.
Check Your Understanding
For each problem, identify the relevant assumptions before using a distributional result.
- Independent variables \(A\sim\operatorname{Gamma}(2,4)\) and \(B\sim\operatorname{Gamma}(3,4)\) are added. Find the distribution and calculate \(P(A+B>1)\). (Answer: \(\operatorname{Gamma}(5,4)\); \(P(A+B>1)=\frac{103}{3}e^{-4}\approx 0.6288\).)
- Four independent exponential waiting times each have rate \(1.5\) per hour. Find the probability their total is less than 2 hours. (Answer: \(1-13e^{-3}\approx 0.3528\).)
- Independent variables \(C\sim\operatorname{Gamma}(1.5,2)\) and \(D\sim\operatorname{Gamma}(2.5,2)\) are durations in hours. Find \(E[C+D]\), \(\operatorname{Var}(C+D)\), and \(P(C+D>2)\). (Answer: \(E[C+D]=2\) hours, \(\operatorname{Var}(C+D)=1\) hour\(^2\), and \(P(C+D>2)=\frac{71}{3}e^{-4}\approx 0.4335\).)
- A hypothetical duration \(E\) is Erlang with shape 2 and rate 1 per day; an independent duration \(F\) is exponential with rate 2 per day. Can the common-rate closure theorem identify the distribution of \(E+F\)? What is its mean? (Answer: No; the rates differ, so this theorem does not identify the sum distribution. \(E[E+F]=2+0.5=2.5\) days.)