Tutorials › Generalized Linear Models › Gamma Response Parameterizations

Gamma Response Models · Tutorial 570 of 981

Gamma Response Parameterizations

Learn to translate between gamma shape-scale and shape-rate parameters and calculate the distribution’s key quantities in either form.

Intermediate 9 min read

What You'll Learn

  • Define gamma densities using shape and scale or shape and rate
  • Convert between scale and rate without changing the distribution
  • Identify the gamma distribution’s support in both parameterizations
  • Derive its mean and variance from raw moments
  • Calculate and interpret gamma skewness
  • Avoid common errors caused by confusing scale and rate

Why Two Gamma Parameterizations?

Gamma responses are useful when a quantity is continuous, strictly positive, and often right-skewed, as can happen with waiting times, costs, or durations. The same gamma distribution is commonly written using either a scale parameter or a rate parameter. The formulas look different, so distinguishing these conventions is essential when interpreting parameters or translating a formula from one source to another.

We use \(\alpha\) for shape, \(\theta\) for scale, and \(\beta\) for rate. Shape controls the form of the distribution; scale and rate describe the same dimensional aspect in reciprocal units. The parameterization changes, but the probability distribution does not.

Definitions and Conversion

For \(\alpha>0\), the gamma function is defined by the integral below. It supplies the normalizing constant in the gamma density.

$$ \Gamma(\alpha)=\int_0^\infty t^{\alpha-1}e^{-t}\,dt. $$

The integral is finite for \(\alpha>0\). A random variable \(X\) has a gamma distribution with shape \(\alpha\) and scale \(\theta\) if its density has the following form.

Definition: For \(\alpha>0\) and \(\theta>0\), \(X\sim\operatorname{Gamma}(\alpha,\theta)\) in the shape-scale parameterization means
$$ f(x)=\frac{x^{\alpha-1}e^{-x/\theta}}{\Gamma(\alpha)\theta^\alpha},\qquad x>0, $$
and \(f(x)=0\) otherwise. The support is \(x>0\).

In the shape-rate parameterization, the positive rate \(\beta\) appears in the exponential as \(-\beta x\).

Definition: For \(\alpha>0\) and \(\beta>0\), \(X\sim\operatorname{Gamma}(\alpha,\beta)\) in the shape-rate parameterization means
$$ f(x)=\frac{\beta^\alpha}{\Gamma(\alpha)}x^{\alpha-1}e^{-\beta x},\qquad x>0, $$
and \(f(x)=0\) otherwise. The support is again \(x>0\).

The two notations use the same symbol \(\operatorname{Gamma}\); therefore, a formula should state whether its second parameter is scale or rate. Their relationship is reciprocal.

Parameter conversion: The shape-scale parameters \((\alpha,\theta)\) and shape-rate parameters \((\alpha,\beta)\) describe the same gamma distribution exactly when
$$ \beta=\frac{1}{\theta} \qquad\text{or, equivalently,}\qquad \theta=\frac{1}{\beta}. $$
The shape parameter is unchanged.

To verify the conversion, substitute \(\theta=1/\beta\) into the shape-scale density. Its normalizing factor becomes \(1/(\Gamma(\alpha)(1/\beta)^\alpha)=\beta^\alpha/\Gamma(\alpha)\), and its exponential term becomes \(e^{-x/(1/\beta)}=e^{-\beta x}\). The resulting density is precisely the shape-rate density. Since the densities agree at every \(x>0\), they define the same distribution. Both are zero for \(x\leq 0\), so their supports agree as well.

Worked Example: Converting Scale to Rate

Suppose \(X\) has shape \(\alpha=3\) and scale \(\theta=2\). Write the same distribution using a rate parameter and calculate its mean, variance, support, and skewness.

Convert the parameter. The rate is the reciprocal of the scale:

$$ \beta=\frac{1}{\theta}=\frac{1}{2}. $$

