Why the Gamma Variance Function Matters
For a positive continuous response, the mean alone does not describe how much variation to expect. In a gamma response model, the variance grows with the square of the mean, and a separate dispersion parameter controls its scale. This relationship is useful because it tells us what pattern of variability the model assumes before we consider predictors or choose a link.
The key distinction is between the variance of a particular response distribution and the variance function, which describes how the variance depends on the mean after the dispersion factor has been separated out. We derive both from the gamma cumulant function, using the exponential-dispersion parameterization.
Gamma Exponential-Dispersion Form
Let \(Y\) have a gamma distribution with mean \(\mu>0\) and dispersion \(\phi>0\). In shape-scale notation its shape is \(1/\phi\) and its scale is \(\phi\mu\). Thus its density, for \(y>0\), is
The natural parameter is \(\theta=-1/\mu<0\). The cumulant function for the exponential-dispersion representation is \(b(\theta)=-\log(-\theta)\), and the dispersion factor is \(\phi\). Specifically, the density can be written as
where
The function \(b\) is called the cumulant function because it determines the response’s cumulants. Here the dispersion parameter scales those cumulants: the first cumulant is \(b'(\theta)\), and the second is \(\phi b''(\theta)\). We derive these relationships for this gamma distribution below rather than treating them as formulas to memorize.
Deriving the Cumulant Generating Function
The cumulant generating function of \(Y\) is \(K_Y(t)=\log E[\exp(tY)]\), wherever the expectation is finite. In the density above, multiplying by \(\exp(ty)\) changes the term \(y\theta\) to \(y(\theta+\phi t)\). The resulting kernel is integrable precisely when \(\theta+\phi t<0\), the natural-parameter domain of this gamma density. Comparing its normalizing factor with that of the original density gives
Taking logarithms yields the cumulant generating function. Substituting \(b(\theta)=-\log(-\theta)\) and \(\theta=-1/\mu\) makes its form especially clear:
The stated domain follows from \(\theta+\phi t<0\): since \(\theta=-1/\mu\), this inequality is equivalent to \(t<1/(\phi\mu)\). In particular, the domain contains an open interval around zero, so the first two derivatives of \(K_Y\) at zero give the mean and variance.
Worked Example: Finding the Cumulant Function
Suppose \(Y\) has mean \(\mu=4\) and dispersion \(\phi=1/2\). Find its cumulant generating function and state its domain.
Substitute the two parameter values into the general expression:
The domain condition is \(t<1/(\phi\mu)\), so here \(t<1/2\). This includes an interval around zero, as required for differentiating the cumulant generating function to obtain its first two cumulants.
Mean, Variance, and Variance Function
Differentiate the cumulant generating function with respect to \(t\). For general \(\mu>0\) and \(\phi>0\), the first two derivatives are
Because the moment generating function is finite near zero, the standard cumulant identities apply: \(K_Y'(0)=E[Y]\) and \(K_Y''(0)=\operatorname{Var}(Y)\). Evaluating at zero gives the gamma mean and variance. Separating the dispersion factor identifies the variance function.
This calculation also verifies the general exponential-dispersion derivative relationships for this case. Differentiating the cumulant function \(b\) with respect to its natural parameter gives
Since \(\theta=-1/\mu\), it follows that \(b'(\theta)=\mu\) and \(\phi b''(\theta)=\phi\mu^2\). Thus the cumulant-function and cumulant-generating-function derivations agree.
Worked Example: Computing the Mean and Variance
Let \(Y\) have mean \(\mu=20\) and dispersion \(\phi=0.25\). Find its variance, standard deviation, and coefficient of variation. Check the results using its gamma shape and scale.
The variance function is \(V(\mu)=\mu^2\), so the variance is the dispersion times that function:
Therefore the standard deviation is \(\sqrt{100}=10\), and the coefficient of variation, defined as standard deviation divided by mean, is \(10/20=0.5\). For a check, the shape is \(1/\phi=4\) and the scale is \(\phi\mu=5\). A gamma distribution with shape \(4\) and scale \(5\) has mean \(4(5)=20\) and variance \(4(5^2)=100\), matching the cumulant calculation.
What the Variance Function Says
The variance function \(V(\mu)=\mu^2\) is not itself the variance. It describes the mean-dependent part of the variance; the full variance includes the dispersion multiplier \(\phi\). At fixed dispersion, doubling the mean multiplies the variance by four. At fixed mean, doubling the dispersion doubles the variance.
The coefficient of variation makes the role of dispersion especially transparent. Since \(\operatorname{Var}(Y)=\phi\mu^2\), the standard deviation is \(\sqrt{\phi}\mu\) for \(\mu>0\). Dividing by the mean gives a coefficient of variation of \(\sqrt{\phi}\), independent of \(\mu\). Thus changing the mean while holding dispersion fixed changes the absolute spread but not the spread relative to the mean.
Worked Example: Separating Mean and Dispersion Effects
Compare two gamma responses. Response A has \(\mu=3\), \(\phi=0.2\); response B has \(\mu=6\), \(\phi=0.2\). Then compare response A with a third response having \(\mu=3\), \(\phi=0.4\).
For response A, \(V(3)=3^2=9\), so its variance is \(0.2(9)=1.8\). For response B, the mean has doubled but dispersion is unchanged: \(V(6)=6^2=36\), and its variance is \(0.2(36)=7.2\). The ratio is \(7.2/1.8=4\), as predicted by the squared-mean relationship.
For the third response, the mean is again 3, so the variance function remains 9. Its variance is \(0.4(9)=3.6\), twice response A’s variance because its dispersion doubled. The mean has not changed, so this comparison isolates the dispersion effect.
Common Mistake: Confusing the Function With the Variance
A frequent error is to report \(V(\mu)=\mu^2\) as the full variance and omit \(\phi\). For example, at \(\mu=20\) and \(\phi=0.25\), this mistake gives a variance of 400. But 400 is the variance-function value; the variance is \(\phi V(\mu)=0.25(400)=100\). The correction is to keep the two quantities distinct: \(V(\mu)\) describes how variance depends on the mean, while \(\phi\) scales that relationship.
The reverse mistake is to treat \(\phi\mu^2\) as the variance function. Under the definition used here, the variance function excludes the dispersion factor, so it is \(\mu^2\). This separation is what allows the mean-dependent variance pattern and the overall dispersion scale to be discussed separately.
Check Your Understanding
Use the distinction between the variance function and the full variance in your answers.
- For a gamma response with mean 5 and dispersion 0.3, calculate the variance and identify the variance-function value.
- Write the cumulant generating function for general \(\mu>0\) and \(\phi>0\), and state the range of \(t\) on which it is finite.
- If the mean is multiplied by three while dispersion is fixed, by what factor does the variance change? Explain using the variance function.
- For fixed mean, what happens to the variance when the dispersion is multiplied by four?
- Show from the variance formula that the coefficient of variation is \(\sqrt{\phi}\).