Tutorials › Exam ASTAM - Advanced Short-Term Actuarial Mathematics › Boundary Bias For Nonnegative Losses

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

Boundary Bias For Nonnegative Losses

Learn to derive and quantify boundary bias when estimating a nonnegative loss density with a symmetric kernel.

Advanced 10 min read

What You'll Learn

  • State the kernel density estimator and the assumptions used to analyze its boundary expectation
  • Derive why a symmetric kernel contributes only half its mass at zero
  • Distinguish an additive limit from an asymptotic ratio when the boundary density is zero
  • Compute boundary expectations for exponential and uniform loss models
  • Identify common boundary-bias errors and interpret a single estimate correctly

Why the Zero Boundary Matters

Loss amounts are nonnegative, so their density is supported on \([0,\infty)\). A symmetric kernel, however, places half of its mass on either side of its center. When a kernel density estimate is evaluated at zero, the part extending into negative loss values has no observations to contribute. The result is a systematic downward effect at the boundary, even when the underlying density is smooth.

This is a feature of the estimator and its evaluation point, not evidence that the true density is necessarily small. Understanding the effect requires keeping the support of the loss distribution in view when taking expectations.

Definition: Let \(X_1,\ldots,X_n\) be independent observations from a density \(f_X\) supported on \([0,\infty)\). Given bandwidth \(h>0\) and a kernel \(K\), the kernel density estimator at \(x\) is $$ \widehat f_h(x)=\frac{1}{nh}\sum_{i=1}^n K\left(\frac{x-X_i}{h}\right). $$ A symmetric kernel satisfies \(K(t)=K(-t)\), and is normalized so that \(\int_{-\infty}^{\infty}K(t)\,dt=1\). Its mass on either side of zero is therefore \(1/2\).

The usual kernel-density setup assumes the observations are drawn from a continuous distribution and that the kernel is integrable. For the boundary limit below, assume \(f_X\) has a finite right-hand limit at zero, denoted \(f_X(0)\), and that the integrands are dominated by an integrable function as \(h\) decreases to zero. These conditions hold for the examples in this tutorial. If losses have a separate probability mass at exactly zero, a continuous density alone does not describe that mass, and this analysis should not be applied to the atom as if it were ordinary density.

Deriving the Boundary Expectation

At \(x=0\), the expected estimate can be written as an integral over possible nonnegative losses. Changing variables makes the kernel’s half-mass contribution explicit.

$$ \begin{aligned} E[\widehat f_h(0)] &= \int_0^\infty \frac{1}{h}K\left(-\frac{y}{h}\right)f_X(y)\,dy \\ &= \int_{-\infty}^0 K(t)f_X(-ht)\,dt, \qquad t=-\frac{y}{h}. \end{aligned} $$

As \(h\) decreases to zero, \(f_X(-ht)\) approaches the boundary value \(f_X(0)\) for each fixed \(t\leq 0\). Dominated convergence then gives the additive limit below. Symmetry and normalization of \(K\) give the last equality.

$$ E[\widehat f_h(0)] =\frac{1}{2}f_X(0)+o(1) \qquad (h\to 0). $$

The additive form matters. If \(f_X(0)>0\), it also implies the ratio statement \(E[\widehat f_h(0)]/f_X(0)\to 1/2\), or equivalently \(E[\widehat f_h(0)]\sim f_X(0)/2\). If \(f_X(0)=0\), that ratio is not defined. In that case the additive limit still says \(E[\widehat f_h(0)]\to 0\), but the expectation may be positive for every \(h>0\) and may approach zero at a particular rate.

For a positive boundary density, the limiting bias at zero is consequently

$$ \operatorname{Bias}(\widehat f_h(0)) =E[\widehat f_h(0)]-f_X(0) =-\frac{1}{2}f_X(0)+o(1). $$

Unlike the familiar interior bias that vanishes with bandwidth under smoothness conditions, this boundary bias does not vanish in the limit when \(f_X(0)>0\). The reason is geometric: even an arbitrarily narrow symmetric kernel centered at zero still puts half of its mass on the negative side.

1
Write the support correctly.
Integrate only over \(y\geq 0\), because a nonnegative loss cannot take a negative value.
2
Rescale the distance from the boundary.
Use \(t=-y/h\) at zero; the integration range becomes \(t\leq 0\).
3
Take the small-bandwidth limit.
Replace \(f_X(-ht)\) by its right-hand boundary limit inside the integral, under the stated domination condition.
4
Use symmetry only on the half-line.
The integral of \(K\) from \(-\infty\) to zero is \(1/2\), not \(1\).

