Tutorials › Exam ASTAM - Advanced Short-Term Actuarial Mathematics › Deriving Weibull Moments With The Gamma Function

Exam ASTAM · Severity Model Families · Tutorial 49 of 979

Deriving Weibull Moments With The Gamma Function

Learn to derive Weibull moments from the gamma integral and apply them reliably to calculate severity means, variances, and coefficients of variation.

Intermediate 11 min read

What You'll Learn

  • Write the Weibull density in shape-and-scale form and identify its parameters.
  • Transform the raw-moment integral into the gamma-function integral.
  • Derive the general Weibull raw moment and the formulas for mean and variance.
  • Calculate the coefficient of variation and distinguish it from the scale parameter.
  • Avoid common errors involving the gamma-function argument and moment units.

Why Weibull Moments Require Care

The Weibull distribution is a flexible model for a positive loss severity. Its parameters do not usually equal familiar summaries such as the mean and standard deviation. Instead, those summaries involve gamma-function values. The key calculation is a change of variable that turns the Weibull moment integral into the defining integral for the gamma function.

Once that transformation is established, one formula gives every raw moment that exists. The first two raw moments then give the mean and variance, while their ratio gives the coefficient of variation. These results are useful in actuarial work because they let you calculate and compare severity summaries directly from the model parameters.

Definition: In this tutorial, \(X\) has a two-parameter Weibull severity distribution with shape \(k>0\) and scale \(\lambda>0\) if, for \(x\geq 0\), $$ S_X(x)=\exp\left[-\left(\frac{x}{\lambda}\right)^k\right], \qquad f_X(x)=\frac{k}{\lambda}\left(\frac{x}{\lambda}\right)^{k-1} \exp\left[-\left(\frac{x}{\lambda}\right)^k\right]. $$ The loss is nonnegative and continuous, and the model describes the underlying severity without a deductible, limit, truncation, or censoring adjustment. The scale parameter \(\lambda\) has the same units as \(X\); \(k\) is dimensionless.

The Gamma Function and the Weibull Moment Integral

For \(z>0\), the gamma function is defined by $$ \Gamma(z)=\int_0^\infty t^{z-1}e^{-t}\,dt. $$ It generalizes the factorial: for a positive integer \(n\), \(\Gamma(n)=(n-1)!\). For example, \(\Gamma(2)=1\), \(\Gamma(3)=2\), and \(\Gamma(1/2)=\sqrt{\pi}\). These familiar values, as well as numerical gamma-function values, can be used after the integral has been expressed in the correct form.

The raw moment of order \(r\) is \(E[X^r]\). For \(r>-k\), the Weibull moment integral is finite. In particular, all positive-order moments exist. To evaluate it, use the transformation \(t=(x/\lambda)^k\). Solving for \(x\) gives \(x=\lambda t^{1/k}\), and differentiating gives \(dx=(\lambda/k)t^{1/k-1}\,dt\).

$$ \begin{aligned} E[X^r] &=\int_0^\infty x^r f_X(x)\,dx\\ &=\int_0^\infty x^r \frac{k}{\lambda}\left(\frac{x}{\lambda}\right)^{k-1} e^{-(x/\lambda)^k}\,dx\\ &=\lambda^r\int_0^\infty t^{r/k}e^{-t}\,dt\\ &=\lambda^r\Gamma\left(1+\frac{r}{k}\right). \end{aligned} $$

The transformed power is \(t^{r/k}\), which matches the gamma integrand \(t^{z-1}\) when \(z=1+r/k\). The integral converges at zero precisely when \(r/k>-1\), or \(r>-k\); it converges at infinity because of the factor \(e^{-t}\). This also explains why the gamma argument has a \(1+\) in it. Omitting that \(1\) changes the moment.

Mean, Variance, and Coefficient of Variation

Set \(r=1\) to obtain the mean and \(r=2\) to obtain the second raw moment. Variance is the second raw moment minus the square of the mean. The coefficient of variation is the standard deviation divided by the mean, so it is dimensionless.

Theorem: For \(X\) with the Weibull density above, $$ E[X]=\lambda\Gamma\left(1+\frac{1}{k}\right), \qquad E[X^2]=\lambda^2\Gamma\left(1+\frac{2}{k}\right), $$ $$ \operatorname{Var}(X) =\lambda^2\left[ \Gamma\left(1+\frac{2}{k}\right) -\Gamma\left(1+\frac{1}{k}\right)^2 \right], $$ and $$ \operatorname{CV}(X) =\frac{\sqrt{\operatorname{Var}(X)}}{E[X]} =\sqrt{ \frac{\Gamma(1+2/k)} {\Gamma(1+1/k)^2}-1 }. $$ These expressions assume the unmodified Weibull severity model stated above. In particular, the coefficient of variation is independent of \(\lambda\), while the mean scales as \(\lambda\) and the variance as \(\lambda^2\).

