Why the Unit Deviance Is Useful
The Tweedie power variance function describes how conditional variance changes with the mean. The unit deviance translates that variance structure into a measure of discrepancy between an observed response and a proposed mean. It is especially useful because it gives a likelihood contrast without requiring the normalizing or carrier term of the density to be written out.
Here the response is \(Y\), its mean is \(\mu>0\), and the power variance function is \(V(\mu)=\mu^p\). The dispersion parameter is \(\phi>0\), so the variance is \(\phi\mu^p\). The formulas below first treat positive observations; boundary cases such as \(Y=0\) are handled separately when the response support allows them.
Deriving the Formula for \(p\ne 1,2\)
An exponential-dispersion model has log-likelihood contribution \(\ell(y;\theta,\phi)=[y\theta-b(\theta)]/\phi+\log a(y,\phi)\), where \(\theta\) is the natural parameter, \(b\) is the cumulant function, and \(a\) is the carrier term. Its mean is \(b'(\theta)\), and its variance is \(\phi b''(\theta)\). For the power variance function, \(b''(\theta)=\mu^p\), with \(\mu=b'(\theta)\).
For \(p\ne1\), integrating \(d\theta/d\mu=1/V(\mu)=\mu^{-p}\) gives \(\theta(\mu)=\mu^{1-p}/(1-p)\), up to an additive constant. For \(p\ne2\), integrating \(db/d\mu=\mu/V(\mu)=\mu^{1-p}\) gives \(b(\theta(\mu))=\mu^{2-p}/(2-p)\), up to an additive constant. These constants do not affect the likelihood contrast.
To obtain the expression, set the saturated mean to \(y\), so its natural parameter is \(\theta(y)\). Subtract the fitted log-likelihood from the saturated one. The carrier term cancels because the observation and dispersion are the same in both contributions. The remaining contrast is
Substituting the expressions for \(\theta\) and \(b\) gives the stated formula. The unit deviance itself has no factor of \(1/\phi\); that factor appears in the log-likelihood difference.
An Integral Form and Its Consequences
A convenient form of the same result is
For \(p\ne1,2\), integrating \(yt^{-p}-t^{1-p}\) between \(\mu\) and \(y\) gives the closed form above. The integral also makes the sign transparent: if \(y>\mu\), both the integrand and the direction of integration are positive; if \(y<\mu\), the integrand is nonpositive over the interval from \(y\) to \(\mu\), and reversing the integration limits makes the integral nonnegative. Equality holds exactly when \(y=\mu\).
For completeness, the derivation of the integral representation from the likelihood contrast can be expressed without relying on the closed form. Since \(d\theta/dt=1/V(t)=t^{-p}\) and \(db/dt=t\,d\theta/dt=t^{1-p}\),
The integral is finite for positive \(y,\mu\), including when \(p=1\) or \(p=2\), because its interval stays away from zero.
Worked Example: A Power of \(p=1.5\)
Let \(p=1.5\), observed response \(y=4\), and proposed mean \(\mu=2\). The formula gives
The result is positive, as expected because \(y\ne\mu\). If \(\phi=0.5\), the saturated-minus-fitted log-likelihood difference is \(d(4,2)/(2\phi)=0.9706\), not the unit deviance multiplied by \(1/\phi\).
The Poisson and Gamma Limits
The closed form has apparent singularities at \(p=1\) and \(p=2\). These are removable for positive \(y\) and \(\mu\). The integral form gives a direct justification: on the finite interval between two positive endpoints, \(t^{-p}\) is bounded uniformly for \(p\) in a sufficiently small neighborhood of either value. The integrand therefore converges uniformly as \(p\) approaches 1 or 2, so the limit can be taken inside the integral.
At \(p=1\), integrating the limit of the integral representation yields
At \(p=2\), the corresponding calculation is
These integral evaluations prove the limits and identify the familiar special cases. At a zero observation, the Poisson formula extends by the convention \(0\log(0/\mu)=0\), giving \(d(0,\mu)=2\mu\). For the compound Poisson-Gamma Tweedie range \(1<p<2\), the same limit from positive \(y\) gives \(d(0,\mu)=2\mu^{2-p}/(2-p)\). A Gamma response has positive support, so its unit deviance is used for \(y>0\), not for a zero response.
Worked Example: The Poisson Limit
Take \(p=1\), \(y=3\), and \(\mu=2\). Then
For a zero response with the same mean, the convention gives \(d(0,2)=2(2)=4\). The zero case is a boundary value of the Poisson formula, rather than a direct substitution into an expression containing \(0\log 0\).
Worked Example: The Gamma Limit
Take \(p=2\), \(y=4\), and \(\mu=2\). The Gamma unit deviance is
Again the deviance is nonnegative. The Gamma expression uses a positive observation; substituting \(y=0\) would not describe an outcome in the Gamma response support.
How Deviance Enters Likelihood Calculations
For independent observations from a common Tweedie model with fixed \(p\) and \(\phi\), add the individual unit deviances:
When the saturated model is admissible, the likelihood identity is
Thus the total deviance is \(D\), while the scaled deviance is \(D/\phi\). They are not interchangeable: the factor \(1/\phi\) belongs in the scaled deviance and in twice the log-likelihood difference, not in the definition of \(D\).
This role has an important limit. For fixed \(p\), \(\phi\), and observed data, the carrier terms cancel in a fitted-versus-saturated contrast, so deviance summarizes that contrast. But the deviance alone is not the entire exact likelihood. The carrier term can depend on \(y\), \(\phi\), and \(p\); it matters, for example, when exact likelihoods are compared across dispersion or power values. A likelihood calculation that retains only \(D/(2\phi)\) in such a comparison can omit terms that vary with the parameters.
Common Mistake
A frequent error is to define total deviance as \(\sum_i d(y_i,\mu_i)/\phi\). That expression is the scaled deviance, not the total deviance. The correction is to keep the quantities separate: first calculate \(D=\sum_i d(y_i,\mu_i)\); then divide by \(\phi\) if scaled deviance is wanted. The saturated-minus-fitted log-likelihood difference is \(D/(2\phi)\).
A second pitfall is to substitute \(p=1\) or \(p=2\) directly into the formula for \(p\ne1,2\). Its denominators vanish there. Take the limit, or use the integral form, to obtain the Poisson or Gamma expression.
Check Your Understanding
Use the formulas and distinctions developed above.
- For \(p\ne1,2\), identify the natural parameter \(\theta(\mu)\) and cumulant function \(b(\theta(\mu))\) associated with \(V(\mu)=\mu^p\).
- Explain why the carrier term cancels in a saturated-versus-fitted contrast for a fixed observation and dispersion.
- For independent observations, write the definitions of total deviance and scaled deviance, and state the log-likelihood difference they imply.
- Why is the unit deviance nonnegative when \(y,\mu>0\)? Use the integral representation.
- State the appropriate boundary value of the Poisson unit deviance at \(y=0\), and explain why the same substitution is not appropriate for a Gamma response.