Thus the density can be written in shape-scale form as \(x^2e^{-x/2}/(2^3\Gamma(3))\), or in shape-rate form as \((1/2)^3x^2e^{-x/2}/\Gamma(3)\). Since \(\Gamma(3)=2\), both expressions equal \(x^2e^{-x/2}/16\) for \(x>0\).

The mean is \(\alpha\theta=3(2)=6\), equivalently \(\alpha/\beta=3/(1/2)=6\). The variance is \(\alpha\theta^2=3(2^2)=12\), equivalently \(\alpha/\beta^2=3/(1/2)^2=12\). Its support is \(x>0\), and its skewness is \(2/\sqrt{3}\), approximately \(1.155\).

Moments and Skewness

The key calculations follow from the gamma integral. First, integration by parts gives the recurrence \(\Gamma(u+1)=u\Gamma(u)\) for \(u>0\). Indeed, take \(t^u\) as the part to differentiate and \(e^{-t}\,dt\) as the part to integrate. The boundary term \(-t^ue^{-t}\) is zero at both endpoints: \(t^u\) tends to zero as \(t\) decreases to zero, and exponential decay dominates the power as \(t\) tends to infinity. Therefore,

$$ \Gamma(u+1) =\left[-t^ue^{-t}\right]_0^\infty +u\int_0^\infty t^{u-1}e^{-t}\,dt =u\Gamma(u). $$

This recurrence lets us derive the raw moments rather than memorize separate formulas. For a nonnegative integer \(m\), integrate \(x^m\) against the shape-scale density and substitute \(t=x/\theta\). The integral is finite, and the substitution gives

$$ E[X^m] =\frac{1}{\Gamma(\alpha)\theta^\alpha} \int_0^\infty x^{\alpha+m-1}e^{-x/\theta}\,dx =\theta^m\frac{\Gamma(\alpha+m)}{\Gamma(\alpha)}. $$

Applying the recurrence repeatedly yields the first three raw moments. These moments determine the mean, variance, and third central moment.

Derived result: If \(X\sim\operatorname{Gamma}(\alpha,\theta)\) in the shape-scale parameterization, then
$$ E[X]=\alpha\theta,\qquad \operatorname{Var}(X)=\alpha\theta^2,\qquad E[(X-E[X])^3]=2\alpha\theta^3. $$
Consequently, its skewness is \(2/\sqrt{\alpha}\).

For completeness, the derivation is as follows. The recurrence gives \(E[X]=\alpha\theta\), \(E[X^2]=\alpha(\alpha+1)\theta^2\), and \(E[X^3]=\alpha(\alpha+1)(\alpha+2)\theta^3\). Subtracting the squared mean from the second raw moment gives

$$ \operatorname{Var}(X) =E[X^2]-E[X]^2 =\{\alpha(\alpha+1)-\alpha^2\}\theta^2 =\alpha\theta^2. $$

Writing \(\mu=E[X]\), expand \((X-\mu)^3\) and take expectations. The third central moment is \(E[X^3]-3\mu E[X^2]+2\mu^3\), so

$$ E[(X-\mu)^3] =\{\alpha(\alpha+1)(\alpha+2)-3\alpha^2(\alpha+1)+2\alpha^3\}\theta^3 =2\alpha\theta^3. $$

Skewness is the third central moment divided by the variance to the power \(3/2\). Here that gives \((2\alpha\theta^3)/(\alpha\theta^2)^{3/2}=2/\sqrt{\alpha}\), since \(\alpha,\theta>0\). This completes the derivation. \(\square\)

For the rate form, use \(\theta=1/\beta\). The mean and variance become \(\alpha/\beta\) and \(\alpha/\beta^2\), while skewness remains \(2/\sqrt{\alpha}\). The skewness does not depend on scale or rate: it depends only on shape.