The variance formula follows from the identity \(\operatorname{Var}(X)=E[X^2]-(E[X])^2\). Substituting the two raw moments gives the displayed expression. For the coefficient of variation, divide the square root of that variance by the mean. The factor \(\lambda\) cancels because \(\lambda>0\), leaving a quantity that depends only on \(k\). This scale cancellation is also a useful check on a calculation: changing the unit or multiplying all losses by a constant should not change the coefficient of variation.

Worked Example: Moments for a Weibull Model with Shape Two

A hypothetical portfolio uses a Weibull model for individual losses, with scale \(\lambda=\$3{,}000\) and shape \(k=2\). Calculate the mean, variance, standard deviation, and coefficient of variation. Report monetary quantities to the nearest cent and the coefficient of variation to four decimal places.

Method. Apply the raw-moment formulas and use \(\Gamma(3/2)=\sqrt{\pi}/2\) and \(\Gamma(2)=1\). The common mistake to avoid is treating the scale \(\lambda\) as the mean.

Mean. First, \(1+1/k=1+1/2=3/2\). Therefore, $$ E[X]=3000\Gamma(3/2) =3000\left(\frac{\sqrt{\pi}}{2}\right) =3000(0.886226925) =\$2{,}658.680775. $$ Rounded to cents, the mean is \(\$2{,}658.68\).

Second raw moment. Here \(1+2/k=1+1=2\), so $$ E[X^2]=3000^2\Gamma(2) =9{,}000{,}000(1) =9{,}000{,}000.00\ \text{dollars}^2. $$

Variance and standard deviation. Squaring the unrounded mean gives $$ (E[X])^2=9{,}000{,}000\left(\frac{\pi}{4}\right) =7{,}068{,}583.4706\ \text{dollars}^2. $$ Thus $$ \operatorname{Var}(X)=9{,}000{,}000-7{,}068{,}583.4706 =1{,}931{,}416.5294\ \text{dollars}^2, $$ and \(\operatorname{SD}(X)=\sqrt{1{,}931{,}416.5294}=\$1{,}389.75\), rounded to cents.

Coefficient of variation. Using the unrounded values, $$ \operatorname{CV}(X)=\frac{1{,}389.75\text{ (approximately)}}{2{,}658.680775} =0.5227. $$ The result is dimensionless. As a check, the variance is positive and has squared-dollar units, whereas the mean and standard deviation have dollar units.

Using Special Gamma Values and Checking Units

Some shape choices yield especially simple gamma arguments. For instance, when \(k=1/2\), the first two gamma arguments are \(3\) and \(5\), both positive integers. The resulting calculations provide a useful check that the general formulas can be applied even when the shape is below one. In every case, keep raw moments and central moments distinct: \(E[X^2]\) is not the variance, and its units are squared loss units.

Worked Example: A Shape Below One

For a hypothetical severity model, \(X\) is Weibull with \(\lambda=\$500\) and \(k=1/2\). Calculate its mean, second raw moment, variance, and coefficient of variation. Report monetary results to the nearest cent and the coefficient of variation to four decimal places.

Method. Substitute the parameters into the moment formulas and use the integer gamma values \(\Gamma(3)=2\) and \(\Gamma(5)=24\). The trap is to assume a shape below one makes the positive moments infinite; the moment condition \(r>-k\) shows that these first two moments exist.

Mean. The first gamma argument is \(1+1/k=1+2=3\), so $$ E[X]=500\Gamma(3)=500(2)=\$1{,}000.00. $$

Second raw moment. The second argument is \(1+2/k=1+4=5\), giving $$ E[X^2]=500^2\Gamma(5) =250{,}000(24) =6{,}000{,}000.00\ \text{dollars}^2. $$

Variance. The squared mean is \(1{,}000^2=1{,}000{,}000.00\) dollars squared. Therefore, $$ \operatorname{Var}(X)=6{,}000{,}000-1{,}000{,}000 =5{,}000{,}000.00\ \text{dollars}^2. $$

Coefficient of variation. The standard deviation is \(\sqrt{5{,}000{,}000}=\$2{,}236.067978\), so $$ \operatorname{CV}(X)=\frac{2{,}236.067978}{1{,}000} =2.2361. $$ The coefficient exceeds one, which is consistent with the calculated standard deviation being greater than the mean. The second raw moment also exceeds the squared mean, as it must for a nonnegative variance.

Inferring Scale Before Calculating Moments

A model may specify a survival probability at a particular loss amount rather than give the scale directly. The survival function can be rearranged to find \(\lambda\), after which the same moment formulas apply. This is a parameter-substitution step, not a different moment formula: use the given survival probability to infer the scale and then evaluate the gamma factors.

Worked Example: Recovering Scale from a Survival Probability

A hypothetical loss severity is Weibull with known shape \(k=3\). Its survival probability at \(\$6{,}000\) is \(S_X(6{,}000)=e^{-1/8}\). Find the scale, mean, variance, and coefficient of variation. Report monetary results to the nearest cent and the coefficient of variation to four decimal places.

