Tutorials › Exam ASTAM - Advanced Short-Term Actuarial Mathematics › Gamma Severity With Unknown Shape And Rate

Exam ASTAM · Likelihood for Complete Data · Tutorial 306 of 979

Gamma Severity With Unknown Shape And Rate

Learn to form and differentiate the two-parameter gamma likelihood, solve its shape equation, and check the resulting maximum likelihood estimates.

Beginner 10 min read

What You'll Learn

  • Write the likelihood and log-likelihood for independent, complete gamma losses.
  • Derive the score equations for unknown shape and rate.
  • Express the rate estimate in terms of the shape and the sample mean.
  • Reduce the shape score to an equation involving the digamma function.
  • Understand why the shape estimate usually has no closed-form solution.
  • Identify the equal-observation case where no finite shape estimate exists.

Introduction

A gamma severity model can describe positive losses with a range of possible shapes, from strongly right-skewed to approximately symmetric. When both its shape and rate are unknown, maximum likelihood estimation requires solving two score equations together. One equation gives the rate directly once the shape is known; the other is generally an equation that must be solved numerically.

This tutorial assumes independent, identically distributed, complete positive loss observations. There is no truncation, censoring, deductible, or policy limit in the likelihood below. Those features would change which observations and likelihood contributions are used.

Definition: A random loss \(X\) has a gamma distribution with shape \(\alpha>0\) and rate \(\beta>0\) if its density is $$ f_X(x;\alpha,\beta)=\frac{\beta^\alpha}{\Gamma(\alpha)}x^{\alpha-1}e^{-\beta x},\qquad x>0. $$ Here, \(\Gamma(\alpha)\) is the gamma function. The rate is \(\beta\), so \(E[X]=\alpha/\beta\) and \(\operatorname{Var}(X)=\alpha/\beta^2\). In particular, \(\beta\) has inverse-loss units.

Likelihood and Score Equations

Let \(x_1,\ldots,x_n\) be observed complete losses, all strictly positive, and suppose they are independent with the same gamma parameters. Independence means the joint likelihood is the product of the individual densities. Taking its logarithm turns the product into a sum, as in the earlier material on likelihoods for complete loss observations.

$$ L(\alpha,\beta)=\prod_{i=1}^n \frac{\beta^\alpha}{\Gamma(\alpha)}x_i^{\alpha-1}e^{-\beta x_i} $$

Define the sample mean \(\bar{x}=\frac{1}{n}\sum_{i=1}^n x_i\), and define the digamma function by \(\psi(\alpha)=\frac{d}{d\alpha}\ln\Gamma(\alpha)\). The log-likelihood is

$$ \ell(\alpha,\beta) =n\alpha\ln\beta-n\ln\Gamma(\alpha) +(\alpha-1)\sum_{i=1}^n\ln x_i-\beta\sum_{i=1}^n x_i. $$

Differentiating with respect to each parameter and setting the derivatives to zero gives the score equations:

$$ \frac{\partial\ell}{\partial\beta} =\frac{n\alpha}{\beta}-\sum_{i=1}^n x_i=0, \qquad \frac{\partial\ell}{\partial\alpha} =n\ln\beta-n\psi(\alpha)+\sum_{i=1}^n\ln x_i=0. $$

The first equation yields \(\hat{\beta}=\hat{\alpha}/\bar{x}\). Substituting this expression into the second equation reduces the problem to one equation in the shape. The hats indicate maximum likelihood estimates.

Theorem: For positive, nonidentical complete observations from a common gamma distribution, the maximum likelihood estimates satisfy $$ \ln\hat{\alpha}-\psi(\hat{\alpha}) =\ln\bar{x}-\frac{1}{n}\sum_{i=1}^n\ln x_i, \qquad \hat{\beta}=\frac{\hat{\alpha}}{\bar{x}}. $$ The shape estimate generally has no closed-form expression and is found by solving the first equation numerically. The rate estimate is then obtained directly from the second equation.

Why the Shape Equation Has This Form

The rate score determines how the fitted distribution’s mean \(\alpha/\beta\) matches the sample mean. The shape score also uses the average of the log observations, so it captures information about their spread that is not contained in the mean alone. Substitution makes this separation explicit.

