Tutorials › Exam P - Probability › Gamma Sums with Different Rates

Exam P · Sums of Independent Variables · Tutorial 825 of 915

Gamma Sums with Different Rates

Use rate-parameterized gamma models, convolution, and moment generating functions to analyze independent gamma sums when the component rates differ.

Advanced 10 min read

What You'll Learn

  • Parameterize a gamma distribution by its shape and rate, and state the MGF’s domain.
  • Distinguish common-rate gamma closure from sums with unequal rates.
  • Derive the density of an independent sum by convolution.
  • Calculate a sum’s density and probability for unequal-rate exponential and Erlang variables.
  • Use the MGF to check whether a proposed gamma model is valid.

Why unequal rates require care

When independent gamma variables have a common rate, their sum is gamma: the shapes add and the rate stays the same. If the rates differ, that closure rule does not apply. The sum is still a well-defined random variable, and its distribution can be analyzed, but it generally cannot be described by simply adding the shapes and choosing one of the component rates.

The key tools are the moment generating function (MGF) and convolution. The MGF can show whether the sum has a standard gamma form; convolution gives a density that can be integrated to find probabilities. These methods are aligned with the SOA Exam P (Probability) syllabus.

Definition: In this tutorial, \(X\sim\operatorname{Gamma}(\alpha,\lambda)\) means that \(X\) has shape \(\alpha>0\) and rate \(\lambda>0\), with density $$ f_X(x)=\frac{\lambda^\alpha}{\Gamma(\alpha)}x^{\alpha-1}e^{-\lambda x},\qquad x>0. $$ Its density is zero for \(x\leq 0\). Under this rate parameterization, \(E[X]=\alpha/\lambda\), \(\operatorname{Var}(X)=\alpha/\lambda^2\), and \(M_X(t)=(1-t/\lambda)^{-\alpha}\) for \(t<\lambda\).

The rate is the reciprocal scale. In particular, an exponential variable with rate \(\lambda\) is \(\operatorname{Gamma}(1,\lambda)\). Always check whether a problem specifies a rate or a scale before substituting into a formula.

What the MGF says about gamma closure

Suppose \(X\sim\operatorname{Gamma}(\alpha,\lambda_1)\) and \(Y\sim\operatorname{Gamma}(\beta,\lambda_2)\) are independent. Independence gives the MGF of their sum \(S=X+Y\):

$$ M_S(t)=M_X(t)M_Y(t) =\left(1-\frac{t}{\lambda_1}\right)^{-\alpha} \left(1-\frac{t}{\lambda_2}\right)^{-\beta}. $$

If \(\lambda_1=\lambda_2=\lambda\), this becomes \((1-t/\lambda)^{-(\alpha+\beta)}\), the MGF of \(\operatorname{Gamma}(\alpha+\beta,\lambda)\). If the rates differ, the product has separate singularities at \(t=\lambda_1\) and \(t=\lambda_2\). A single gamma MGF has just one such singularity, so the product cannot be the MGF of a gamma distribution with positive shape and rate. Thus, for two independent gamma variables with positive shapes, unequal rates rule out ordinary gamma closure.

Theorem: For independent \(X\sim\operatorname{Gamma}(\alpha,\lambda_1)\) and \(Y\sim\operatorname{Gamma}(\beta,\lambda_2)\), the sum is \(\operatorname{Gamma}(\alpha+\beta,\lambda)\) by gamma closure when \(\lambda_1=\lambda_2=\lambda\). When \(\lambda_1\ne\lambda_2\), the sum is not gamma-distributed. Its MGF is still the product above, for \(t<\min(\lambda_1,\lambda_2)\).

The MGF does not itself provide a convenient closed-form CDF for every unequal-rate sum. A general and direct method is to convolve the component densities. For independent continuous variables, the density of \(S=X+Y\) is the integral of \(f_X(x)f_Y(s-x)\) over values of \(x\) for which both variables are positive. For positive gamma variables, that range is \(0<x<s\).

Convolution for gamma sums

Substituting the two gamma densities into the convolution formula gives, for \(s>0\),

$$ f_S(s)= \frac{\lambda_1^\alpha\lambda_2^\beta} {\Gamma(\alpha)\Gamma(\beta)} e^{-\lambda_2s} \int_0^s x^{\alpha-1}(s-x)^{\beta-1} e^{-(\lambda_1-\lambda_2)x}\,dx. $$

This expression is valid whether or not the rates match. With equal rates, the exponential involving \(x\) disappears; evaluating the remaining beta-type integral recovers the common-rate gamma result. With unequal rates, the integral generally remains part of the density calculation, though integer shapes often make it manageable using elementary integration.

Why the convolution formula holds: To obtain a sum equal to \(s\), the component values must be \(x\) and \(s-x\). For a small interval of sum values near \(s\), contributions from component values near \(x\) are proportional to \(f_X(x)f_Y(s-x)\,dx\), by independence. Summing these contributions over all feasible \(x\) gives the density integral. Since gamma variables are positive, feasibility requires \(0<x<s\).

