Tutorials › Statistical Learning (Graduate) › Boundary Equivalent Kernels and One-Sided Moments

Local Polynomial Estimation · Tutorial 429 of 989

Boundary Equivalent Kernels and One-Sided Moments

See how boundary truncation changes local polynomial weights, which moments those weights reproduce, and how the resulting equivalent kernel affects bias and variance.

Intermediate 10 min read

What You'll Learn

  • Define the rescaled distance from a one-sided boundary and the corresponding equivalent kernel.
  • Derive the one-sided moment conditions for a local polynomial fit.
  • Calculate boundary equivalent kernels and their moments for local constant and local linear regression.
  • Use polynomial reproduction to derive the leading boundary bias.
  • State the quadrature conditions needed to obtain the boundary variance limit.
  • Explain why boundary correction can coexist with increased variance.

Why the Equivalent Kernel Changes Near a Boundary

A symmetric kernel centered well inside the design region uses observations on both sides of the target. Near a boundary, observations on one side are unavailable, so the weights become asymmetric. For a local polynomial fit, that asymmetry changes the equivalent kernel and its moments. The key distinction is that polynomial reproduction can still remove low-order bias, even though the resulting weights—and their variance—may differ substantially from their interior counterparts.

We study a left boundary at zero and a fixed, equally spaced design on \([0,1]\). The regression function is \(m(x)=E[Y\mid X=x]\), and observations have independent errors with mean zero and common variance \(\sigma^2\). Let \(x_0=th\), where \(h\) is the bandwidth and \(t\geq 0\) is the target's distance from the boundary measured in bandwidths. For \(0\leq t<1\), the kernel window is truncated on the left. With a kernel supported on \([-1,1]\), the available rescaled locations lie in \([-t,1]\), up to the design endpoints.

Definition: Write \(u=(x-x_0)/h\), \(r_p(u)=(1,u,\ldots,u^p)^\mathsf{T}\), and let \(e_0=(1,0,\ldots,0)^\mathsf{T}\). If \(K\) is the kernel, define the one-sided moment matrix and the boundary equivalent kernel by $$ M_p(t)=\int_{-t}^{1} r_p(u)r_p(u)^\mathsf{T}K(u)\,du,\qquad L_{p,t}(u)=e_0^\mathsf{T}M_p(t)^{-1}r_p(u)K(u)\mathbf{1}\{-t\leq u\leq 1\}. $$ These definitions require \(M_p(t)\) to be nonsingular. The location parameter \(t\) records how much of the kernel window is available.

The equivalent kernel describes the limiting weights on the rescaled coordinate \(u\). The local polynomial fit is the weighted least-squares fit of a degree-\(p\) polynomial in \(u\); its estimate of \(m(x_0)\) is the fitted intercept. The matrix inverse in \(L_{p,t}\) adjusts the weights so the fit can reproduce polynomials through degree \(p\), despite the one-sided data.

Worked Boundary Kernels

Worked Example: Local Constant Fit at the Boundary

Take the uniform kernel \(K(u)=1/2\) for \(-1\leq u\leq 1\), zero otherwise, and a local constant fit (\(p=0\)) at \(t=0\). Only \(0\leq u\leq 1\) is observed in the window. The moment matrix is the scalar $$ M_0(0)=\int_0^1 \frac12\,du=\frac12. $$

Consequently the equivalent kernel on the available interval is $$ L_{0,0}(u)=\left(\frac12\right)^{-1}\frac12=1,\qquad 0\leq u\leq 1. $$ Its zeroth moment is \(\int_0^1 1\,du=1\), as required for an intercept estimate, but its first moment is \(\int_0^1 u\,du=1/2\), not zero. Thus a locally linear regression function generally produces first-order boundary bias for this local constant fit. The squared-kernel integral is \(\int_0^1 1^2\,du=1\); compare this with the interior value \(\int_{-1}^1(1/2)^2\,du=1/2\).

Worked Example: Local Linear Fit at the Boundary

Keep the uniform kernel and set \(p=1,t=0\). Direct integration gives $$ M_1(0)= \begin{pmatrix} \int_0^1 \frac12\,du & \int_0^1 \frac12u\,du\\ \int_0^1 \frac12u\,du & \int_0^1 \frac12u^2\,du \end{pmatrix} = \begin{pmatrix} 1/2&1/4\\ 1/4&1/6 \end{pmatrix}. $$ Its determinant is \(1/12-1/16=1/48\), so it is nonsingular, and $$ M_1(0)^{-1}= \begin{pmatrix} 8&-12\\ -12&24 \end{pmatrix}. $$