Worked Boundary Calculations

Worked Example: Exponential Losses With a Normal Kernel

Suppose hypothetical individual losses have density \(f_X(y)=e^{-y}\) for \(y\geq 0\), and use the standard normal kernel \(K(t)=\phi(t)\) with bandwidth \(h=0.5\). Find the expected kernel estimate at zero and compare it with the true boundary density. Here \(\phi\) and \(\Phi\) denote the standard normal density and distribution function.

Method. Substitute the exponential density into the boundary expectation and complete the square. This evaluates the finite-bandwidth expectation rather than using only its small-bandwidth limit.

Step 1: Set up the expectation. With \(t\leq 0\), \(f_X(-ht)=e^{ht}\), so

$$ E[\widehat f_h(0)] =\int_{-\infty}^0 \phi(t)e^{ht}\,dt. $$

Step 2: Complete the square. Since \(-t^2/2+ht=-(t-h)^2/2+h^2/2\), the substitution \(z=t-h\) gives

$$ \int_{-\infty}^0 \phi(t)e^{ht}\,dt =e^{h^2/2}\int_{-\infty}^{-h}\phi(z)\,dz =e^{h^2/2}\Phi(-h). $$

Step 3: Insert the bandwidth. For \(h=0.5\),

$$ e^{(0.5)^2/2}\Phi(-0.5) =e^{0.125}(0.3085375) \approx 1.133148(0.3085375) \approx 0.3496. $$

The true boundary density is \(f_X(0)=1\), so the expected estimate is about \(0.3496\), below the limiting half-density value \(0.5\). The difference from \(0.5\) at this bandwidth reflects the fact that the exponential density decreases as one moves into the positive-loss region. As \(h\to 0\), the exact expression tends to \(1/2\), as the boundary limit predicts. The common mistake avoided here is treating the limiting half-density result as the exact answer at a finite bandwidth.

Check. The value \(e^{0.125}\Phi(-0.5)\) is positive and less than \(0.5\), consistent with a decreasing density and the half-mass boundary limit.

Worked Example: A Flat Density Near Zero

A hypothetical loss \(X\) is uniform on \([0,2]\), so \(f_X(y)=1/2\) on that interval. Estimate the expected density at zero using the Epanechnikov kernel \(K(t)=\frac{3}{4}(1-t^2)\) for \(|t|\leq 1\), and \(K(t)=0\) otherwise, with bandwidth \(h=0.4\).

Method. Because the kernel is zero outside \([-1,1]\), only losses between zero and \(h=0.4\) contribute. The density is constant throughout that range, so the expectation is exactly half the true density.

Step 1: Rescale. The boundary expectation is

$$ E[\widehat f_h(0)] =\int_{-1}^0 \frac{3}{4}(1-t^2)\frac{1}{2}\,dt. $$

Step 2: Integrate the kernel over the negative half.

$$ \int_{-1}^0 \frac{3}{4}(1-t^2)\,dt =\frac{3}{4}\left[t-\frac{t^3}{3}\right]_{-1}^0 =\frac{3}{4}\left(0-\left(-1+\frac{1}{3}\right)\right) =\frac{1}{2}. $$

Step 3: Multiply by the density.

$$ E[\widehat f_h(0)] =\frac{1}{2}\left(\frac{1}{2}\right) =0.25. $$

The true boundary density is \(0.5\), so the expected estimate is exactly half of it. The calculation is exact here because the density is constant over the kernel’s contributing range; it is not merely an approximation for small bandwidth. This example also checks that the Epanechnikov kernel has total mass one and negative-half mass \(1/2\).

Worked Example: A Density That Is Zero at the Boundary

Suppose hypothetical losses have the density \(f_X(y)=ye^{-y}\) for \(y\geq 0\), a gamma density with shape 2 and rate 1. Use the standard normal kernel and \(h=0.2\). Find the boundary expectation and explain why it cannot be described as asymptotic to \(f_X(0)/2\).

Method. The true boundary density is zero, so retain an additive expression and compute the leading order of the expectation instead of forming a ratio to \(f_X(0)\).

Step 1: Transform the boundary integral. Since \(f_X(-ht)=(-ht)e^{ht}\), and \(u=-t\),

$$ E[\widehat f_h(0)] =h\int_0^\infty u\phi(u)e^{-hu}\,du. $$