Worked Example: A Sum of Unequal-Rate Exponentials

Let \(X\sim\operatorname{Gamma}(1,2)\) and \(Y\sim\operatorname{Gamma}(1,5)\) be independent. Find \(P(X+Y>1)\). Give the probability to four decimal places.

Method. Each variable is exponential, so use convolution to derive the sum density and then integrate its upper tail. The unequal rates mean the sum is not exponential.

The component densities are \(f_X(x)=2e^{-2x}\) and \(f_Y(y)=5e^{-5y}\) for positive arguments. For \(s>0\),

$$ \begin{aligned} f_S(s) &=\int_0^s 2e^{-2x}\,5e^{-5(s-x)}\,dx\\ &=10e^{-5s}\int_0^s e^{3x}\,dx\\ &=\frac{10}{3}e^{-5s}(e^{3s}-1)\\ &=\frac{10}{3}(e^{-2s}-e^{-5s}). \end{aligned} $$

Integrating from 1 to infinity,

$$ \begin{aligned} P(S>1) &=\int_1^\infty \frac{10}{3}(e^{-2s}-e^{-5s})\,ds\\ &=\frac{10}{3}\left(\frac{e^{-2}}{2}-\frac{e^{-5}}{5}\right)\\ &=\frac{5e^{-2}-2e^{-5}}{3}\\ &\approx 0.2211. \end{aligned} $$

Check. The density integrates over \(s>0\) to \(\frac{10}{3}(\frac12-\frac15)=1\). Its tail at 1 is positive and less than 1, as required. The answer, rounded only at the final step, is \(0.2211\) to four decimal places. A common mistake is to treat the sum as an exponential with rate 2 or 5; neither choice gives the convolution density above.

Integer shapes: convolution can stay elementary

When a gamma shape is a positive integer, the distribution is also called an Erlang distribution. Its density contains an integer power of the variable, so convolution may reduce to integrating a polynomial times an exponential. The next example shows every step, including the probability calculation.

Worked Example: An Erlang Variable Plus an Exponential Variable

Let \(X\sim\operatorname{Gamma}(2,2)\) and \(Y\sim\operatorname{Gamma}(1,4)\) be independent. Find \(P(X+Y\leq 1)\). Give the probability to four decimal places.

Method. Write the Erlang density and exponential density, convolve them, and integrate the resulting density. This avoids imposing a gamma model on a sum with unequal rates.

The densities are \(f_X(x)=4xe^{-2x}\) for \(x>0\) and \(f_Y(y)=4e^{-4y}\) for \(y>0\). For \(s>0\),

$$ \begin{aligned} f_S(s) &=\int_0^s 4xe^{-2x}\,4e^{-4(s-x)}\,dx\\ &=16e^{-4s}\int_0^s xe^{2x}\,dx. \end{aligned} $$

Integration by parts gives \(\int_0^s xe^{2x}\,dx=e^{2s}(s/2-1/4)+1/4\). Therefore,

$$ f_S(s)=8se^{-2s}-4e^{-2s}+4e^{-4s},\qquad s>0. $$

Now integrate from 0 to 1. Using \(\int_0^1 se^{-2s}\,ds=[1-3e^{-2}]/4\), \(\int_0^1 e^{-2s}\,ds=(1-e^{-2})/2\), and \(\int_0^1 e^{-4s}\,ds=(1-e^{-4})/4\), we obtain

$$ \begin{aligned} P(S\leq 1) &=8\left(\frac{1-3e^{-2}}{4}\right) -4\left(\frac{1-e^{-2}}{2}\right) +4\left(\frac{1-e^{-4}}{4}\right)\\ &=1-4e^{-2}-e^{-4}\\ &\approx 0.4403. \end{aligned} $$

Check. The density is nonnegative because its original convolution-integral form has a nonnegative integrand. Also, \(P(S\leq 1)\) is between 0 and 1. The result is \(0.4403\), to four decimal places. A common mistake is to add the shapes and use rate 2 or 4; the MGF product has two distinct rate factors, not the MGF of a single gamma variable.

Worked Example: An Unequal-Rate Sum With a Different Shape Pair

Let \(X\sim\operatorname{Gamma}(2,3)\) and \(Y\sim\operatorname{Gamma}(1,1)\) be independent. Find \(P(X+Y\leq 1)\), to four decimal places.

Method. Use the convolution integral. In this case \(Y\) is exponential, and the integral has a simple antiderivative. The rates differ, so common-rate closure is not available.

The densities are \(f_X(x)=9xe^{-3x}\) and \(f_Y(y)=e^{-y}\). Thus, for \(s>0\),

$$ \begin{aligned} f_S(s) &=\int_0^s 9xe^{-3x}e^{-(s-x)}\,dx\\ &=9e^{-s}\int_0^s xe^{-2x}\,dx\\ &=\frac{9}{4}e^{-s}\left[1-(1+2s)e^{-2s}\right]. \end{aligned} $$

