Tutorials › Exam ASTAM - Advanced Short-Term Actuarial Mathematics › Weibull MLE With Right Censoring

Exam ASTAM · Likelihood with Incomplete Data · Tutorial 338 of 979

Weibull MLE With Right Censoring

Build the Weibull likelihood record by record, derive its score equations, and use a one-dimensional numerical root to estimate shape and scale.

Advanced 12 min read

What You'll Learn

  • Write the Weibull density and survival function using shape and scale parameters.
  • Distinguish the likelihood contribution from an exact observation from one for a right-censored observation.
  • Construct the log-likelihood for a mixed sample and derive both score equations.
  • Profile out the scale parameter when the shape is fixed.
  • Use a numerical root or optimizer to estimate the Weibull shape and scale.
  • Recognize common errors in censoring contributions, parameter constraints, and the exact-observation count.

Why Weibull Estimation With Censoring Needs Care

A right-censored loss record tells us that the loss exceeded a stated threshold or observation time, but not its exact value. Its likelihood contribution is therefore a probability of exceeding that value, not a density evaluated there. For the Weibull model, exact and censored records both inform the parameter estimates, but they enter the likelihood in different ways.

This tutorial develops the likelihood and score equations for independent exact and right-censored observations. It also shows how profiling the scale parameter reduces the numerical estimation problem to a single equation for the shape. The methods are aligned with the SOA Exam ASTAM (Advanced Short-Term Actuarial Mathematics) syllabus.

Definition: A Weibull random variable \(X\) with shape \(\alpha>0\) and scale \(\theta>0\) has, for \(x>0\), survival function \(S_X(x)=\exp[-(x/\theta)^\alpha]\) and density \(f_X(x)=(\alpha/\theta)(x/\theta)^{\alpha-1}\exp[-(x/\theta)^\alpha]\). The scale \(\theta\) has the same units as \(X\); the shape \(\alpha\) is dimensionless.

Suppose there are \(n\) independent records. For record \(i\), let \(t_i>0\) be the observed time and let \(\delta_i=1\) if the time is exact and \(\delta_i=0\) if it is right-censored. Assume the censoring mechanism is independent and non-informative for the loss model, so its likelihood contribution can be omitted when estimating \(\alpha\) and \(\theta\). There is no truncation in this model.

Likelihood contribution: An exact observation at \(t_i\) contributes \(f_X(t_i)\). A right-censored observation at \(t_i\), which tells us only that \(X_i>t_i\), contributes \(S_X(t_i)\). Thus the loss-model likelihood is \(\prod_{i=1}^n f_X(t_i)^{\delta_i}S_X(t_i)^{1-\delta_i}\).

Constructing the Log-Likelihood

Write \(r=\sum_{i=1}^n\delta_i\) for the number of exact observations. Multiplying the contributions and taking logarithms gives a sum of density terms for the exact records and survival terms for every record. In particular, each observed time—including a censored time—appears in the cumulative-hazard sum.

$$ L(\alpha,\theta)=\prod_{i=1}^n \left[ \frac{\alpha}{\theta} \left(\frac{t_i}{\theta}\right)^{\alpha-1} e^{-(t_i/\theta)^\alpha} \right]^{\delta_i} \left[e^{-(t_i/\theta)^\alpha}\right]^{1-\delta_i}. $$
$$ \ell(\alpha,\theta) =r\ln\alpha-r\alpha\ln\theta +(\alpha-1)\sum_{i=1}^n\delta_i\ln t_i -\sum_{i=1}^n(t_i/\theta)^\alpha. $$

Only exact records contribute \(\ln\alpha\) and the \(\ln t_i\) density term. Every record contributes the negative power term \(-(t_i/\theta)^\alpha\), because both the density and survival function contain the same exponential factor. This distinction is central to setting up the score equations correctly.

Worked Example: Evaluating a Mixed-Record Likelihood

A hypothetical sample has an exact loss time of \(2\) and a right-censored time of \(3\). Evaluate the likelihood at \(\alpha=2\) and \(\theta=5\), and give the result to four decimal places.

Method. Use the Weibull density for the exact time and the Weibull survival function for the censored time. Both times and the scale are in the same units.

For the exact time, \(f_X(2)=(2/5)(2/5)^{2-1}\exp[-(2/5)^2] =0.4(0.4)e^{-0.16}=0.16e^{-0.16}\).

For the right-censored time, \(S_X(3)=\exp[-(3/5)^2]=e^{-0.36}\).

Therefore, \(L=f_X(2)S_X(3)=0.16e^{-0.16}e^{-0.36} =0.16e^{-0.52}\approx0.0951\). The likelihood is dimensionally a density times a probability, as expected for one exact and one censored record.