Summary: For shape-scale parameters \((\alpha,\theta)\), the support is \(x>0\), the mean is \(\alpha\theta\), the variance is \(\alpha\theta^2\), and the skewness is \(2/\sqrt{\alpha}\). For shape-rate parameters \((\alpha,\beta)\), the support is \(x>0\), the mean is \(\alpha/\beta\), the variance is \(\alpha/\beta^2\), and the skewness is \(2/\sqrt{\alpha}\).

Worked Example: Calculating Quantities From a Rate

Let \(X\) have shape \(\alpha=4\) and rate \(\beta=2\). Give the equivalent scale form and calculate the requested quantities.

The scale is the reciprocal of the rate: \(\theta=1/2\). The rate density is \(f(x)=2^4x^{4-1}e^{-2x}/\Gamma(4)\) for \(x>0\). Since \(\Gamma(4)=3!=6\), this is \(f(x)=(8/3)x^3e^{-2x}\).

The support is \(x>0\). In rate form, the mean is \(\alpha/\beta=4/2=2\), and the variance is \(\alpha/\beta^2=4/4=1\). As a check, the scale calculations give \(\alpha\theta=4(1/2)=2\) and \(\alpha\theta^2=4(1/4)=1\). The skewness is \(2/\sqrt{4}=1\).

Worked Example: Finding Parameters From the Mean and Variance

Suppose a gamma distribution is required to have mean \(10\) and variance \(20\). Find its shape, scale, and rate, then calculate its skewness.

Let \(\mu=10\) and \(v=20\). In shape-scale form, \(\mu=\alpha\theta\) and \(v=\alpha\theta^2\). Dividing \(v\) by \(\mu\) gives \(\theta=v/\mu=20/10=2\). Then \(\alpha=\mu/\theta=10/2=5\). The equivalent rate is \(\beta=1/\theta=1/2\).

Check both moments in the rate form: \(\alpha/\beta=5/(1/2)=10\), and \(\alpha/\beta^2=5/(1/4)=20\). The support remains \(x>0\), and skewness is \(2/\sqrt{5}\), approximately \(0.894\). Thus the specified mean and variance determine positive parameters and the resulting distribution has the claimed moments.

Interpreting the Parameters Carefully

The shape parameter affects skewness: as \(\alpha\) increases, \(2/\sqrt{\alpha}\) decreases. Scale and rate affect the units and magnitude of \(X\), but not this standardized measure of asymmetry. For example, changing scale while holding shape fixed changes the mean and variance but leaves skewness unchanged.

A common mistake is to treat a larger rate as if it meant a larger scale. The formulas show the reverse: increasing \(\beta\) decreases the mean \(\alpha/\beta\), whereas increasing \(\theta\) increases the mean \(\alpha\theta\). A reliable check is to ask what happens to \(X\) when the parameter changes: a higher rate makes the exponential factor \(e^{-\beta x}\) decay faster, while a higher scale stretches the distribution toward larger values.

Another possible confusion concerns the density near zero. When \(0<\alpha<1\), the factor \(x^{\alpha-1}\) grows without bound as \(x\) approaches zero from above. This does not put probability at zero: the support remains \(x>0\), and a density value at a point is not a point probability. The distribution still assigns probability zero to the single point \(X=0\).

Key takeaway: Always identify whether the second parameter is scale or rate. Convert by taking its reciprocal, then calculate the mean and variance using one consistent form. Shape determines skewness; scale and rate are reciprocal descriptions of spread.

Check Your Understanding

Use the definitions and formulas above to answer these questions.

  1. Write the shape-rate parameters equivalent to shape \(6\), scale \(3\), and state the support.
  2. For shape \(2\) and rate \(4\), calculate the mean, variance, and skewness.
  3. Explain why the shape-scale and shape-rate densities describe the same distribution when \(\beta=1/\theta\).
  4. A gamma distribution has mean \(12\) and variance \(36\). Find its shape, scale, and rate.
  5. Does changing scale while holding shape fixed change skewness? Explain using the formula.
Clinical Biostats