Tutorials › Generalized Linear Models › Gamma and Inverse-Gaussian Canonical Parameters

Exponential-Family Representation · Tutorial 36 of 981

Gamma and Inverse-Gaussian Canonical Parameters

Learn how to read and compare the canonical parameter, log-partition function, and natural-parameter domain for gamma and inverse-Gaussian responses.

Beginner 9 min read

What You'll Learn

  • Write each family in dispersion-scaled canonical form.
  • Derive the gamma canonical parameter and log-partition function from its mean.
  • Derive the inverse-Gaussian canonical parameter and log-partition function from its mean.
  • Determine which natural parameters have finite normalizers, including the inverse-Gaussian boundary.
  • Compare the two canonical parameterizations without confusing them with their mean parameters.

Why Compare These Two Families?

Both the gamma and inverse-Gaussian models describe positive responses, and both can be written in dispersion-scaled exponential-family form. Their canonical parameters, however, are different functions of the mean. Their log-partition functions also have different shapes, and their natural-parameter domains differ at the boundary. Keeping these distinctions clear matters when identifying a model's canonical structure.

We use the form \(\exp\{[y\theta-b(\theta)]/\phi+c(y,\phi)\}\), where \(y>0\), \(\phi>0\) is the dispersion parameter, \(\theta\) is the canonical parameter, \(b\) is the log-partition function, and \(c\) does not depend on \(\theta\). The natural-parameter domain consists of the values of \(\theta\) for which the corresponding normalizing integral is finite. For these two families, the domain calculation is especially instructive: the gamma boundary is excluded, while the inverse-Gaussian boundary is included.

Gamma: Canonical Parameter and Log Partition

In the gamma mean-dispersion representation, the response has mean \(\mu>0\), dispersion \(\phi>0\), shape \(1/\phi\), and scale \(\phi\mu\). Its density is

$$ f(y;\mu,\phi) = \frac{y^{1/\phi-1}\exp\{-y/(\phi\mu)\}} {\Gamma(1/\phi)(\phi\mu)^{1/\phi}}, \qquad y>0. $$

Set \(\theta=-1/\mu\), so \(\theta<0\), and take \(b(\theta)=-\log(-\theta)\). Since \(-\theta=1/\mu\), the canonical part becomes

$$ \frac{y\theta-b(\theta)}{\phi} = \frac{-y/\mu-\log\mu}{\phi}. $$

The remaining terms can be placed in \(c(y,\phi)\), giving the full representation

$$ f(y;\mu,\phi) = \exp\left\{ \frac{y\theta-b(\theta)}{\phi}+c(y,\phi) \right\}, \qquad \theta=-\frac{1}{\mu},\quad b(\theta)=-\log(-\theta), $$
$$ c(y,\phi) = \left(\frac{1}{\phi}-1\right)\log y -\log\Gamma(1/\phi) -\frac{1}{\phi}\log\phi. $$

In this chosen representation, \(\theta\) is negative and \(b\) is defined on the negative half-line. The boundary question—whether zero also belongs to the natural-parameter domain—will be decided by the normalizing integral, not just by the formula for \(b\).

Worked Example: Gamma Canonical Form at a Specific Mean

Take \(\mu=2\) and \(\phi=1/2\). The gamma shape is \(1/\phi=2\), its scale is \(\phi\mu=1\), and its density is \(f(y)=y e^{-y}\) for \(y>0\).

The canonical parameter and log partition are \(\theta=-1/2\) and \(b(\theta)=-\log(1/2)=\log 2\). The carrier term is \(c(y,1/2)=\log y-\log\Gamma(2)-2\log(1/2)=\log y+\log 4\), because \(\Gamma(2)=1\).

Substituting into the canonical form gives \[ \frac{y\theta-b(\theta)}{\phi}+c(y,\phi) = 2\left(-\frac{y}{2}-\log 2\right)+\log y+\log 4 = -y+\log y. \] Exponentiating yields \(y e^{-y}\), exactly the original density. In particular, at \(y=1\) the density is \(e^{-1}\).

Inverse Gaussian: Canonical Parameter and Log Partition

For the inverse-Gaussian mean-dispersion representation, \(\mu>0\) and \(\phi>0\), and the density is

$$ f(y;\mu,\phi) = \frac{1}{\sqrt{2\pi\phi y^3}} \exp\left\{ -\frac{(y-\mu)^2}{2\phi\mu^2y} \right\}, \qquad y>0. $$