Common mistake avoided: Treating the censored time \(3\) as an exact loss would insert \(f_X(3)\) instead of \(S_X(3)\). That would answer a different observation problem.

Score Equations and the Profile Scale Estimate

An interior maximum likelihood estimate (MLE) sets the partial derivatives of the log-likelihood equal to zero. Differentiating with respect to \(\theta\) gives \(\partial\ell/\partial\theta=-r\alpha/\theta+\alpha\theta^{-\alpha-1}\sum_i t_i^\alpha\). For \(r>0\), setting this derivative to zero yields a useful closed-form estimate of \(\theta\) when \(\alpha\) is fixed.

$$ \frac{\partial\ell}{\partial\theta} =-\frac{r\alpha}{\theta} +\frac{\alpha}{\theta}\sum_{i=1}^n(t_i/\theta)^\alpha=0 \quad\Longrightarrow\quad \widehat{\theta}(\alpha)^\alpha =\frac{\sum_{i=1}^n t_i^\alpha}{r}. $$

The numerator sums \(t_i^\alpha\) over all records; the denominator is the number of exact records. The reason is that the scale derivative acts on every cumulative-hazard term, while the density’s scale-power term occurs only \(r\) times.

Differentiating with respect to \(\alpha\), while holding \(\theta\) fixed, gives the other score equation:

$$ \frac{\partial\ell}{\partial\alpha} =\frac{r}{\alpha} -r\ln\theta +\sum_{i=1}^n\delta_i\ln t_i -\sum_{i=1}^n(t_i/\theta)^\alpha\ln(t_i/\theta)=0. $$

Substitute \(\widehat{\theta}(\alpha)\) into this equation to obtain a profile score equation in the single unknown \(\alpha\). In general, it has no closed-form solution. A numerical root finder can solve it; alternatively, a numerical optimizer can maximize the profile log-likelihood directly.

Why the profile formula holds: In the scale score, the negative derivative of the \(r\alpha\ln\theta\) term is \(-r\alpha/\theta\). For each record, the derivative of \(-(t_i/\theta)^\alpha\) is \(\alpha(t_i/\theta)^\alpha/\theta\). Equating the sum of these terms to zero and dividing by \(\alpha/\theta>0\) gives \(\sum_i(t_i/\theta)^\alpha=r\), or \(\theta^\alpha=\sum_i t_i^\alpha/r\). This argument requires \(r>0\); if there are no exact observations, this particular interior scale solution does not follow.
1
Assemble the records.
List each observed time \(t_i\) and mark it exact (\(\delta_i=1\)) or right-censored (\(\delta_i=0\)).
2
Build and simplify the likelihood.
Use \(f_X(t_i)\) for exact records and \(S_X(t_i)\) for censored records; then take the logarithm.
3
Profile the scale.
For each trial \(\alpha>0\), compute \(\widehat{\theta}(\alpha)=[\sum_i t_i^\alpha/r]^{1/\alpha}\), provided \(r>0\).
4
Estimate the shape and check the result.
Solve the profile score equation or maximize the profile log-likelihood over positive \(\alpha\). Substitute the estimate into the scale formula and verify that the fitted likelihood is a maximum, not merely a stationary point.

Worked Score Calculations

Worked Example: Checking the Log-Likelihood at Trial Parameters

A hypothetical sample has exact times \(2\) and \(5\), and a right-censored time \(3\). Calculate the log-likelihood at \(\alpha=1.5\) and \(\theta=4\), rounding the final value to four decimal places.

Method. There are \(r=2\) exact records. The log-likelihood is \(2\ln(1.5)-3(1.5)\ln4+(1.5-1)(\ln2+\ln5)\) minus the sum of the three powered time-scale ratios.

The density terms simplify as \(2\ln(1.5)-4.5\ln4+0.5\ln10 =0.8109302-6.2383246+1.1512925=-4.2761019\). For the power terms, \((2/4)^{1.5}=0.3535534\), \((5/4)^{1.5}=1.3975425\), and \((3/4)^{1.5}=0.6495191\). Their sum is \(2.4006149\).

Thus \(\ell=-4.2761019-2.4006149=-6.6767168\), or \(-6.6767\) to four decimal places.

Check and common mistake avoided. The censored time contributes its power term, but not a density term. Omitting that power term would incorrectly increase the log-likelihood by \(0.6495191\). The result here is the log-likelihood at the stated trial parameters, not an MLE.