Equivalently, \(f_S(s)=\frac94e^{-s}-\frac94(1+2s)e^{-3s}\). Integrating this form from 0 to 1 gives

$$ \begin{aligned} P(S\leq1) &=\frac94(1-e^{-1}) -\frac94\int_0^1(1+2s)e^{-3s}\,ds\\ &=\frac94(1-e^{-1}) -\frac94\left(\frac{5}{9}-\frac{11}{9}e^{-3}\right)\\ &=1-\frac94e^{-1}+\frac{11}{4}e^{-3}\\ &\approx 0.3092. \end{aligned} $$

Check. The CDF expression is about \(1-0.8277+0.1369=0.3092\), between 0 and 1. The probability is rounded to four decimal places. The tempting calculation that adds the shapes to get 3 and assigns either component rate would produce a gamma CDF, but that model is invalid because the rates are 3 and 1.

Using the MGF as a check, not a shortcut to closure

The MGF remains useful even when it does not identify a familiar distribution. It gives moments by differentiation, and its product form provides a quick check on a proposed model. For independent gamma components,

$$ E[S]=\frac{\alpha}{\lambda_1}+\frac{\beta}{\lambda_2}, \qquad \operatorname{Var}(S)=\frac{\alpha}{\lambda_1^2}+\frac{\beta}{\lambda_2^2}. $$

These follow from additivity of expectation and, under independence, additivity of variance. They do not imply that \(S\) is gamma. Matching a candidate gamma distribution to these two moments is not proof of equality in distribution; its MGF must also match.

1
State the parameterization and independence.
Identify each shape and rate, and confirm that the variables are independent before multiplying MGFs or using the independent-sum convolution.
2
Check the rates.
If all gamma summands share a rate, use gamma closure. If two positive-shape terms have different rates, do not claim their sum is gamma.
3
Choose a calculation method.
For probabilities, convolve the densities and integrate over the event. For integer shapes, simplify the polynomial-exponential integral; use the MGF to verify structure or obtain moments.
4
Check the result.
A density must be nonnegative and integrate to 1; a probability must lie between 0 and 1. Check units and rate-versus-scale interpretation before rounding.

Common exam trap

A frequent error is to see two gamma variables, add their shapes, and call the sum gamma without checking the rates. For example, with independent \(X\sim\operatorname{Gamma}(2,3)\) and \(Y\sim\operatorname{Gamma}(1,1)\), the incorrect step would be

$$ X+Y\ \text{is claimed to be}\ \operatorname{Gamma}(3,3). $$

That claim is wrong. The correct MGF is

$$ M_{X+Y}(t)=\left(1-\frac{t}{3}\right)^{-2}(1-t)^{-1}, $$

which has distinct rate factors and is not a single gamma MGF. In this example, convolution gives \(P(X+Y\leq1)=1-\frac94e^{-1}+\frac{11}{4}e^{-3}\approx0.3092\), as calculated above. The correction is not to guess a different single rate; use the correct convolution or retain the product MGF for the question being asked.

Key takeaway: Gamma closure depends on a common rate, not merely on independence or on the gamma family. With unequal rates, write the product MGF to test a proposed distribution and use convolution for the density and probabilities.

Check Your Understanding

For each problem, assume the stated variables are independent and use the shape-rate parameterization.

  1. Let \(X\sim\operatorname{Gamma}(1,2)\) and \(Y\sim\operatorname{Gamma}(1,5)\). Find \(P(X+Y>1)\). (Answer: \((5e^{-2}-2e^{-5})/3\approx0.2211\))
  2. Let \(X\sim\operatorname{Gamma}(2,4)\) and \(Y\sim\operatorname{Gamma}(1,2)\). Write the MGF of \(S=X+Y\), and calculate \(E[S]\) and \(\operatorname{Var}(S)\). Is \(S\) gamma-distributed? (Answer: \(M_S(t)=(1-t/4)^{-2}(1-t/2)^{-1}\), \(E[S]=1\), \(\operatorname{Var}(S)=3/8\); no, because the rates differ.)
  3. Let \(X\sim\operatorname{Gamma}(2,3)\) and \(Y\sim\operatorname{Gamma}(1,1)\). Find \(P(X+Y\leq1)\). (Answer: \(1-\frac94e^{-1}+\frac{11}{4}e^{-3}\approx0.3092\))
  4. Let \(X\sim\operatorname{Gamma}(2,1)\) and \(Y\sim\operatorname{Gamma}(1,3)\). Find the density of \(S=X+Y\) for \(s>0\). (Answer: \(f_S(s)=\frac32se^{-s}-\frac34e^{-s}+\frac34e^{-3s}\))
  5. Let \(X\sim\operatorname{Gamma}(2,2)\) and \(Y\sim\operatorname{Gamma}(2,4)\). Find the mean and variance of \(S=X+Y\), and determine whether it is gamma-distributed. (Answer: \(E[S]=3/2\), \(\operatorname{Var}(S)=5/8\); no, because the rates differ.)
Clinical Biostats