Tutorials › Generalized Linear Models › The Gamma Case at Power Two

Power Variance Functions · Tutorial 617 of 981

The Gamma Case at Power Two

See why power two corresponds to a gamma response, and translate Tweedie mean and dispersion into the gamma distribution’s shape and scale.

Advanced 9 min read

What You'll Learn

  • Identify the support and parameter conditions for the Tweedie model at power two.
  • Derive its gamma shape and scale parameters from the mean and dispersion.
  • Verify the mean and variance using the gamma moment-generating function.
  • Relate the Tweedie canonical parameter and cumulant function to the mean.
  • Interpret how dispersion controls shape and relative variability.

Why Power Two Gives a Gamma Response

In the Tweedie exponential-dispersion family, the power in the variance function determines how variability changes with the mean. At power two, variance grows in proportion to the square of the mean. The continuous response distribution with this variance structure is the gamma distribution, with its parameters linked directly to the Tweedie mean and dispersion.

This link is useful because gamma distributions are often specified by shape and scale, while generalized linear models describe a response through its mean and dispersion. Translating between the two parameterizations shows what the dispersion means for the response’s shape, spread, and relative variability.

Definition: A Tweedie exponential-dispersion model with power \(p=2\), mean \(\mu\), and dispersion \(\phi\) has \(\mu>0\), \(\phi>0\), positive support \(y>0\), and variance function \(V(\mu)=\mu^2\). Thus its variance is \(\operatorname{Var}(Y)=\phi\mu^2\). In the gamma parameterization with shape \(\alpha\) and scale \(\beta\), its parameters are \(\alpha=1/\phi\) and \(\beta=\phi\mu\).

Deriving the Gamma Parameterization

