Tutorials › Exam ASTAM - Advanced Short-Term Actuarial Mathematics › Adaptive Bandwidths For Uneven Loss Density

Exam ASTAM · Kernel, Truncation, and Censoring · Tutorial 264 of 979

Adaptive Bandwidths For Uneven Loss Density

Use pilot density estimates to construct and interpret a variable-bandwidth kernel estimate, while recognizing when adaptation can become unstable.

Advanced 12 min read

What You'll Learn

  • Define the sample-point adaptive kernel density estimator and its assumptions
  • Calculate local bandwidths using the square-root rule and a geometric-mean reference
  • Evaluate an adaptive estimate with a uniform kernel
  • Verify when the estimate is nonnegative and integrates to one
  • Compare adaptive and fixed bandwidths and identify instability risks
  • Recognize why zero or unreliable pilot estimates require safeguards

Why Use Adaptive Bandwidths?

A single bandwidth must serve every part of a loss distribution. If losses cluster tightly in one range but are widely separated elsewhere, a fixed bandwidth may smooth away detail in the dense range while leaving the sparse range noisy. Adaptive bandwidths address this unevenness by assigning a separate window width to each observed loss: narrower windows where a pilot estimate indicates high density, and wider windows where it indicates low density.

This tutorial uses a sample-point construction: the bandwidth is attached to each observation, not selected separately at each point where the estimated density is evaluated. The method assumes independent, exact observations from a continuous loss distribution. It does not itself correct for truncation or censoring; those mechanisms change what information the observed losses contain.

Definition: Let \(X_1,\ldots,X_n\) be observed losses, let \(K\) be a kernel, and let \(h>0\) be a global scale bandwidth. First calculate positive pilot density estimates \(\tilde f_i\) at the observations \(X_i\). Define their geometric mean by \(g=(\prod_{i=1}^n \tilde f_i)^{1/n}\). The square-root adaptive bandwidth for observation \(i\) is $$ h_i=h\left(\frac{g}{\tilde f_i}\right)^{1/2}. $$ The sample-point adaptive kernel estimate at \(x\) is $$ \hat f_{\mathrm{ad}}(x)=\frac{1}{n}\sum_{i=1}^n \frac{1}{h_i}K\left(\frac{x-X_i}{h_i}\right). $$

The pilot estimates may, for example, come from an ordinary fixed-bandwidth kernel estimate. The geometric mean provides a common reference on the same density scale as each \(\tilde f_i\); consequently, \(g/\tilde f_i\) is dimensionless. If \(\tilde f_i>g\), then \(h_i<h\), so the window is narrowed. If \(\tilde f_i<g\), then \(h_i>h\), so the window is widened. The global scale \(h\) still controls the overall amount of smoothing.

Calculating Local Bandwidths and the Estimate

For numerical work, the uniform kernel is especially convenient: $$ K(u)= \begin{cases} \frac{1}{2}, & |u|\leq 1,\\ 0, & |u|>1. \end{cases} $$ With this kernel, observation \(X_i\) contributes \(1/(2nh_i)\) to the estimate at \(x\) exactly when \(|x-X_i|\leq h_i\); otherwise its contribution is zero. The bandwidth is therefore also the half-width of that observation's window.

Worked Example: Estimating Near a Sparse Loss

A hypothetical portfolio has exact losses \(X_1=0\), \(X_2=1\), and \(X_3=4\), measured in thousands of dollars. A pilot fit gives densities \(\tilde f_1=0.125\), \(\tilde f_2=0.125\), and \(\tilde f_3=0.015625\) per thousand dollars. Using the square-root rule with \(h=0.4\) thousand dollars and the uniform kernel, estimate the density at \(x=4.2\).

Method and reference density. There are \(n=3\) observations. The product of the pilot densities is \(0.125(0.125)(0.015625)=0.000244140625=1/4096\). Thus \(g=(1/4096)^{1/3}=1/16=0.0625\) per thousand dollars.

Local bandwidths. For the first two observations, \(h_1=h_2=0.4\sqrt{0.0625/0.125}=0.4\sqrt{0.5}=0.2828427\) thousand dollars. For the third, \(h_3=0.4\sqrt{0.0625/0.015625}=0.4\sqrt{4}=0.8\) thousand dollars.

Kernel contributions. The distances from \(x=4.2\) are \(4.2\), \(3.2\), and \(0.2\) thousand dollars. The first two exceed their bandwidths; the third is within \(0.8\). Therefore, \(\hat f_{\mathrm{ad}}(4.2)=\frac{1}{3}\frac{1}{2(0.8)}=\frac{1}{4.8}=0.2083333\) per thousand dollars.