Expanding the quadratic in the exponent gives \[ -\frac{(y-\mu)^2}{2\phi\mu^2y} = \frac{1}{\phi} \left( -\frac{y}{2\mu^2}+\frac{1}{\mu} \right) -\frac{1}{2\phi y}. \] Thus the coefficient of \(y\) identifies \(\theta=-1/(2\mu^2)\), and choosing \(b(\theta)=-1/\mu\) gives the required \(+1/\mu\) term in \(-b(\theta)\). Since \(\theta<0\), we can express the log partition in terms of \(\theta\) as \(b(\theta)=-\sqrt{-2\theta}\). The carrier term and full form are

$$ c(y,\phi)=-\frac{1}{2\phi y}-\frac{1}{2}\log(2\pi\phi y^3), \qquad \theta=-\frac{1}{2\mu^2}, \qquad b(\theta)=-\sqrt{-2\theta}. $$

The negative square root is required: for \(\theta=-1/(2\mu^2)\), it gives \(b(\theta)=-1/\mu\). Using the positive square root would produce the wrong sign in the exponent.

Worked Example: Evaluating the Inverse-Gaussian Density Canonically

Take \(\mu=2\), \(\phi=1/2\), and evaluate the density at \(y=2\). The canonical values are \(\theta=-1/8\) and \(b(\theta)=-1/2\).

At \(y=2\), the canonical contribution is \[ \frac{y\theta-b(\theta)}{\phi} = \frac{2(-1/8)-(-1/2)}{1/2} = \frac{1/4}{1/2} = \frac{1}{2}. \] The carrier term is \[ c(2,1/2) = -\frac{1}{2} -\frac{1}{2}\log(8\pi). \] Adding these terms leaves \(-\tfrac12\log(8\pi)\), so the density is \(1/\sqrt{8\pi}\). Direct substitution into the original density gives the same answer: the quadratic term is zero because \(y=\mu\), and the prefactor is \(1/\sqrt{2\pi(1/2)2^3}=1/\sqrt{8\pi}\).

Natural-Parameter Domains: Normalizer Calculations

A parameter value belongs to the natural-parameter domain precisely when the integral of the unnormalized density kernel is finite and can be normalized. The following result gives the domains for these particular representations. The calculation also explains why checking the boundary is essential.

Theorem: For the gamma representation above, the natural-parameter domain is \((-\infty,0)\). For the inverse-Gaussian representation above, it is \((-\infty,0]\). In both cases, \(\phi>0\) is fixed.

Gamma proof. With \(\alpha=1/\phi>0\), the parameter-dependent integral in the gamma kernel is proportional to \[ \int_0^\infty y^{\alpha-1}\exp(\theta y/\phi)\,dy. \] If \(\theta<0\), write \(r=-\theta/\phi>0\). Substitution \(u=ry\) gives \[ \int_0^\infty y^{\alpha-1}e^{-ry}\,dy = r^{-\alpha}\Gamma(\alpha), \] which is finite because \(\alpha>0\). If \(\theta=0\), the integral becomes \(\int_0^\infty y^{\alpha-1}\,dy\), which diverges at infinity for every \(\alpha>0\). If \(\theta>0\), its integrand grows exponentially at infinity, so the integral diverges. Thus the domain is exactly \((-\infty,0)\). The same gamma integral gives \(b(\theta)=-\log(-\theta)\): the normalizer is proportional to \((-\theta)^{-1/\phi}\), whose logarithm contributes \(-b(\theta)/\phi\). \(\square\)

