Why Gamma Parameterization Matters
A gamma distribution is often written using either a rate or a scale parameter. These are reciprocal quantities, but they appear in different places in the density and produce different-looking formulas for the mean and variance. Confusing them can change a probability calculation substantially while leaving the answer superficially plausible.
The distinction is especially useful when modeling a total time made up of several independent exponential waiting times. Such a total has a gamma distribution, and its parameters depend on the exponential rate. This tutorial sets out both gamma forms, shows how to convert between them, and works through densities, moments, and waiting-time probabilities. It is aligned with the SOA Exam P (Probability) syllabus.
Rate and Scale: Convert Before Calculating
The shape parameter is the same in both forms. The rate \(\lambda\) is measured in inverse units of \(X\), while the scale \(\theta\) has the same units as \(X\). For example, if \(X\) is measured in hours, \(\lambda\) is measured per hour and \(\theta\) is measured in hours. Always check that the exponent is dimensionless: \(\lambda x\) in rate form or \(x/\theta\) in scale form.
| Quantity | Rate form | Scale form |
|---|---|---|
| Density factor | \(\lambda^\alpha e^{-\lambda x}\) | \(\theta^{-\alpha}e^{-x/\theta}\) |
| Parameter conversion | \(\lambda=1/\theta\) | \(\theta=1/\lambda\) |
| Mean | \(\alpha/\lambda\) | \(\alpha\theta\) |
| Variance | \(\alpha/\lambda^2\) | \(\alpha\theta^2\) |
The two columns describe the same distribution when the parameters are reciprocal. The symbols alone do not tell you which convention a source is using: a statement such as “gamma with parameter 2” is incomplete unless it specifies whether 2 is a rate or a scale. Before substituting into a density or moment formula, label the parameter explicitly.
Worked Example: Converting Scale to Rate for a Density and Moments
A hypothetical processing time \(X\), measured in hours, has a gamma distribution with shape \(\alpha=3\) and scale \(\theta=2\) hours. Find its rate, its density at \(x=4\) hours, its mean, and its variance.
Method. Convert the given scale to a rate, then use the rate formulas throughout. This avoids mixing a scale value into a rate-form density.
The rate is the reciprocal of the scale: \( \lambda=1/\theta=1/2=0.5 \) per hour. For shape 3, \( \Gamma(3)=(3-1)!=2 \). Substituting \(x=4\) hours into the rate-form density gives
The mean and variance in rate form are
As a check, the scale formulas give \(E[X]=\alpha\theta=3(2)=6\) hours and \(\operatorname{Var}(X)=\alpha\theta^2=3(2^2)=12\) hours squared, agreeing with the rate calculation. The density is a density per hour, not a probability at exactly four hours.
Why the Moment Formulas Hold
The rate and scale moment formulas follow from integrating the density. For a rate-form gamma variable, multiply its density by \(x^r\) to find the \(r\)th raw moment. For \(r\) such that the integral exists (in particular, for nonnegative integer \(r\)),
Set \(t=\lambda x\), so that \(x=t/\lambda\) and \(dx=dt/\lambda\). The integral becomes \(\Gamma(\alpha+r)/\lambda^{\alpha+r}\). Therefore
Using \(\Gamma(\alpha+1)=\alpha\Gamma(\alpha)\), the first two raw moments are \(E[X]=\alpha/\lambda\) and \(E[X^2]=\alpha(\alpha+1)/\lambda^2\). Subtracting the square of the mean gives the variance:
Replacing \(\lambda\) by \(1/\theta\) gives the scale-form results \(E[X]=\alpha\theta\) and \(\operatorname{Var}(X)=\alpha\theta^2\). The conversion changes the parameter notation, not the distribution.
Adding Gamma Variables and Exponential Waiting Times
Independent gamma variables can be combined particularly simply when their rate parameters are equal. If \(X_1,\ldots,X_m\) are independent, and \(X_j\) has shape \(\alpha_j\) and the same rate \(\lambda\) for every \(j\), then their sum has shape equal to the sum of the shapes and retains rate \(\lambda\). The equal-rate condition is essential for this rule.
One way to justify the addition rule is to consider two independent gamma variables with shapes \(\alpha\) and \(\beta\) and common rate \(\lambda\). Their sum \(Z\) has density given by convolution. For \(z>0\), substitute \(x=zu\) into the convolution integral:
The last step uses the beta integral \(\int_0^1u^{\alpha-1}(1-u)^{\beta-1}\,du =\Gamma(\alpha)\Gamma(\beta)/\Gamma(\alpha+\beta)\). The result is the gamma density with shape \(\alpha+\beta\) and rate \(\lambda\); applying the two-variable result repeatedly proves the stated rule for \(m\) variables.
For an integer shape \(n\), the gamma distribution is also called an Erlang distribution. Its survival probability has a finite-sum formula:
The formula can be obtained by integrating the Erlang density from \(t\) to infinity and applying integration by parts repeatedly. At each step, the integral with a power \(x^k\) reduces to a boundary term and an integral with power \(x^{k-1}\). Repeating until the power is zero produces the terms \(1, \lambda t, \ldots,(\lambda t)^{n-1}/(n-1)!\), all multiplied by \(e^{-\lambda t}\). This also shows why the sum ends at \(n-1\).
Worked Example: Probability for a Sum of Four Waiting Times
A hypothetical device completes four successive stages. Assume the four stage durations are independent and each has an exponential distribution with rate \(\lambda=0.25\) per hour. Let \(T\) be the total duration. Find \(P(T>8\text{ hours})\), and give the mean and variance of \(T\).
Method. Because all four exponential variables are independent and have the same rate, their sum is gamma with shape 4 and rate 0.25 per hour. The common-rate assumption is what permits the Erlang tail formula.
First calculate the dimensionless product \(\lambda t=(0.25)(8)=2\). Then
The mean and variance are
As a check, the probability of finishing by 8 hours is \(1-0.8571=0.1429\), so the requested tail probability is greater than one-half, as expected when 8 hours is below the mean of 16 hours. The probability is reported to four decimal places.
Worked Example: Combining Gamma Variables Given in Different Forms
Two independent components have hypothetical operating times \(A\) and \(B\). Let \(A\) have shape 2 and scale 3 hours. Let \(B\) have shape 3 and rate \(1/3\) per hour. Find the distribution of \(S=A+B\), then calculate \(P(S\leq6\text{ hours})\), \(E[S]\), and \(\operatorname{Var}(S)\).
Method. Convert both distributions to the same parameterization before applying the addition rule. For \(A\), the rate is \(1/3\) per hour because its scale is 3 hours. Thus both components have the common rate \(1/3\) per hour, and their shapes add.
It follows that \(S\) has shape \(2+3=5\) and rate \(1/3\) per hour. At \(t=6\) hours, \(\lambda t=(1/3)(6)=2\). The integer-shape survival probability is
The required probability is the complement: \(P(S\leq6)=1-P(S>6)=1-0.9473=0.0527\), to four decimal places. The moments are
The small probability of completing by 6 hours is consistent with the mean completion time of 15 hours. The check also confirms that the requested event is the lower tail, not the survival probability just calculated.
Common Parameter and Probability Traps
A frequent error is to treat the scale as if it were the rate. In the first example, the scale is 2 hours, so the rate is \(1/2\) per hour. If someone incorrectly uses \(\lambda=2\) per hour, the rate-form formulas would give a mean of \(3/2=1.5\) hours and a variance of \(3/4=0.75\) hours squared, rather than the correct 6 hours and 12 hours squared. The error is not a rounding issue; it describes a different distribution.
A second trap is applying the Erlang formula to a sum that does not meet its assumptions. Independent exponential variables with unequal rates do not, in general, have a gamma sum with a single rate. Likewise, independent gamma variables with unequal rates cannot generally be combined by simply adding their shapes. In those cases, do not force the common-rate formula. Also distinguish a lower-tail probability \(P(T\leq t)\) from the survival probability \(P(T>t)\): the two are complements for a continuous random variable.
Check Your Understanding
For each problem, identify the parameterization before substituting into a formula.
- A variable has shape 4 and rate 0.5 per hour. Find its mean, variance, and density at \(x=2\) hours. (Answer: mean \(8\) hours; variance \(16\) hours squared; density \(0.0307\) per hour.)
- A variable has shape 3 and scale 2 hours. Find \(P(X>4\text{ hours})\). (Answer: \(0.6767\).)
- Three independent waiting times are exponential with common rate 0.2 per minute. Find the probability their sum exceeds 10 minutes. (Answer: \(0.6767\).)
- Independent variables have distributions \(\operatorname{Gamma}(2,\text{rate }0.4)\) and \(\operatorname{Gamma}(3,\text{scale }2.5)\), with time measured in hours. Find the mean and variance of their sum, and the probability the sum exceeds 5 hours. (Answer: mean \(12.5\) hours; variance \(31.25\) hours squared; probability \(0.9473\).)
- Independent variables have distributions \(\operatorname{Gamma}(2,\text{rate }0.5)\) and \(\operatorname{Gamma}(2,\text{rate }1)\), with time measured in hours. Can their sum be assigned a gamma distribution by adding shapes? Give the sum's mean and variance. (Answer: No; the rates differ, so the common-rate addition rule does not apply. The sum has mean \(6\) hours and variance \(10\) hours squared.)