Why Profile the Gamma Likelihood?
A gamma severity model has two parameters: a shape and a rate. When both are unknown, the likelihood score equations are coupled. For complete positive observations, the rate can be estimated directly once the shape is specified. Substituting that rate estimate into the likelihood leaves just one equation in the shape. This reduction is called profiling.
This tutorial uses the shape-rate parameterization. In particular, the rate is not the scale: the mean is shape divided by rate. Assume \(X_1,\ldots,X_n\) are independent observations from the same gamma distribution, with no censoring or truncation.
Deriving the Profile Equation
For complete observations \(x_1,\ldots,x_n>0\), define the arithmetic sample mean \(\bar{x}=\sum_i x_i/n\). Taking logarithms of the product of the densities gives the log-likelihood
For a fixed \(\alpha\), differentiate with respect to \(\beta\) and set the score to zero:
This is the rate estimate conditional on a specified shape. Substituting it into the log-likelihood gives the profile log-likelihood, a function of \(\alpha\) alone:
Let \(\psi(\alpha)=\frac{d}{d\alpha}\log\Gamma(\alpha)\), the digamma function. Differentiating the profile log-likelihood and setting its derivative to zero yields the shape equation.
The right side measures the gap between the logarithm of the arithmetic mean and the mean of the logarithms. It is nonnegative: by the arithmetic-geometric mean inequality, \(\bar{x}\geq(\prod_i x_i)^{1/n}\), so taking logarithms gives the result. The gap is zero exactly when all observations are equal.
Why the Shape Solution Is Unique
The shape equation is generally solved with a numerical root finder. Its structure explains when a solution exists and why there is only one. Define \(g(\alpha)=\log\alpha-\psi(\alpha)\). Its derivative is
The summand is positive and decreasing in \(k\), so its sum is greater than the integral of the same function from zero to infinity:
Therefore \(g'(\alpha)<0\): the left side of the shape equation is strictly decreasing. It tends to infinity as \(\alpha\) tends to zero and to zero as \(\alpha\) tends to infinity. Consequently, each positive right side has exactly one positive root. This establishes a unique finite shape estimate for any nonconstant sample.
If all observations are identical, the right side is zero and there is no finite root. In this case, taking \(\beta=\alpha/\bar{x}\) while letting \(\alpha\) increase makes the fitted gamma distribution concentrate around the common observation. The likelihood increases without bound; the data do not produce a finite joint maximum likelihood estimate.
Profiling in Practice
The calculation has three main stages: summarize the observations, form the right side of the shape equation, and solve for its positive root. The rate is then recovered from the sample mean. The following examples show the full calculation and how to check the result.
Compute \(\bar{x}\) and the average of the logarithms, \(\frac{1}{n}\sum_i\log x_i\).
Calculate \(s=\log\bar{x}-\frac{1}{n}\sum_i\log x_i\).
Solve \(\log\alpha-\psi(\alpha)=s\), then use \(\widehat{\beta}=\widehat{\alpha}/\bar{x}\).
Substitute the estimated shape into the left side and confirm it agrees with \(s\), subject to numerical rounding.
Worked Example: Profiling a Gamma Severity Model
A hypothetical portfolio has three complete severity observations, measured in thousands of dollars: \(1,2,4\). Assume the observations are independent and identically distributed gamma losses with unknown shape \(\alpha\) and rate \(\beta\), where \(\beta\) is measured per thousand dollars. Find the maximum likelihood estimates. Method: profile out the rate. This avoids treating the two parameters as unrelated score equations.
Step 1: Calculate the sample summaries. The sum is \(1+2+4=7\), so \(\bar{x}=7/3\). The sum of logarithms is \(\log 1+\log 2+\log 4=\log 8\), and the average log is \((\log 8)/3=\log 2\).
Step 2: Form the shape target.
Step 3: Solve for the shape. The equation is \(\log\alpha-\psi(\alpha)=0.1541507\). A numerical root finder gives \(\widehat{\alpha}\approx3.401\). For a check, the left side at \(\alpha=3.401\) is approximately \(0.1542\), agreeing with the target to the displayed precision.
Step 4: Recover the rate.
The fitted mean is \(\widehat{\alpha}/\widehat{\beta}\approx3.401/1.458\approx2.333\) thousand dollars, which agrees with the sample mean \(7/3\). The estimates are \(\widehat{\alpha}=3.401\) and \(\widehat{\beta}=1.458\) per thousand dollars, rounded to three decimal places.
Worked Example: A More Uneven Sample
A hypothetical review records three complete loss amounts, in thousands of dollars: \(1,1,4\). Assume an independent gamma model with unknown shape and rate. Estimate both parameters. Method: use the profile equation and then recover the rate. The trap to avoid is using a moment estimate for shape as though it were the maximum likelihood estimate.
Step 1: Calculate the summaries. The sample mean is \(\bar{x}=(1+1+4)/3=2\). The sum of logarithms is \(\log 1+\log 1+\log 4=\log4\), so the average log is \((\log4)/3\).
Step 2: Calculate the target.
Step 3: Solve for shape and check. Solving \(\log\alpha-\psi(\alpha)=0.2310491\) gives \(\widehat{\alpha}\approx2.317\). Substitution gives \(\log(2.317)-\psi(2.317)\approx0.2310\), confirming the root to the displayed precision.
Step 4: Estimate rate.
Rounded to three decimal places, the estimates are \(\widehat{\alpha}=2.317\) and \(\widehat{\beta}=1.159\) per thousand dollars. The fitted mean \(2.317/1.1585=2.000\) thousand dollars matches the sample mean.
Worked Example: Effect of Changing Measurement Units
A hypothetical set of complete losses is \(2,4,8,16\) thousand dollars. Assume a common gamma distribution with unknown shape and rate. Estimate the parameters, and state what changes if the amounts are recorded in dollars instead. Method: profile using the thousand-dollar values first. The unit conversion trap is to leave the rate unchanged after changing the units.
Step 1: Find the summaries in thousands. The sample mean is \(\bar{x}=(2+4+8+16)/4=7.5\). The product is \(2\cdot4\cdot8\cdot16=1024=2^{10}\), so the average log is \((\log1024)/4=2.5\log2\approx1.7328680\).
Step 2: Calculate the target and solve.
The positive root of \(\log\alpha-\psi(\alpha)=0.2820351\) is \(\widehat{\alpha}\approx1.923\). Substitution gives a left side of approximately \(0.2820\), a check against the target.
Step 3: Estimate the rate.
If all observations are instead expressed in dollars, the sample mean is \(7{,}500\), while the average log increases by \(\log 1000\). The difference \(s\) is unchanged, so the shape estimate remains \(1.923\). The rate becomes \(1.923/7{,}500\approx0.0002564\) per dollar, or \(0.2564\) per thousand dollars. Thus the shape is dimensionless, while the rate changes inversely with the measurement unit. Rounded to four significant figures, the thousand-dollar rate is \(0.2564\).
Common Mistake and Practical Interpretation
A tempting shortcut is to use the gamma moment relationship \(\alpha=E[X]^2/\operatorname{Var}(X)\) with sample summaries and call the result the maximum likelihood estimate. That relationship motivates a method-of-moments estimate; it is not the profiled likelihood equation. For the first example, the mean is \(7/3\). The variance calculated with divisor \(n\) is
Using the moment ratio would give \((7/3)^2/(14/9)=3.5\), not the profile maximum likelihood estimate \(3.401\). The correction is to use the gamma score equation for likelihood estimation. A moment estimate may be useful for initialization, but it is a different estimation method.
Another essential check is that the rate estimate is \(\widehat{\alpha}/\bar{x}\), not \(\bar{x}/\widehat{\alpha}\). The latter has the units of the observation, whereas a rate must have reciprocal units. Profiling is useful because it reduces a two-parameter likelihood problem to one scalar equation without discarding the rate: once shape is estimated, the rate follows directly.
Check Your Understanding
For each problem, state the shape equation and use it as far as requested. Monetary measurements are hypothetical.
- A complete sample of losses, in thousands of dollars, is \(3,6,12\), modeled as independent gamma observations with unknown shape and rate. Use the profile equation to estimate shape and rate. (Answer: \(\widehat{\alpha}\approx3.401\), \(\widehat{\beta}\approx0.486\) per thousand dollars.)
- For complete observations \(2,4,8,16\), calculate the right side of the shape equation, then give the shape and rate estimates in the original thousand-dollar units. (Answer: \(s\approx0.2820\), \(\widehat{\alpha}\approx1.923\), and \(\widehat{\beta}\approx0.2564\) per thousand dollars.)
- A sample has \(n=3\), \(\bar{x}=5\), and \(\frac{1}{n}\sum_i\log x_i=\log 4\). Write its shape equation and the rate estimate in terms of the shape root. (Answer: \(\log\widehat{\alpha}-\psi(\widehat{\alpha})=\log(5/4)\approx0.2231\); \(\widehat{\beta}=\widehat{\alpha}/5\).)
- Four complete observations are all \(9\). What does the profile equation imply about the existence of finite maximum likelihood estimates? (Answer: \(s=0\), so there is no finite positive shape root; the likelihood is unbounded as \(\alpha\) increases with \(\beta=\alpha/9\).)