The first row of the inverse, multiplied by \(r_1(u)\) and \(K(u)\), gives \(L_{1,0}(u)=(8-12u)/2=4-6u\) on \([0,1]\). Its moments are $$ \int_0^1(4-6u)\,du=4-3=1,\qquad \int_0^1u(4-6u)\,du=2-\frac{6}{3}=0. $$ The first moment vanishes, so the local linear fit reproduces a linear function at the boundary. Its second moment is \(4/3-6/4=-1/6\), and its squared-kernel integral is $$ \int_0^1(4-6u)^2\,du=16-24+12=4. $$ The kernel takes negative values when \(u>2/3\). Those negative weights help enforce the zero first moment, but they also contribute to the relatively large squared-kernel integral.

Worked Example: A Target Half a Bandwidth from the Boundary

For the uniform kernel and a local constant fit, take \(t=1/2\). The available interval is \([-1/2,1]\), of length \(3/2\), so $$ M_0(1/2)=\int_{-1/2}^1\frac12\,du=\frac34,\qquad L_{0,1/2}(u)=\frac{2}{3},\quad -\frac12\leq u\leq 1. $$ The first moment is \(\frac23\int_{-1/2}^1u\,du=\frac23(3/8)=1/4\); the second is \(\frac23\int_{-1/2}^1u^2\,du=\frac23(3/8)=1/4\). The squared-kernel integral is \((4/9)(3/2)=2/3\). Thus, as the target moves from the boundary toward the interior, these quantities vary with its location: here the variance factor \(2/3\) lies between the boundary factor \(1\) and the interior factor \(1/2\).

Moment Reproduction and Boundary Bias

Define the one-sided equivalent-kernel moments by \(\mu_j(t)=\int_{-t}^1u^jL_{p,t}(u)\,du\). The moment identities follow directly from the local polynomial construction.

Theorem: If \(M_p(t)\) is nonsingular, then \(\mu_0(t)=1\), and \(\mu_j(t)=0\) for every integer \(j\) with \(1\leq j\leq p\).

Proof. For \(0\leq j\leq p\), let \(e_j\) denote the coordinate vector whose entry corresponding to \(u^j\) is one (the first coordinate is \(e_0\)). Since \(u^j\) is the \(j\)th component of \(r_p(u)\), $$ \int_{-t}^1 r_p(u)u^jK(u)\,du=M_p(t)e_j. $$ Multiplying by \(e_0^\mathsf{T}M_p(t)^{-1}\) gives $$ \mu_j(t)=e_0^\mathsf{T}M_p(t)^{-1}M_p(t)e_j=e_0^\mathsf{T}e_j. $$ This equals one for \(j=0\) and zero for \(1\leq j\leq p\). \(\square\)

These identities explain the bias correction. Suppose \(m\) has a continuous derivative of order \(p+1\) near \(x_0\). The continuous equivalent-kernel smoothing operation has expectation \(\int L_{p,t}(u)m(x_0+hu)\,du\). Taylor expansion gives $$ m(x_0+hu)=\sum_{j=0}^{p}\frac{m^{(j)}(x_0)}{j!}(hu)^j+ \frac{m^{(p+1)}(x_0)}{(p+1)!}(hu)^{p+1}+o(h^{p+1}), $$ uniformly for \(u\in[-t,1]\) when \(t\) is fixed. Integrating term by term, the moment theorem keeps the constant term, removes powers one through \(p\), and leaves $$ \int_{-t}^1L_{p,t}(u)m(x_0+hu)\,du-m(x_0) = \frac{h^{p+1}m^{(p+1)}(x_0)}{(p+1)!}\mu_{p+1}(t)+o(h^{p+1}). $$ The remainder stays \(o(h^{p+1})\) after integration because \(L_{p,t}\) is bounded on a finite interval under the kernel conditions used here.

For a local constant fit, the first moment need not vanish, so the leading bias is typically order \(h\). A local linear fit has zero first moment even at the boundary, and its typical leading bias is order \(h^2\). This is boundary correction in the polynomial-reproduction sense. It does not imply that every higher-order moment matches its interior value or that the leading bias coefficient is zero.

Variance at a One-Sided Boundary

A variance limit requires more than the existence of the integral \(\int L_{p,t}^2\). In the fixed-design setting, the discrete weights form a lattice approximation to the equivalent kernel, so conditions for the corresponding Riemann sums are needed. We state them explicitly.