Use the exponential-dispersion convention \(f(y;\theta,\phi)=a(y,\phi)\exp\{(y\theta-\kappa(\theta))/\phi\}\). For the power-two case, the natural parameter has domain \(\theta<0\), and the cumulant function is \(\kappa(\theta)=-\log(-\theta)\). The mean is \(\kappa'(\theta)=-1/\theta\), so setting \(\theta=-1/\mu\) gives the desired mean \(\mu>0\).

For a gamma distribution with shape \(\alpha>0\) and scale \(\beta>0\), the density is \(y^{\alpha-1}\exp(-y/\beta)/\{\Gamma(\alpha)\beta^\alpha\}\) for \(y>0\). The scale, rather than the rate, is the parameter multiplying the unit of the response. Matching this density to the exponential-dispersion form gives the following result.

Theorem: For \(\mu>0\) and \(\phi>0\), the power-two Tweedie exponential-dispersion density is the gamma density with shape \(\alpha=1/\phi\) and scale \(\beta=\phi\mu\). Equivalently, \(Y\sim\operatorname{Gamma}(1/\phi,\phi\mu)\), using the shape-scale parameterization.

To verify the result, take the gamma density with the proposed parameters and separate the terms involving \(y\), \(\mu\), and \(\phi\):

$$ \begin{aligned} f(y;\mu,\phi) &=\frac{y^{1/\phi-1}\exp\{-y/(\phi\mu)\}} {\Gamma(1/\phi)(\phi\mu)^{1/\phi}}\\ &=\frac{y^{1/\phi-1}}{\Gamma(1/\phi)\phi^{1/\phi}} \exp\left\{\frac{-y/\mu-\log\mu}{\phi}\right\},\qquad y>0. \end{aligned} $$

Since \(\theta=-1/\mu\) and \(\kappa(\theta)=\log\mu\), the exponent is exactly \(\{y\theta-\kappa(\theta)\}/\phi\). The remaining factor is \(a(y,\phi)=y^{1/\phi-1}/\{\Gamma(1/\phi)\phi^{1/\phi}\}\), which does not depend on \(\mu\). The density is normalized: with \(\alpha=1/\phi>0\) and \(\beta=\phi\mu>0\), the substitution \(u=y/\beta\) gives

$$ \int_0^\infty \frac{y^{\alpha-1}e^{-y/\beta}}{\Gamma(\alpha)\beta^\alpha}\,dy =\frac{1}{\Gamma(\alpha)}\int_0^\infty u^{\alpha-1}e^{-u}\,du =1. $$

The last equality is the defining gamma-integral identity for \(\Gamma(\alpha)\), valid for \(\alpha>0\). Thus the matching density is a proper gamma density for every permitted \(\mu\) and \(\phi\). \(\square\)

Verifying the Mean and Variance

The parameter mapping should reproduce the mean and variance specified by the Tweedie model, not merely its density form. For a gamma random variable with shape \(\alpha>0\) and scale \(\beta>0\), its moment-generating function exists for \(t<1/\beta\). Direct integration gives

$$ \begin{aligned} M_Y(t) &=E[e^{tY}]\\ &=\frac{1}{\Gamma(\alpha)\beta^\alpha} \int_0^\infty y^{\alpha-1}\exp\{-(1/\beta-t)y\}\,dy\\ &=(1-\beta t)^{-\alpha},\qquad t<1/\beta. \end{aligned} $$

For the final equality, \(1/\beta-t>0\) under the stated restriction, and the gamma integral with rate \(1/\beta-t\) evaluates the integral. Differentiating at zero yields the first two raw moments. In particular, \(M_Y'(0)=\alpha\beta\) and \(M_Y''(0)=\alpha(\alpha+1)\beta^2\). Therefore,

Result: If \(Y\) has a gamma distribution with shape \(\alpha>0\) and scale \(\beta>0\), then \(E[Y]=\alpha\beta\) and \(\operatorname{Var}(Y)=\alpha\beta^2\). With \(\alpha=1/\phi\) and \(\beta=\phi\mu\), these become \(E[Y]=\mu\) and \(\operatorname{Var}(Y)=\phi\mu^2\).

Indeed, substituting the Tweedie parameters gives

$$ E[Y]=\frac{1}{\phi}(\phi\mu)=\mu,\qquad \operatorname{Var}(Y)=\frac{1}{\phi}(\phi\mu)^2=\phi\mu^2. $$

This proves that the gamma representation has both the required mean and the power-two variance function. It also confirms that \(\phi\), not \(\phi^2\), is the multiplicative dispersion factor in the variance. \(\square\)

Worked Parameter Conversions

Worked Example: From Tweedie Mean and Dispersion to Gamma Parameters

Suppose \(\mu=10\) and \(\phi=0.25\). Convert to gamma shape and scale, then check the mean and variance.

The shape is \(\alpha=1/\phi=1/0.25=4\). The scale is \(\beta=\phi\mu=0.25(10)=2.5\). Thus \(Y\sim\operatorname{Gamma}(4,2.5)\), in shape-scale notation.

Using the gamma moments, \(E[Y]=\alpha\beta=4(2.5)=10\), and \(\operatorname{Var}(Y)=\alpha\beta^2=4(2.5)^2=25\). The Tweedie variance gives the same value: \(\phi\mu^2=0.25(10^2)=25\). The two calculations agree.

Worked Example: Recovering Tweedie Parameters From a Gamma Model

A response is modeled as gamma with shape \(3\) and scale \(2\). Find the corresponding Tweedie mean and dispersion and verify the variance.

Since the shape is \(1/\phi\), the dispersion is \(\phi=1/3\). Since the scale is \(\phi\mu\), solve \(2=(1/3)\mu\) to obtain \(\mu=6\). Therefore the Tweedie parameters are \(\mu=6\) and \(\phi=1/3\).

The gamma mean is \(3(2)=6\), and its variance is \(3(2^2)=12\). From the Tweedie form, \(\phi\mu^2=(1/3)(6^2)=12\). Both moments match. The density also has the expected power-two exponential-dispersion form; for example, at \(y=4\), the gamma density is \(4^{3-1}e^{-4/2}/\{2^3\Gamma(3)\}=16e^{-2}/(8\cdot2)=e^{-2}\).

Worked Example: Same Dispersion, Different Means

Compare two responses with the same dispersion \(\phi=0.25\), but means \(\mu_1=2\) and \(\mu_2=8\).

For both responses, the gamma shape is \(1/0.25=4\). Their scales are \(\beta_1=0.25(2)=0.5\) and \(\beta_2=0.25(8)=2\). The respective variances are \(4(0.5)^2=1\) and \(4(2)^2=16\), also given by \(0.25(2^2)=1\) and \(0.25(8^2)=16\).

The standard deviations are \(1\) and \(4\). Dividing each by its mean gives \(1/2=0.5\) and \(4/8=0.5\). Thus the relative standard deviation is the same even though the absolute spread is larger at the higher mean.

Interpreting Dispersion and Shape

The mapping gives a useful interpretation of the dispersion parameter. A smaller \(\phi\) means a larger gamma shape \(1/\phi\); at fixed \(\mu\), it also means a smaller scale \(\phi\mu\). A larger \(\phi\) means a smaller shape and a larger scale. Both parameters change together so that the mean remains \(\mu\).

The coefficient of variation, the standard deviation divided by the mean, is \(\sqrt{\operatorname{Var}(Y)}/E[Y]\). Here it simplifies to

$$ \frac{\sqrt{\phi\mu^2}}{\mu}=\sqrt{\phi}, $$

because \(\mu>0\). Thus, for fixed dispersion, the gamma response has the same relative variability at every mean, while its absolute standard deviation is \(\mu\sqrt{\phi}\) and grows with the mean. This is one way the power-two variance function differs in interpretation from a variance that stays constant as the mean changes.

The support restriction matters: a gamma response in this model is continuous and strictly positive. The gamma density assigns probability one to \(Y>0\), and it does not describe a response that can equal zero. The mean and dispersion must also be positive; using an invalid sign for either parameter would not produce positive gamma shape and scale parameters.

Common Parameterization Pitfalls

  • Using \(\phi\) as the gamma shape. The shape is its reciprocal, \(1/\phi\). For instance, \(\phi=0.25\) gives shape \(4\), not \(0.25\).
  • Calling \(\phi\) the gamma scale. The scale is \(\phi\mu\), so it changes with the mean. The dispersion alone does not specify the scale.
  • Confusing scale and rate. If a gamma distribution is parameterized by rate instead, its rate is \(1/(\phi\mu)\); it is not the scale \(\phi\mu\).
  • Forgetting the square on the mean. At power two, the variance is \(\phi\mu^2\), not \(\phi\mu\). Checking the gamma moments exposes this error.
  • Assuming the response can be zero. This gamma model has positive support. A process with a point mass at zero needs a different distributional description.
Key takeaway: The power-two Tweedie response is gamma with shape \(1/\phi\) and scale \(\phi\mu\). This parameterization gives mean \(\mu\), variance \(\phi\mu^2\), and coefficient of variation \(\sqrt{\phi}\).

Check Your Understanding

Use the shape-scale gamma parameterization throughout.

  1. For \(\mu=5\) and \(\phi=0.2\), what are the gamma shape and scale?
  2. A gamma response has shape \(8\) and scale \(0.75\). Find its corresponding Tweedie mean and dispersion.
  3. For \(\mu=3\) and \(\phi=0.4\), calculate the variance both from the Tweedie formula and from the gamma parameters.
  4. Why does holding \(\phi\) fixed keep the coefficient of variation constant as \(\mu\) changes?
  5. What goes wrong if \(\phi\) is interpreted as the gamma shape rather than its reciprocal?
Clinical Biostats