Check and common mistake avoided. Only the third observation contributes, and its wider window reflects its lower pilot density. The estimate is \(0.2083\) per thousand dollars, rounded to four decimal places. Reversing the ratio \(g/\tilde f_i\) would incorrectly make the sparse observation's window narrower.

Worked Example: Comparing Fixed and Adaptive Windows

For a second hypothetical sample, the losses, in thousands of dollars, are \(0\), \(2\), \(5\), and \(5.5\). The pilot densities at these observations are \(0.0625\), \(0.0625\), \(0.25\), and \(0.25\) per thousand dollars. Use \(h=0.4\) and the uniform kernel to estimate the density at \(x=5.2\), then compare it with the estimate using the same fixed bandwidth \(0.4\) for all four observations.

Method and geometric mean. The product of the four pilot values is \(0.0625^2(0.25)^2=0.000244140625=1/4096\). Its fourth root is \(g=1/8=0.125\) per thousand dollars.

Adaptive bandwidths. For the first two observations, \(h_1=h_2=0.4\sqrt{0.125/0.0625}=0.4\sqrt{2}=0.5656854\). For the last two, \(h_3=h_4=0.4\sqrt{0.125/0.25}=0.4\sqrt{0.5}=0.2828427\).

Adaptive estimate. The distances from \(5.2\) to the four losses are \(5.2\), \(3.2\), \(0.2\), and \(0.3\). Only the loss at \(5\) is within its adaptive window: \(0.2\leq0.2828427\), whereas \(0.3>0.2828427\). Hence \(\hat f_{\mathrm{ad}}(5.2)=\frac{1}{4}\frac{1}{2(0.2828427)}=0.4419417\) per thousand dollars.

Fixed-bandwidth comparison. With bandwidth \(0.4\), both losses \(5\) and \(5.5\) are within their windows because \(0.2\leq0.4\) and \(0.3\leq0.4\). Each contributes \(1/(2(0.4))=1.25\) before division by \(n\). The fixed estimate is \((1.25+1.25)/4=0.6250\) per thousand dollars.

Check and common mistake avoided. The adaptive estimate is \(0.4419\), compared with the fixed estimate \(0.6250\), both rounded to four decimal places. The narrower windows in this dense region resolve the two nearby observations rather than counting both at \(x=5.2\). Do not assume adaptation must raise or lower an estimate everywhere; its effect depends on the query point and which windows include it.

Why the Estimator Is a Density

The normalization in each summand matters: when its bandwidth changes, the kernel must be rescaled by \(1/h_i\). Suppose every \(h_i>0\), the kernel integrates to one, and the kernel is nonnegative almost everywhere. For any fixed observation \(X_i\), use \(u=(x-X_i)/h_i\), so \(dx=h_i\,du\). Then

$$ \int_{-\infty}^{\infty}\frac{1}{h_i}K\left(\frac{x-X_i}{h_i}\right)\,dx =\int_{-\infty}^{\infty}K(u)\,du=1. $$

Averaging the \(n\) summands therefore gives an integral of one, and nonnegativity of \(K\) ensures that every summand and their average are nonnegative. These conditions establish that \(\hat f_{\mathrm{ad}}\) is a density. Unit integral alone would not suffice: a kernel that takes negative values could produce a negative estimate despite integrating to one.

Worked Example: Checking Normalization and a Tail Estimate

A hypothetical sample consists of losses \(1\), \(3\), and \(8\), in thousands of dollars. The pilot densities are \(0.16\), \(0.04\), and \(0.01\) per thousand dollars. Use \(h=0.5\), the square-root rule, and the uniform kernel. Calculate the estimate at \(x=8.5\), and verify the normalization of the resulting estimator.

Method and local windows. The geometric mean is \(g=(0.16(0.04)(0.01))^{1/3}=(0.000064)^{1/3}=0.04\). Thus \(h_1=0.5\sqrt{0.04/0.16}=0.25\), \(h_2=0.5\sqrt{0.04/0.04}=0.5\), and \(h_3=0.5\sqrt{0.04/0.01}=1\), all in thousands of dollars.

Estimate at \(8.5\). The distances from \(8.5\) to the losses are \(7.5\), \(5.5\), and \(0.5\). Only the third observation is within its window. Its contribution after division by \(n=3\) is \(\hat f_{\mathrm{ad}}(8.5)=\frac{1}{3}\frac{1}{2(1)}=\frac{1}{6}=0.1667\) per thousand dollars, rounded to four decimal places.

Normalization check. The three kernel components each integrate to one before averaging, even though their bandwidths differ. The estimator's total integral is therefore \((1+1+1)/3=1\). The estimate at a particular point, \(0.1667\), is a density value, not a probability; probabilities are obtained by integrating the density over an interval.