Theorem: Suppose \(x_i=i/n\), \(i=0,\ldots,n\), \(h\to0\), \(nh\to\infty\), and \(x_0=th\) for a fixed \(t\in[0,1)\). Assume errors are independent, mean zero, and have common variance \(\sigma^2\). Let \(K\) be bounded, supported on \([-1,1]\), and piecewise continuous, and suppose \(M_p(t)\) is nonsingular. Assume the rescaled lattice Riemann sums for the entries \(K(u)u^a\) and \(K(u)^2u^a\), \(0\leq a\leq 2p\), converge to their integrals on \([-t,1]\). Then the local polynomial estimator of \(m(x_0)\) has $$ \operatorname{Var}\{\hat m(x_0)\}= \frac{\sigma^2}{nh}\left\{\int_{-t}^1 L_{p,t}(u)^2\,du+o(1)\right\}. $$ For fixed \(t\), bounded piecewise-continuous kernels give the required Riemann-sum convergence; stating the convergence assumption explicitly also covers other designs or quadrature schemes.

Proof. Write \(u_i=(x_i-x_0)/h\). The local polynomial intercept is a weighted sum \(\hat m(x_0)=\sum_iW_iY_i\), where $$ W_i=e_0^\mathsf{T}\left\{\sum_jK(u_j)r_p(u_j)r_p(u_j)^\mathsf{T}\right\}^{-1}K(u_i)r_p(u_i). $$ Set \(A_n=(nh)^{-1}\sum_jK(u_j)r_p(u_j)r_p(u_j)^\mathsf{T}\). The stated Riemann-sum condition implies \(A_n\to M_p(t)\), so \(A_n^{-1}\to M_p(t)^{-1}\). Thus $$ W_i=\frac{1}{nh}L_n(u_i),\qquad L_n(u)=e_0^\mathsf{T}A_n^{-1}r_p(u)K(u). $$ Independence and common error variance give \(\operatorname{Var}\{\hat m(x_0)\}=\sigma^2\sum_iW_i^2\). The coefficients of \(L_n\) converge to those of \(L_{p,t}\). Since \(L_n^2\) is a linear combination of the functions \(K(u)^2u^a\), \(0\leq a\leq2p\), the same lattice quadrature applies to these bounded piecewise-continuous functions. It follows that $$ \frac{1}{nh}\sum_iL_n(u_i)^2\longrightarrow\int_{-t}^1L_{p,t}(u)^2\,du. $$ Substituting \(W_i=(nh)^{-1}L_n(u_i)\) into the exact variance yields $$ \operatorname{Var}\{\hat m(x_0)\} =\frac{\sigma^2}{nh}\left\{\frac{1}{nh}\sum_iL_n(u_i)^2\right\} =\frac{\sigma^2}{nh}\left\{\int_{-t}^1L_{p,t}(u)^2\,du+o(1)\right\}. $$ This proves the result. \(\square\)

The example calculations illustrate why the variance factor depends on location and polynomial degree. At the boundary, the local constant uniform-kernel factor is \(1\), twice its interior value \(1/2\). The local linear boundary factor in the same example is \(4\), reflecting the negative weights required to cancel the first moment. These are particular values, not universal ratios: other kernels, degrees, and values of \(t\) give different integrals.

Common Pitfall and Practical Interpretation

  • Assuming symmetry survives truncation. The one-sided support is not symmetric about \(u=0\), so odd moments generally do not vanish automatically. The local polynomial moment identities come from the matrix adjustment, not from kernel symmetry.
  • Calling boundary correction a variance improvement. Reproducing low-degree polynomials controls bias, but it does not guarantee small squared weights. Negative weights can enforce moment cancellation while increasing \(\int L_{p,t}^2\).
  • Inferring a variance limit from square-integrability alone. A finite integral of \(L_{p,t}^2\) does not by itself show that the design's lattice sums converge to that integral. A suitable Riemann-sum condition, such as the bounded piecewise-continuous fixed-design conditions above, is also needed.

The boundary equivalent kernel therefore gives two complementary pieces of information. Its first several moments describe which polynomial trends the estimator reproduces and hence which bias terms disappear. Its squared integral describes the leading variance under the stated design and quadrature conditions. Both depend on the target's scaled distance from the boundary.

Check Your Understanding

Use the definitions and results above to answer the following questions.

  1. For a local constant fit, which moment condition is guaranteed, and why can its first moment remain nonzero near a boundary?
  2. For a local linear fit, what do the zeroth and first equivalent-kernel moments imply about reproduction of a linear regression function?
  3. In the uniform-kernel boundary local linear example, verify the sign-change location of the equivalent kernel and explain why negative weights are useful.
  4. Why does the variance formula involve the integral of the squared equivalent kernel rather than its zeroth moment?
  5. What extra condition connects the lattice sum of squared weights to the integral of the squared equivalent kernel?
Clinical Biostats