Tutorials › Statistical Theory I - Probability and Distribution Theory › Weibull Moments and Shape Effects

Normal and Tail Families · Tutorial 184 of 994

Weibull Moments and Shape Effects

Use the gamma function to calculate Weibull moments and distinguish changes in absolute scale from changes in relative variability as the shape parameter varies.

Intermediate 10 min read

What You'll Learn

  • Derive the Weibull raw-moment formula by transforming its density integral.
  • Calculate the mean and variance for specified Weibull shape and scale values.
  • Express the coefficient of variation as a function of shape alone.
  • Explain why the mean need not change monotonically with shape at fixed scale.
  • Prove that the Weibull coefficient of variation decreases as shape increases.

From the Weibull Density to Its Moments

The Weibull distribution is often used to describe positive measurements such as lifetimes and waiting times. Its shape parameter affects more than the appearance of its density: it also changes the mean, variance, and relative spread. To interpret those effects, first derive the moments directly from the density.

Use the shape–scale parameterization \(k>0\), \(\lambda>0\), with support \(x\geq 0\). Its density is

$$ f(x)=\frac{k}{\lambda}\left(\frac{x}{\lambda}\right)^{k-1} \exp\left[-\left(\frac{x}{\lambda}\right)^k\right],\qquad x\geq 0. $$

Here \(k\) is the shape and \(\lambda\) is the scale; \(\lambda\) has the same units as \(X\). The gamma function, which appears after a change of variable, is defined for \(a>0\) by

$$ \Gamma(a)=\int_0^\infty u^{a-1}e^{-u}\,du. $$

It satisfies \(\Gamma(a+1)=a\Gamma(a)\), and for a positive integer \(m\), \(\Gamma(m)=(m-1)!\). These facts make some Weibull moments especially easy to evaluate.

Theorem: If \(X\) has a Weibull distribution with shape \(k>0\) and scale \(\lambda>0\), then for every real \(r\geq 0\), $$ E[X^r]=\lambda^r\Gamma\left(1+\frac{r}{k}\right). $$ In particular, $$ E[X]=\lambda\Gamma\left(1+\frac{1}{k}\right),\qquad \operatorname{Var}(X)=\lambda^2\left\{\Gamma\left(1+\frac{2}{k}\right)-\Gamma\left(1+\frac{1}{k}\right)^2\right\}. $$

Derivation. For \(r\geq 0\), the moment integral exists: near zero its integrand is proportional to \(x^{r+k-1}\), which is integrable because \(r+k>0\); at infinity the factor \(\exp[-(x/\lambda)^k]\) makes the integral finite. Starting from the density, substitute \(u=(x/\lambda)^k\). Then \(x=\lambda u^{1/k}\) and \(dx=(\lambda/k)u^{1/k-1}\,du\). Consequently,

$$ \begin{aligned} E[X^r] &=\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 u^{r/k}e^{-u}\,du\\ &=\lambda^r\Gamma\left(1+\frac{r}{k}\right). \end{aligned} $$

The second line follows because the powers of \(u\) from the density and \(dx\) combine to \(u^{r/k}\), while the constants \(k/\lambda\) and \(\lambda/k\) cancel. The integral is the gamma integral with argument \(1+r/k\). Applying the formula at \(r=1\) and \(r=2\), then using \(\operatorname{Var}(X)=E[X^2]-E[X]^2\), gives the stated mean and variance. \(\square\)

Worked Moment Calculations

The raw-moment formula gives a direct route to the mean and variance. It is useful to keep the scale factor visible: the mean scales linearly with \(\lambda\), whereas the variance scales with \(\lambda^2\).

Worked Example: Shape One Gives an Exponential Distribution

Let \(X\) have Weibull shape \(k=1\) and scale \(\lambda=5\) minutes. Find its first two raw moments, mean, and variance.

For the first raw moment,

$$ E[X]=5\Gamma(2)=5(1!)=5\text{ minutes}. $$

For the second raw moment,

$$ E[X^2]=5^2\Gamma(3)=25(2!)=50\text{ minutes}^2. $$

Therefore,

$$ \operatorname{Var}(X)=50-5^2=25\text{ minutes}^2. $$

The standard deviation is \(5\) minutes. This agrees with the exponential distribution with mean \(5\) minutes, the special case \(k=1\). The units also check: \(E[X]\) has time units and the variance has squared-time units.

Worked Example: Shape Two and a Closed-Form Coefficient of Variation

Suppose \(X\) has shape \(k=2\) and scale \(\lambda=3\). Calculate the mean, variance, and coefficient of variation.

The gamma values needed are \(\Gamma(3/2)=\sqrt{\pi}/2\) and \(\Gamma(2)=1\). Thus

$$ E[X]=3\Gamma(3/2)=\frac{3\sqrt{\pi}}{2}\approx 2.659. $$

The second raw moment and variance are

$$ E[X^2]=3^2\Gamma(2)=9,\qquad \operatorname{Var}(X)=9-\left(\frac{3\sqrt{\pi}}{2}\right)^2 =9\left(1-\frac{\pi}{4}\right)\approx 1.931. $$

The coefficient of variation is the standard deviation divided by the mean:

$$ \operatorname{CV}(X) =\frac{\sqrt{\operatorname{Var}(X)}}{E[X]} =\sqrt{\frac{4}{\pi}-1} \approx 0.523. $$

This ratio is dimensionless: changing the scale would change both the mean and standard deviation by the same factor, leaving their ratio unchanged.

Worked Example: A Fractional Shape with Integer Gamma Arguments