Inverse-Gaussian proof. Apart from its positive constant multiplier, the relevant integral is \[ I(\theta)= \int_0^\infty y^{-3/2} \exp\left\{\frac{\theta y}{\phi}-\frac{1}{2\phi y}\right\}\,dy. \] If \(\theta>0\), the exponential grows as \(y\) tends to infinity, so the integral diverges. For \(\theta\leq 0\), put \(a=-\theta/\phi\geq0\) and \(q=1/(2\phi)>0\). The identity \[ \int_0^\infty y^{-3/2}e^{-ay-q/y}\,dy = \sqrt{\frac{\pi}{q}}\,e^{-2\sqrt{aq}} \] shows that \(I(\theta)\) is finite for every such \(\theta\), including zero. To verify the identity, substitute \(t=\sqrt{q/y}\). The integral becomes \(2q^{-1/2}K(aq)\), where \[ K(s)=\int_0^\infty e^{-t^2-s/t^2}\,dt. \] For \(s>0\), differentiation under the integral is justified locally in \(s\) by an integrable bound: near zero the factor \(e^{-s/t^2}\) controls \(t^{-2}\), and near infinity \(e^{-t^2}\) controls the integrand. Substitution \(u=\sqrt{s}/t\) then gives \(K'(s)=-K(s)/\sqrt{s}\). Solving this differential equation and using \(K(s)\to K(0)=\sqrt{\pi}/2\) as \(s\downarrow0\), by monotone convergence, yields \(K(s)=(\sqrt{\pi}/2)e^{-2\sqrt{s}}\). This proves the identity, including \(a=0\) by the same limit. Applying it here gives \[ (2\pi\phi)^{-1/2}I(\theta) = \exp\left\{-\frac{\sqrt{-2\theta}}{\phi}\right\} = \exp\{b(\theta)/\phi\}, \] so \(b(\theta)=-\sqrt{-2\theta}\), including at \(\theta=0\). Hence the domain is \((-\infty,0]\). \(\square\)

Worked Example: Checking the Inverse-Gaussian Boundary

At the boundary \(\theta=0\), the inverse-Gaussian canonical form has \(b(0)=0\). For \(\phi=1\), its density reduces to \[ f(y)=\frac{1}{\sqrt{2\pi}}y^{-3/2}e^{-1/(2y)},\qquad y>0. \] The normalizing integral can be checked directly. With \(t=1/\sqrt{2y}\), so that \(y=1/(2t^2)\) and \(dy=-t^{-3}dt\), \[ \int_0^\infty y^{-3/2}e^{-1/(2y)}\,dy = 2\sqrt{2}\int_0^\infty e^{-t^2}\,dt = 2\sqrt{2}\,\frac{\sqrt{\pi}}{2} = \sqrt{2\pi}. \] The prefactor \(1/\sqrt{2\pi}\) therefore makes the integral one. This verifies directly that zero is included in the inverse-Gaussian domain. By contrast, the gamma kernel at its boundary has a power-law integral that diverges.

Comparing the Parameterizations

FamilyCanonical parameter from the meanLog-partition functionNatural-parameter domain
Gamma\(\theta=-1/\mu\)\(b(\theta)=-\log(-\theta)\)\((-\infty,0)\)
Inverse Gaussian\(\theta=-1/(2\mu^2)\)\(b(\theta)=-\sqrt{-2\theta}\)\((-\infty,0]\)

For example, at \(\mu=4\), the gamma canonical parameter is \(-1/4\), whereas the inverse-Gaussian canonical parameter is \(-1/32\). These are not competing estimates of the same quantity: each is the canonical coordinate appropriate to a different family. Their log-partition functions also apply to their own respective coordinates. Both domains contain negative values, but only the inverse-Gaussian domain contains zero.

Common Pitfall and Practical Use

Common mistake: “Both models have negative canonical parameters, so both natural-parameter domains are strictly negative.” This reasoning treats the sign suggested by the mean-based formula as a complete domain calculation. It overlooks the boundary: an algebraic formula valid for \(\mu>0\) describes negative parameter values, but the natural-parameter domain is determined by finiteness of the normalizing integral, including at values not attained by a finite positive mean. The gamma integral diverges at zero; the inverse-Gaussian integral is finite there.

Correction: separate two questions. First, for a finite positive mean, what canonical parameter does the representation assign? Second, for which parameter values is the normalizing integral finite? For the gamma family, finite positive means map to \(\theta<0\), and the domain excludes zero. For the inverse-Gaussian family, finite positive means also map to negative values, but the normalizer remains finite at zero. The boundary distribution is therefore part of the maximal natural-parameter family even though it does not correspond to a finite positive mean in the displayed mean-based formula.

The comparison is useful whenever a response distribution is written in exponential-dispersion form: it separates the mean parameter from its canonical coordinate and makes the role of the log partition explicit. In particular, the inverse-Gaussian boundary is a reminder that a domain should be established by its integral, not guessed from the range of a mean parameter.

Check Your Understanding

Use the canonical forms and domain calculations above to answer these questions.

  1. For a gamma response with mean \(\mu=3\), state its canonical parameter and log-partition value.
  2. For an inverse-Gaussian response with mean \(\mu=3\), state its canonical parameter and log-partition value.
  3. Why does the gamma natural-parameter domain exclude zero?
  4. What feature of the inverse-Gaussian normalizing integral makes zero admissible?
  5. Explain why the fact that both mean-based canonical parameters are negative does not imply that their natural-parameter domains are identical.
Clinical Biostats