Tutorials › Exam SRM - Statistics for Risk Modeling › Variance Functions In Exponential Families

Exam SRM · Exponential-Family Models · Tutorial 271 of 926

Variance Functions In Exponential Families

Express a response variance through its mean and dispersion, and identify and calculate variance functions for common exponential-family distributions.

Intermediate 11 min read

What You'll Learn

  • Derive the variance-function representation from the exponential-family form
  • Distinguish a variance function from the full response variance
  • Calculate variance for Poisson and binomial responses
  • Use the mean-dispersion parameterization for gamma and inverse Gaussian responses
  • Avoid confusing a count with a sample proportion
  • Compare response variances at the same mean under different distributions

Why Variance Functions Matter

In a generalized linear model, the response distribution describes more than the expected outcome. It also specifies how response variability changes as the expected value changes. For example, a count response may become more variable as its mean increases, while a Bernoulli response has its greatest variance at a mean of one-half. A variance function makes this relationship explicit.

The key distinction is between the variance function itself and the full response variance. The variance function describes how variance depends on the mean; a dispersion factor may scale that function. Some standard distributions have fixed dispersion, while others permit a separate scale parameter. The convention used here is to write the conditional response variance as \(\operatorname{Var}(Y)=\phi V(\mu)\), where \(\mu=E[Y]\), \(\phi\) is the dispersion factor, and \(V(\mu)\) is the variance function.