Method. Equate the exponent in the survival function to \(1/8\), solve for the positive scale, and then use the first two raw moments. Avoid taking the cube root of the wrong ratio: the equation is \((6{,}000/\lambda)^3=1/8\).

Scale. From \(S_X(x)=\exp[-(x/\lambda)^k]\), $$ \exp\left[-\left(\frac{6{,}000}{\lambda}\right)^3\right] =e^{-1/8} \quad\Longrightarrow\quad \left(\frac{6{,}000}{\lambda}\right)^3=\frac18. $$ Taking the positive cube root gives \(6{,}000/\lambda=1/2\), so \(\lambda=\$12{,}000\).

Mean and second raw moment. The needed gamma values are \(\Gamma(4/3)\approx0.892979512\) and \(\Gamma(5/3)\approx0.902745293\). Hence $$ E[X]=12{,}000(0.892979512)=\$10{,}715.754144 \approx \$10{,}715.75, $$ and $$ E[X^2]=12{,}000^2(0.902745293) =144{,}000{,}000(0.902745293) =129{,}995{,}322.192\ \text{dollars}^2. $$

Variance. Squaring the mean before rounding gives $$ (E[X])^2 =144{,}000{,}000(0.892979512)^2 \approx114{,}827{,}386.81\ \text{dollars}^2. $$ Thus $$ \operatorname{Var}(X) =129{,}995{,}322.192-114{,}827{,}386.81 \approx15{,}167{,}935.38\ \text{dollars}^2. $$

Coefficient of variation. The scale cancels, so $$ \operatorname{CV}(X) =\sqrt{\frac{0.902745293}{(0.892979512)^2}-1} \approx0.3634. $$ As a final check, the variance is positive, and using either the unrounded standard deviation divided by the unrounded mean or the scale-free expression gives the same coefficient to four decimal places.

Common Exam Traps and Practical Checks

The integral derivation identifies exactly where several plausible-looking errors enter. If the substitution or the gamma-function argument is wrong, the error propagates into the mean and variance even when the later arithmetic is correct.

  • Dropping the \(1+\) in the gamma argument. For \(k=2\), an incorrect mean calculation is \(\lambda\Gamma(1/2)=\lambda\sqrt{\pi}\). The correct calculation is \(E[X]=\lambda\Gamma(1+1/2)=\lambda\Gamma(3/2)=\lambda\sqrt{\pi}/2\). The \(1+\) arises because the gamma integrand is \(t^{z-1}e^{-t}\).
  • Confusing the scale with the mean. The scale \(\lambda\) is a parameter with loss units, not generally the expected loss. The mean equals \(\lambda\Gamma(1+1/k)\); only a gamma factor of one would make it equal to \(\lambda\).
  • Subtracting in the wrong direction. Variance is \(E[X^2]-(E[X])^2\), not the reverse. A negative result signals an arithmetic or formula error.
  • Mixing units or rounding too early. The mean is in dollars and the second raw moment and variance are in dollars squared. Keep gamma values and intermediate moments unrounded until the final requested precision.
  • Applying the result to a modified payment without adjustment. These formulas describe the underlying severity \(X\). A deductible or policy limit changes the random payment and therefore does not automatically have the same moments.
Key takeaway: For a Weibull severity with shape \(k\) and scale \(\lambda\), transform \(t=(x/\lambda)^k\) to obtain \(E[X^r]=\lambda^r\Gamma(1+r/k)\). The mean and variance follow from the first two raw moments, and the coefficient of variation depends on shape but not scale.

Check Your Understanding

Use the two-parameter Weibull model and retain unrounded values until the final result. Each problem is a short, original application of the moment formulas.

  1. A hypothetical severity has \(\lambda=\$200\) and \(k=2\). Find its mean and variance to the nearest cent. (Answer: mean \(\$177.25\); variance \(\$8{,}584.07\) dollars squared.)
  2. A hypothetical loss has \(\lambda=\$80\) and \(k=1/2\). Find its mean, second raw moment, and coefficient of variation. (Answer: mean \(\$160.00\); second raw moment \(153{,}600.00\) dollars squared; coefficient of variation \(2.2361\).)
  3. For a Weibull severity with \(\lambda=\$100\) and \(k=2\), calculate \(E[X^3]\) to the nearest cent, using \(\Gamma(5/2)\approx1.329340388\). (Answer: \(E[X^3]=\$1{,}329{,}340.39\) dollars cubed.)
  4. A hypothetical severity has shape \(k=2\) and \(S_X(300)=e^{-1/4}\). Find its scale and mean to the nearest cent. (Answer: scale \(\$600.00\); mean \(\$531.74\).)
  5. Two Weibull severity models have the same shape \(k=2\), but the second model's scale is three times the first model's scale. State the ratios of their means and variances, and compare their coefficients of variation. (Answer: the second mean is 3 times the first; the second variance is 9 times the first; their coefficients of variation are equal, each approximately \(0.5227\).)
Clinical Biostats