1
Solve the rate score.
From \(n\alpha/\beta=\sum x_i=n\bar{x}\), obtain \(\beta=\alpha/\bar{x}\).
2
Substitute into the shape score.
Use \(\ln\beta=\ln\alpha-\ln\bar{x}\) and divide the shape score by \(n\).
3
Collect the data terms.
Rearrangement gives \(\ln\alpha-\psi(\alpha)=\ln\bar{x}-\frac{1}{n}\sum\ln x_i\). The digamma function prevents a general algebraic solution for \(\alpha\).

The right side is nonnegative. By the arithmetic-geometric mean inequality, \(\bar{x}\geq(\prod x_i)^{1/n}\), and taking logarithms gives exactly \(\ln\bar{x}\geq\frac{1}{n}\sum\ln x_i\). It equals zero only when every observation is identical. For nonidentical positive observations, it is positive, and the shape equation has one positive solution: \(g(\alpha)=\ln\alpha-\psi(\alpha)\) decreases from infinity toward zero as \(\alpha\) increases. Thus, a numerical root-finding method can determine the shape, after which the rate follows from the sample mean.

Worked Maximum Likelihood Estimates

Each example below uses complete observations in a stated loss unit. The numerical shape estimate is rounded only after solving its score equation; the rate is then reported to four significant figures.

Worked Example: Three Hypothetical Equipment Losses

A hypothetical portfolio has three complete equipment losses of \(1\), \(2\), and \(4\) thousand dollars. Assume the losses are independent observations from one gamma distribution with unknown shape and rate, measured in thousands of dollars. Find the maximum likelihood estimates.

Method and sufficient calculations. The sample size is \(n=3\), the sum is \(1+2+4=7\), and therefore \(\bar{x}=7/3\). The product is \(1\cdot2\cdot4=8\), so the mean log observation is \(\ln(8)/3\). The shape equation’s right side is

$$ \ln(7/3)-\frac{\ln 8}{3} =\ln(7/3)-\ln 2 =\ln(7/6) \approx 0.154151. $$

Solving \(\ln\alpha-\psi(\alpha)=0.154151\) gives \(\hat{\alpha}\approx3.401\). The rate estimate is

$$ \hat{\beta}=\frac{3.401}{7/3} =\frac{3.401\cdot3}{7} \approx1.458 $$

per thousand dollars. As a check, \(\hat{\alpha}/\hat{\beta}\approx3.401/1.458\approx2.333\) thousand dollars, which matches the sample mean \(7/3\). The rate score is therefore zero, and the shape equation was solved using all three log observations. The method avoids treating the sample mean alone as enough to estimate both parameters.

Worked Example: A Skewed Hypothetical Loss Sample

Three hypothetical, fully observed claims are \(2\), \(2\), and \(8\) thousand dollars. Assume independent observations from a gamma severity distribution with unknown shape and rate. Estimate both parameters.

Method and shape calculation. The sample mean is \((2+2+8)/3=4\) thousand dollars. The product is \(32\), so the mean of the logs is \(\ln(32)/3\). Thus the right side of the shape equation is

$$ \ln4-\frac{\ln32}{3} =\frac{\ln64-\ln32}{3} =\frac{\ln2}{3} \approx0.231049. $$

The positive numerical solution of \(\ln\alpha-\psi(\alpha)=0.231049\) is \(\hat{\alpha}\approx2.317\). Therefore,

$$ \hat{\beta}=\frac{2.317}{4}=0.5793 $$

per thousand dollars, to four significant figures. The fitted mean is \(2.317/0.5793\approx4.000\) thousand dollars, agreeing with the observed mean. This check confirms the rate estimate. The shape estimate uses the log observations as well as the mean, so it is not obtained by matching the variance alone.

Common mistake avoided: Using \(4/2.317\) as the rate would reverse the required ratio. Since \(\beta\) is a rate, the correct estimate is \(\hat{\alpha}/\bar{x}\), not \(\bar{x}/\hat{\alpha}\).

Worked Example: Changing the Loss Unit

A hypothetical sample is \(10\), \(30\), and \(90\) dollars. Assume independent complete gamma losses with unknown shape and rate. Find the estimates, and relate them to a sample recorded in tens of dollars.

Shape calculation. In dollars, \(\bar{x}=(10+30+90)/3=130/3\), and the product is \(27{,}000\). Since \(27{,}000=30^3\), the mean log observation is \(\ln30\). The shape equation has right side

$$ \ln(130/3)-\ln30 =\ln(13/9) \approx0.367725. $$