Definition: In the exponential-family representation $$ f(y;\theta,\phi)=\exp\left\{\frac{y\theta-b(\theta)}{a(\phi)}+c(y,\phi)\right\}, $$ the mean is \(\mu=b'(\theta)\), and the variance is \(a(\phi)b''(\theta)\). Define the variance function by \(V(\mu)=b''(\theta)\), with \(\theta\) expressed as a function of \(\mu\). Thus \(\operatorname{Var}(Y)=a(\phi)V(\mu)\). When \(a(\phi)=\phi\), this becomes \(\operatorname{Var}(Y)=\phi V(\mu)\). If dispersion is fixed at one, the variance is simply \(V(\mu)\).

The function \(V\) is evaluated at an allowable mean for the distribution. For instance, a Bernoulli mean must lie strictly between zero and one for a nondegenerate response, while a Poisson mean is positive. The variance function does not replace these distributional restrictions.

Why the Variance Formula Holds

A short derivation shows why the second derivative of \(b\) determines the variance. Treat \(\phi\) as fixed and write \(a=a(\phi)\). The cumulant-generating function of \(Y\) is \(K(t)=\log E[e^{tY}]\). Multiplying the exponential-family density or probability by \(e^{ty}\) adds \(ty\) to its exponent. The terms involving \(y\) can then be written as \(y(\theta+at)/a\). The normalizing term changes from \(b(\theta)\) to \(b(\theta+at)\), giving

$$ K(t)=\frac{b(\theta+at)-b(\theta)}{a}. $$

Differentiating once and evaluating at zero gives the mean; differentiating twice gives the variance:

$$ K'(0)=b'(\theta)=\mu, \qquad K''(0)=a\,b''(\theta)=\operatorname{Var}(Y). $$

Since \(\mu=b'(\theta)\), the value \(b''(\theta)\) can be expressed as a function of \(\mu\), namely \(V(\mu)\). This proves \(\operatorname{Var}(Y)=a(\phi)V(\mu)\). Under the common convention \(a(\phi)=\phi\), the dispersion factor multiplies the variance function; it is not part of the mean.

Variance Functions for Common Responses

The table gives standard mean-variance relationships. For distributions with a fixed dispersion, the factor shown is one under the usual parameterization. For gamma and inverse Gaussian responses, the listed \(\phi\) is the dispersion factor in the variance.

Response distributionMean and parametersVariance function and variance
Bernoulli\(Y\) is 1 with probability \(p\), 0 otherwise; \(\mu=p\)\(V(\mu)=\mu(1-\mu)\); \(\operatorname{Var}(Y)=\mu(1-\mu)\)
Binomial count\(Y\sim\operatorname{Binomial}(n,p)\); \(\mu=np\)\(\operatorname{Var}(Y)=np(1-p)=\mu(1-\mu/n)\)
Poisson\(Y\sim\operatorname{Poisson}(\mu)\)\(V(\mu)=\mu\); \(\operatorname{Var}(Y)=\mu\)
Normal\(Y\sim N(\mu,\sigma^2)\)\(V(\mu)=1\); \(\operatorname{Var}(Y)=\phi\), with \(\phi=\sigma^2\)
GammaMean \(\mu>0\), dispersion \(\phi>0\)\(V(\mu)=\mu^2\); \(\operatorname{Var}(Y)=\phi\mu^2\)
Inverse GaussianMean \(\mu>0\), dispersion \(\phi>0\)\(V(\mu)=\mu^3\); \(\operatorname{Var}(Y)=\phi\mu^3\)

For a binomial count, the variance can be written as \(n p(1-p)\). Substituting \(p=\mu/n\) gives \(\mu(1-\mu/n)\). A binomial proportion \(Y/n\) has a different variance: \(\operatorname{Var}(Y/n)=p(1-p)/n\). State whether the response is a count or a proportion before applying a formula.

The gamma convention in the table can be made concrete by taking a gamma distribution with shape \(1/\phi\) and scale \(\phi\mu\). Its mean is shape times scale, \((1/\phi)(\phi\mu)=\mu\), and its variance is shape times scale squared, \((1/\phi)(\phi\mu)^2=\phi\mu^2\). This parameterization requires \(\mu>0\) and \(\phi>0\).

Worked Example: Poisson Claim Counts

A hypothetical portfolio segment has a Poisson claim count \(Y\) with parameter \(\lambda=12\) claims per policy-year. Calculate the mean, variance, standard deviation, and the probability of observing exactly 10 claims. Use the Poisson variance function and do not confuse the standard deviation with the variance.

Method. For a Poisson response with parameter \(\lambda\), the mean is \(\mu=\lambda\), and the variance function is \(V(\mu)=\mu\), with fixed dispersion one.

First, \(\mu=12\). Therefore,

$$ \operatorname{Var}(Y)=V(12)=12, \qquad \operatorname{SD}(Y)=\sqrt{12}=3.4641. $$

For the requested probability, use the Poisson probability mass function:

$$ P(Y=10)=e^{-12}\frac{12^{10}}{10!} =e^{-12}\frac{61{,}917{,}364{,}224}{3{,}628{,}800} \approx 0.1048. $$

Thus the mean is 12 claims, the variance is 12 claims squared, the standard deviation is approximately 3.4641 claims, and the probability of exactly 10 claims is 0.1048. The calculation is consistent with the Poisson model: its mean and variance are both 12.

Common mistake avoided: Reporting 3.4641 as the variance. It is the square root of the variance, so it is the standard deviation.

Worked Example: A Grouped Binomial Response

In a hypothetical audit, each of 20 independent files is flagged with probability \(p=0.30\). Let \(Y\) be the number of flagged files. Calculate the mean and variance of the count, then calculate the variance of the flagged-file proportion \(R=Y/20\).

Method. The count has distribution \(Y\sim\operatorname{Binomial}(n=20,p=0.30)\). Its mean is \(\mu=np\), and its variance is \(np(1-p)\).

The mean count is

$$ \mu=np=20(0.30)=6. $$

The count variance is

$$ \operatorname{Var}(Y)=np(1-p) =20(0.30)(0.70)=4.2. $$

The proportion is \(R=Y/20\). For a constant \(c\), \(\operatorname{Var}(cY)=c^2\operatorname{Var}(Y)\), so

$$ \operatorname{Var}(R)=\frac{\operatorname{Var}(Y)}{20^2} =\frac{4.2}{400}=0.0105. $$

As a check, the direct proportion formula gives \(p(1-p)/n=(0.30)(0.70)/20=0.0105\), the same result. The mean count is 6, the count variance is 4.2, and the proportion variance is 0.0105.

Common mistake avoided: Using \(p(1-p)=0.21\) as the variance of the count. That is the Bernoulli variance for one file; for the count of 20 independent files, multiply it by 20.

Worked Example: Gamma Variance at a Given Mean

A hypothetical positive cost \(Y\) follows a gamma distribution with shape \(4\) and scale \(30\) dollars. Calculate its mean, variance, standard deviation, and the corresponding dispersion parameter in the mean-dispersion parameterization.

Method. For a gamma distribution with shape \(\alpha\) and scale \(\beta\), the mean is \(\alpha\beta\) and variance is \(\alpha\beta^2\). In the mean-dispersion parameterization, shape \(=1/\phi\) and scale \(=\phi\mu\).

The mean is

$$ \mu=\alpha\beta=4(30)=120\text{ dollars}. $$

The variance and standard deviation are

$$ \operatorname{Var}(Y)=\alpha\beta^2=4(30^2)=4(900)=3{,}600\text{ dollars}^2, \qquad \operatorname{SD}(Y)=\sqrt{3{,}600}=60\text{ dollars}. $$

The shape relation \(1/\phi=4\) gives \(\phi=0.25\). The scale relation checks this value: \(\phi\mu=0.25(120)=30\) dollars. The variance function gives the same variance:

$$ \phi V(\mu)=\phi\mu^2 =0.25(120^2)=0.25(14{,}400)=3{,}600\text{ dollars}^2. $$

The answer is therefore a mean of 120 dollars, variance of 3,600 dollars squared, standard deviation of 60 dollars, and dispersion \(\phi=0.25\). Both the shape-scale calculation and the variance-function calculation agree.

Common mistake avoided: Using the scale \(30\) as the dispersion. Here 30 is the gamma scale in dollars; the dispersion is \(0.25\), obtained from the shape \(1/\phi=4\).

Comparing Variance Functions at the Same Mean

A mean alone does not determine response variability across different distribution families. For example, suppose two positive responses both have mean \(\mu=10\), and the gamma response has dispersion \(\phi=0.2\). The Poisson variance is \(10\), whereas the gamma variance is \(0.2(10^2)=20\). The distributions have the same mean but different variance functions and, in the gamma case, a separate dispersion factor.

The inverse Gaussian variance function grows more quickly with the mean: for fixed \(\phi\), it is proportional to \(\mu^3\), compared with the gamma function's \(\mu^2\). This describes a distributional variance relationship; it does not, by itself, establish which model is appropriate for a particular data set.

Key takeaway: Identify the response distribution and whether the response is a count, proportion, or continuous measurement. Then find \(V(\mu)\), apply the appropriate dispersion factor, and check that the resulting variance corresponds to the stated response scale.

Common Exam Traps

  • Dropping the dispersion factor. For gamma and inverse Gaussian responses, \(V(\mu)\) alone is not the full variance when \(\phi\ne1\). Multiply by \(\phi\).
  • Confusing a count with a proportion. A binomial count has variance \(np(1-p)\); its proportion has variance \(p(1-p)/n\).
  • Using the mean where the parameterization differs. For a binomial count, \(\mu=np\), not \(p\). Substitute \(p=\mu/n\) if expressing the count variance as a function of its mean.
  • Calling a standard deviation a variance. The standard deviation is the square root of the variance and has the response's original units.
  • Ignoring the mean's allowable range. A calculated mean must be compatible with the response distribution, such as \(0<\mu<n\) for a nondegenerate binomial count with size \(n\).

Check Your Understanding

For each problem, identify the response scale and use its variance function or distributional parameterization.

  1. A hypothetical Poisson count has mean 7.5 events per month. Find its variance and standard deviation. (Answer: variance \(=7.5\); standard deviation \(\approx2.7386\))
  2. A hypothetical binomial count records successes among 12 independent trials, each with success probability \(0.25\). Find the count mean and variance, then find the variance of the sample proportion. (Answer: count mean \(=3\), count variance \(=2.25\), proportion variance \(=0.015625\))
  3. A hypothetical gamma response has mean 80 dollars and dispersion \(\phi=0.10\). Find its variance and standard deviation. (Answer: variance \(=640\) dollars squared; standard deviation \(\approx25.2982\) dollars)
  4. A hypothetical inverse Gaussian response has mean \(4\) units and dispersion \(\phi=0.05\). Find its variance using the variance function, then state its standard deviation. (Answer: variance \(=0.05(4^3)=3.2\) units squared; standard deviation \(\approx1.7889\) units)
  5. A hypothetical binomial count has size \(n=15\) and mean \(\mu=6\). Find \(p\), the count variance, and the variance of the corresponding proportion. (Answer: \(p=6/15=0.4\); count variance \(=15(0.4)(0.6)=3.6\); proportion variance \(=3.6/15^2=0.016\))
Clinical Biostats