Common mistake avoided. Using \(1/(2h)\) with the global \(h=0.5\) for every observation would ignore the local bandwidths. The contribution at \(8.5\) must use \(h_3=1\), giving \(1/(3\cdot2\cdot1)\), not \(1/(3\cdot2\cdot0.5)\).

Benefits, Assumptions, and Risks

The square-root rule is a practical adaptation: it makes local windows respond to estimated density without requiring a separate bandwidth choice for every observation. It is not a guarantee of lower error at every point. Its performance depends on the quality of the pilot estimate, the overall scale \(h\), the kernel, and the shape of the underlying loss density.

1
Fit a pilot.
Estimate density at each observed loss using a positive pilot procedure. The pilot should represent broad local structure rather than treating every small fluctuation as a genuine feature.
2
Set the reference scale.
Compute the geometric mean \(g\) of the pilot values and choose the global bandwidth \(h\). The ratio \(g/\tilde f_i\) determines how the local bandwidth differs from \(h\).
3
Check the inputs and resulting windows.
Confirm that pilot values and bandwidths are positive. Inspect for implausibly large or small \(h_i\), since a poor pilot value can create an extreme window.
4
Evaluate with the sample-point formula.
For each query value \(x\), calculate each observation's contribution using its own \(h_i\), including both the kernel argument and the factor \(1/h_i\).

A pilot estimate of zero makes the geometric mean or the corresponding bandwidth formula unusable. A very small pilot estimate can instead produce an excessively wide window; an unusually large one can produce an excessively narrow window. Practical safeguards include using a positive pilot procedure and imposing documented lower and upper bounds on the pilot values or bandwidths. Such safeguards alter the raw rule, so their effect should be disclosed and checked rather than treated as an invisible numerical fix.

The formula also relies on the correct observation scheme. It treats the recorded losses as the sample to which the density estimate applies. If only losses above a reporting threshold are observed, or if values are censored, applying this estimator without accounting for that mechanism can misrepresent the target distribution. In addition, adaptive windows do not automatically solve the special behavior of a density near the zero boundary; that requires separate treatment.

Common Exam Traps

  • Reversing the density ratio. The rule is \(h_i=h\sqrt{g/\tilde f_i}\). High pilot density means a narrower window; low pilot density means a wider one.
  • Omitting the local scale factor. Each contribution is \(K((x-X_i)/h_i)/h_i\). Changing the kernel argument but retaining a common \(1/h\) generally breaks the unit-integral property.
  • Using a negative kernel without checking the claim. Unit integral does not guarantee a nonnegative estimate. For a density estimate, require a nonnegative kernel as well as unit integral.
  • Confusing a density value with a probability. The estimate at \(x\) is a density per unit loss. A probability over a range requires integration over that range.
  • Ignoring pilot instability. An extremely small or zero pilot value can make the adaptive bandwidth unusably wide or undefined; inspect and regularize cautiously.
Key takeaway: Sample-point adaptation uses \(h_i=h\sqrt{g/\tilde f_i}\): dense regions receive narrower windows and sparse regions wider ones. Calculate each summand with its own bandwidth, and check positivity, normalization, pilot stability, and the observation scheme before interpreting the result.

Check Your Understanding

For each problem, use the sample-point square-root rule. Unless stated otherwise, use a nonnegative, unit-integral uniform kernel and report density estimates to four decimal places.

  1. A two-loss sample has pilot densities \(0.09\) and \(0.01\) per thousand dollars, with global bandwidth \(h=0.6\) thousand dollars. Find \(g\) and both adaptive bandwidths. (Answer: \(g=0.03\); bandwidths \(0.3464\) and \(1.0392\) thousand dollars.)
  2. Four losses have pilot values \(0.0625, 0.0625, 0.25, 0.25\) per thousand dollars, and \(h=0.2\) thousand dollars. Find the common bandwidth for each pair of observations with the same pilot value. (Answer: \(0.2828\) thousand dollars for each \(0.0625\) pilot value and \(0.1414\) thousand dollars for each \(0.25\) pilot value.)
  3. Three losses are \(0,2,5\) thousand dollars, with adaptive bandwidths \(0.5,0.5,1\) thousand dollars. Using the uniform kernel, find the estimate at \(x=5.4\). (Answer: \(0.1667\) per thousand dollars.)
  4. A student proposes \(h_i=h\sqrt{\tilde f_i/g}\). Explain the direction of the error when \(\tilde f_i<g\). (Answer: It makes the sparse-region bandwidth smaller than \(h\), reversing the intended rule; the correct ratio is \(g/\tilde f_i\).)
  5. State two conditions on \(K\) that, together with positive \(h_i\), ensure the sample-point estimate is a nonnegative density integrating to one. (Answer: \(K(u)\geq0\) almost everywhere and \(\int_{-\infty}^{\infty}K(u)\,du=1\).)
Clinical Biostats