Let \(X\) have shape \(k=1/2\) and scale \(\lambda=2\). Find its mean, variance, and coefficient of variation.

For \(r=1\), the gamma argument is \(1+1/k=3\), so

$$ E[X]=2\Gamma(3)=2(2!)=4. $$

For \(r=2\), the gamma argument is \(1+2/k=5\), giving

$$ E[X^2]=2^2\Gamma(5)=4(4!)=96,\qquad \operatorname{Var}(X)=96-4^2=80. $$

Hence the standard deviation is \(\sqrt{80}=4\sqrt{5}\), and

$$ \operatorname{CV}(X)=\frac{4\sqrt{5}}{4}=\sqrt{5}\approx 2.236. $$

A coefficient of variation above one is possible; it indicates that the standard deviation exceeds the mean. Here it is much larger than in the shape-two example, illustrating the greater relative spread at a smaller shape.

How Shape Affects the Summaries

Writing the formulas in terms of \(k\) separates two kinds of change. The scale \(\lambda\) determines measurement units and multiplies the mean and standard deviation. The shape \(k\) changes the dimensionless gamma-function factors. In particular,

$$ \operatorname{CV}(X) =\frac{\sqrt{\operatorname{Var}(X)}}{E[X]} =\sqrt{\frac{\Gamma(1+2/k)}{\Gamma(1+1/k)^2}-1}. $$

The scale cancels exactly. Thus two Weibull variables with the same shape but different scales have the same coefficient of variation, even though their means and standard deviations differ.

For fixed \(\lambda\), the mean is not simply increasing or decreasing with \(k\). At \(k=1\), it is \(\lambda\); at \(k=2\), it is \(\lambda\sqrt{\pi}/2\), which is less than \(\lambda\). As \(k\) tends to infinity, \(\Gamma(1+1/k)\) tends to \(\Gamma(1)=1\), so the mean tends to \(\lambda\). As \(k\) tends to zero, \(1+1/k\) tends to infinity and the gamma function grows without bound, so the mean tends to infinity. These facts show why a statement such as “increasing shape increases the mean” is incorrect. The mean falls from large values at small shape, is below \(\lambda\) at shape two, and tends back to \(\lambda\) as shape becomes large.

The variance also depends on shape through both gamma terms; it is not obtained by squaring the mean or by applying the same shape multiplier to it. The examples show the importance of calculating it from the second raw moment. For comparing relative rather than absolute spread, the coefficient of variation gives a particularly clean shape effect.

Theorem: For fixed \(\lambda>0\), the Weibull coefficient of variation is strictly decreasing as the shape \(k>0\) increases.

Proof. Put \(t=1/k\), and define

$$ R(t)=\frac{\Gamma(1+2t)}{\Gamma(1+t)^2},\qquad t>0. $$

Then \(\operatorname{CV}(X)^2=R(t)-1\). Let \(\psi(a)=\frac{d}{da}\log\Gamma(a)\), the logarithmic derivative of the gamma function. Differentiating gives

$$ \frac{d}{dt}\log R(t)=2\{\psi(1+2t)-\psi(1+t)\}. $$

The gamma function is strictly log-convex on \(a>0\), so \(\psi\) is strictly increasing. One way to see the log-convexity is to apply Hölder's inequality to its defining integral: for distinct positive \(a,b\) and \(0<s<1\),

$$ \Gamma(sa+(1-s)b) \leq \Gamma(a)^s\Gamma(b)^{1-s}, $$

with strict inequality because the corresponding powers of \(u\) in the integral are not proportional almost everywhere. Since \(1+2t>1+t\), the derivative of \(\log R(t)\) is positive. Thus \(R(t)\), and therefore \(\sqrt{R(t)-1}\), increases with \(t\). But \(t=1/k\) decreases as \(k\) increases, proving that the coefficient of variation strictly decreases with shape. \(\square\)

This result concerns relative variability. It does not say that every summary must move monotonically with shape: the mean, for example, has the nonmonotone behavior described above. As \(k\) becomes large, the gamma arguments in the coefficient-of-variation formula approach one, so \(\operatorname{CV}(X)\) approaches zero. The distribution’s spread therefore becomes small relative to its mean.

Common Mistakes

  • Confusing scale and shape. The mean is not generally \(\lambda\). It equals \(\lambda\Gamma(1+1/k)\); only special shapes simplify that factor.
  • Using the first raw moment as the variance. First calculate \(E[X^2]\), then subtract \(E[X]^2\). The variance formula involves both gamma terms.
  • Claiming that a larger shape always means a larger mean. At fixed scale the mean can decrease and then increase toward \(\lambda\). The coefficient of variation, by contrast, does decrease strictly with shape.
  • Giving the coefficient of variation units. Both standard deviation and mean have the units of \(X\), so their ratio has none.
Key takeaway: The Weibull raw moments are \(E[X^r]=\lambda^r\Gamma(1+r/k)\). They yield the mean and variance directly, while the coefficient of variation depends only on shape and decreases as shape increases.

Check Your Understanding

Use the moment formula and distinguish absolute from relative variability.

  1. For shape \(k=1\) and scale \(\lambda=4\), calculate \(E[X]\), \(E[X^2]\), and \(\operatorname{Var}(X)\).
  2. For shape \(k=2\), write the mean and variance as expressions involving \(\pi\) and \(\lambda\).
  3. Explain why two Weibull distributions with the same shape but different scales have the same coefficient of variation.
  4. At fixed scale, why does the mean’s behavior rule out the claim that it always increases with shape?
  5. State which way the coefficient of variation changes as the shape increases, and identify the gamma-function property used to establish this.