Step 2: Evaluate the integral. Using \(\phi'(u)=-u\phi(u)\) and integration by parts,

$$ \begin{aligned} \int_0^\infty u\phi(u)e^{-hu}\,du &=\phi(0)-h\int_0^\infty \phi(u)e^{-hu}\,du\\ &=\phi(0)-h e^{h^2/2}\Phi(-h). \end{aligned} $$

The second equality follows by completing the square in the remaining normal integral. Therefore

$$ E[\widehat f_h(0)] =h\left(\phi(0)-h e^{h^2/2}\Phi(-h)\right). $$

Step 3: Evaluate at \(h=0.2\). Using \(\phi(0)=0.3989423\), \(e^{0.02}\approx1.0202013\), and \(\Phi(-0.2)\approx0.4207403\),

$$ \begin{aligned} E[\widehat f_{0.2}(0)] &=0.2\left(0.3989423-0.2(1.0202013)(0.4207403)\right)\\ &\approx 0.2(0.3989423-0.0858480)\\ &\approx 0.0626. \end{aligned} $$

Here \(f_X(0)=0\), so \(f_X(0)/2=0\). The expectation is positive at \(h=0.2\), but it tends to zero as \(h\to0\); more specifically, \(E[\widehat f_h(0)]/h\to\phi(0)\). Thus the correct general statement is the additive limit \(E[\widehat f_h(0)]=f_X(0)/2+o(1)\). Writing a ratio equivalence to \(f_X(0)/2\) would be invalid because the comparison quantity is zero.

Check. The expression is positive for \(h=0.2\) and approaches zero with \(h\), which is consistent with the true boundary density being zero.

Common Mistakes and Interpretation

Boundary bias describes the expectation of an estimator over repeated samples. It does not require every individual estimate to be below the true density. A realized sample can produce a high boundary estimate if several observed losses lie close to zero.

For example, with the Epanechnikov kernel and bandwidth \(h=0.5\), consider the hypothetical observed losses \(0.1,0.3,0.8\). The scaled arguments at zero are \(-0.2,-0.6,-1.6\). Their kernel values are \(0.72,0.48,0\), respectively, so the estimate is

$$ \widehat f_{0.5}(0) =\frac{0.72+0.48+0}{3(0.5)} =\frac{1.20}{1.50} =0.8. $$

This estimate can exceed a model’s true boundary density even though the estimator has a downward boundary effect in expectation. A single realization and an expectation answer different questions.

Common exam trap: Replacing the half-line kernel integral by the full kernel integral gives the incorrect calculation \(E[\widehat f_h(0)]\approx f_X(0)\), because it uses \(\int_{-\infty}^{\infty}K(t)\,dt=1\). At zero, the transformed integral runs only over \(t\leq0\); symmetry gives \(\int_{-\infty}^0K(t)\,dt=1/2\). The corrected additive limit is \(E[\widehat f_h(0)]=f_X(0)/2+o(1)\). Also, use the ratio form only when \(f_X(0)>0\).

When applying this result, identify the support, check whether the boundary density is positive or zero, and distinguish a finite-bandwidth calculation from a limiting statement. These checks prevent two opposite errors: claiming that every estimate is too low, and applying a ratio asymptotic when the boundary density vanishes.

Check Your Understanding

For each problem, identify the support and kernel contribution before calculating.

  1. A hypothetical loss is uniform on \([0,5/3]\). With the Epanechnikov kernel and bandwidth \(h=0.2\), what is the expected estimate at zero? (Answer: \(0.3000\))
  2. Losses have density \(e^{-x}\) for \(x\geq0\). With the standard normal kernel and \(h=1\), calculate the expected estimate at zero using \(e^{h^2/2}\Phi(-h)\). (Answer: \(0.2616\))
  3. A hypothetical loss density is \(f_X(x)=2(1-x)\) for \(0\leq x\leq1\), and zero otherwise. Using the Epanechnikov kernel with \(h=0.5\), calculate the expected estimate at zero and compare it with \(f_X(0)\). (Answer: \(0.8125\), compared with \(f_X(0)=2\))
  4. For \(f_X(x)=xe^{-x}\), \(x\geq0\), with a standard normal kernel, find \(\lim_{h\to0}E[\widehat f_h(0)]/h\). Should the expectation be written as asymptotic to \(f_X(0)/2\)? (Answer: \(1/\sqrt{2\pi}\approx0.3989\); no, because \(f_X(0)/2=0\))
  5. Three hypothetical losses are \(0.1,0.3,0.8\). Using the Epanechnikov kernel and \(h=0.5\), calculate the estimate at zero and explain whether it contradicts downward boundary bias in expectation. (Answer: \(0.8000\); no, a realized estimate may exceed the true density even when its expectation is biased downward.)
Clinical Biostats