A numerical search should respect \(\alpha>0\) and \(\theta>0\). One practical approach is to optimize over \(\ln\alpha\) and \(\ln\theta\), which automatically keeps both parameters positive. With \(r>0\), profiling out \(\theta\) leaves a one-dimensional search. A root solver needs a bracket or a suitable starting value, and the resulting candidate should be checked against the profile log-likelihood. The score equations alone do not establish that a solution is a maximum.

Worked Example: Estimating Shape and Scale From a Small Censored Sample

A hypothetical sample contains one exact time \(t_1=1\) and one right-censored time \(t_2=2\). Estimate the Weibull shape and scale by maximum likelihood. Give parameter estimates to three decimal places.

Method. Here \(r=1\). For a trial shape \(\alpha\), the scale formula gives \(\widehat{\theta}(\alpha)^\alpha=1^\alpha+2^\alpha=1+2^\alpha\). Substitution into the shape score reduces it to \(g(\alpha)=1/\alpha-2^\alpha\ln(2)/(1+2^\alpha)=0\).

For example, \(g(1.7)\approx0.0582\) and \(g(1.9)\approx-0.0204\), so a root lies between those values. Numerical root finding gives \(\widehat{\alpha}\approx1.8444\). The profile equation has a single positive root here: its derivative is \(-1/\alpha^2-(\ln2)^2 2^\alpha/(1+2^\alpha)^2<0\).

At this root, \(2^{\widehat{\alpha}}\approx3.590\), so \(\widehat{\theta}=(1+2^{\widehat{\alpha}})^{1/\widehat{\alpha}} \approx4.590^{1/1.8444}\approx2.285\). Thus, to three decimal places, the estimates are \(\widehat{\alpha}=1.844\) and \(\widehat{\theta}=2.285\) in the time units of the data.

Check. The profile score changes from positive to negative at the root, consistent with a maximum. As \(\alpha\) approaches zero or infinity, the profile log-likelihood tends to negative infinity for these data, so this root gives the profile maximum. The censored observation affects both the scale estimate and the shape equation.

Common Exam Traps

  • Using a density for a censored record. A right-censored value \(t_i\) says \(X_i>t_i\); its contribution is \(S_X(t_i)\), not \(f_X(t_i)\).
  • Dropping censored times from the power sum. Every record contributes \(-(t_i/\theta)^\alpha\) to the log-likelihood.
  • Counting every record in \(r\). The denominator in the profile scale formula is the number of exact observations, not the total sample size.
  • Assuming both parameters have closed-form estimates. The scale has a closed-form profile estimate for fixed shape, but the shape generally requires numerical solution.
  • Ignoring parameter restrictions. Shape and scale must both be positive; unconstrained searches can produce invalid values.

The likelihood method matters because censoring does not mean that a record contains no information. A censored observation contributes evidence that the loss exceeded its observed time. In the Weibull model this evidence changes the cumulative-hazard part of the likelihood and therefore can change both parameter estimates. Correctly distinguishing exact and censored contributions is the first check to make before doing any numerical work.

Check Your Understanding

For each problem, distinguish exact records from censored records before calculating or setting up an estimate.

  1. A hypothetical sample has an exact time of \(4\) and a right-censored time of \(6\). At \(\alpha=1\) and \(\theta=5\), calculate the likelihood to four decimal places. (Answer: \(0.2e^{-2}\approx0.0271\).)
  2. There are exact times \(3\) and \(4\), and a right-censored time \(2\). For fixed \(\alpha=2\), find the profile estimate of \(\theta\), rounded to four decimals. (Answer: \(\sqrt{(9+16+4)/2}=\sqrt{14.5}\approx3.8079\).)
  3. There are exact times \(2\) and \(4\), and a right-censored time \(3\). Evaluate the log-likelihood at \(\alpha=2,\theta=4\), rounded to four decimals. (Answer: \(2\ln2-4\ln4+\ln8-[0.25+1+0.5625]\approx-3.8919\).)
  4. There is one exact time \(1\) and one right-censored time \(2\). Write the profile shape equation and give the approximate MLEs to three decimals. (Answer: \(1/\alpha-2^\alpha\ln2/(1+2^\alpha)=0\); \(\widehat{\alpha}\approx1.844,\ \widehat{\theta}\approx2.285\).)
  5. There are exact times \(1\) and \(3\), and a right-censored time \(2\). For fixed \(\alpha=2\), determine \(\widehat{\theta}\). State which count belongs in the denominator. (Answer: \(\widehat{\theta}=\sqrt{(1+9+4)/2}=\sqrt7\approx2.6458\); the denominator is the two exact observations.)
Clinical Biostats