Solving \(\ln\alpha-\psi(\alpha)=0.367725\) gives \(\hat{\alpha}\approx1.505\). The rate estimate in dollars is

$$ \hat{\beta}=\frac{1.505}{130/3} =\frac{4.515}{130} \approx0.03473 $$

per dollar. The fitted mean is \(1.505/0.03473\approx43.33\) dollars, matching \(130/3\) dollars. If the same losses are recorded as \(1\), \(3\), and \(9\) tens of dollars, each observation and the sample mean are divided by \(10\). The shape equation’s right side is unchanged, so \(\hat{\alpha}\) remains approximately \(1.505\). The rate becomes approximately \(0.3473\) per ten dollars, ten times the rate in dollars. The check illustrates that the shape is dimensionless, while the rate must change with the unit.

The common mistake is to keep the numerical rate unchanged after changing units. A rate measured per dollar and one measured per ten dollars have different numerical values, even though they describe the same fitted distribution.

Equal Observations and Model Checks

If all the observed losses equal a common value \(c>0\), then \(\bar{x}=c\) and the shape equation’s right side is zero. For finite \(\alpha>0\), \(\ln\alpha-\psi(\alpha)>0\), so there is no finite shape solution. The likelihood can increase as the shape and rate grow while their ratio remains \(c\); the gamma distribution concentrates more and more tightly around the observed value. Consequently, the ordinary two-parameter gamma model has no finite maximum likelihood estimates for this sample. This is not a case where rounding a numerical root is appropriate.

For nonidentical observations, use the actual positive losses and their logs. A useful sequence of checks is: the shape estimate is positive; the rate estimate is positive; \(\hat{\beta}=\hat{\alpha}/\bar{x}\); and the fitted mean \(\hat{\alpha}/\hat{\beta}\) equals \(\bar{x}\). These checks identify sign, reciprocal, and unit errors, but they do not replace solving the shape score.

Common Exam Traps

  • Confusing rate and scale. This model is parameterized by rate \(\beta\), not scale. The density contains \(e^{-\beta x}\), and the mean is \(\alpha/\beta\).
  • Dropping the log-observation term. The shape score depends on \(\sum\ln x_i\), not only on \(\sum x_i\). Omitting it loses information needed to estimate shape.
  • Assuming a closed-form shape estimate. The digamma function appears in the score equation. In general, the shape must be found numerically.
  • Applying this likelihood to incomplete or modified observations. The displayed likelihood is for complete, unmodified losses. Truncation, censoring, deductibles, or limits require likelihood contributions that reflect what was actually observed.
Key takeaway: For independent, positive, complete gamma losses, first solve \(\ln\hat{\alpha}-\psi(\hat{\alpha})=\ln\bar{x}-n^{-1}\sum\ln x_i\) for the shape. Then set \(\hat{\beta}=\hat{\alpha}/\bar{x}\). The shape equation generally requires numerical solution, while the fitted mean provides a direct check on the rate.

Check Your Understanding

For each question, assume the stated observations are independent, positive, complete losses from a common gamma model unless otherwise noted.

  1. A sample consists of \(3\), \(3\), and \(3\) thousand dollars. What does the shape equation’s right side equal, and do finite two-parameter maximum likelihood estimates exist? (Answer: The right side is \(0\); no finite shape and rate maximum likelihood estimates exist.)
  2. A sample has \(n=4\), \(\bar{x}=5\) dollars, and a numerical shape estimate of \(2\). Find the rate estimate and the fitted mean. (Answer: \(\hat{\beta}=0.4\) per dollar; fitted mean \(=5\) dollars.)
  3. A sample has \(\bar{x}=6\) and mean log observation \(\frac{1}{n}\sum\ln x_i=\ln6-0.270363\). Given that the positive solution of \(\ln\alpha-\psi(\alpha)=0.270363\) is \(\alpha=2\), find both parameter estimates. (Answer: \(\hat{\alpha}=2\), \(\hat{\beta}=2/6=0.3333\) per loss unit.)
  4. Every observation in a positive, nonidentical sample is multiplied by \(100\), changing the loss unit from hundreds of dollars to dollars. What happens to the shape equation’s right side and to the rate estimate? (Answer: The right side is unchanged, so the shape estimate is unchanged; the numerical rate estimate is divided by \(100\).)
Clinical Biostats