From Pointwise Error to Integrated Risk
A pointwise mean squared error describes estimation accuracy at one fixed location. In regression, however, a fitted curve is usually used across a range of locations. Its integrated mean squared error (IMSE) measures average squared error over that range and makes the contribution of boundaries visible.
Consider independent observations \((X_i,Y_i)\), \(i=1,\ldots,n\), on the interval \([0,1]\), with \(Y_i=m(X_i)+\varepsilon_i\), \(E[\varepsilon_i\mid X_i]=0\), and \(\operatorname{Var}(\varepsilon_i\mid X_i)=\sigma^2(X_i)\). Let \(\hat m_h(x)\) be a local constant or local linear estimator using bandwidth \(h\). We use Lebesgue measure for integrated risk:
The design density \(f\) determines how observations are distributed, but this definition gives equal weight to every location in the interval. A risk integrated with respect to the design distribution instead has \(f(x)\,dx\) as its measure and generally has different constants.
Conditions and Boundary Expansions
For the expansions below, take a symmetric, nonnegative kernel \(K\), supported on \([-1,1]\), with \(\int K(u)\,du=1\), and write \(\mu_2=\int u^2K(u)\,du\) and \(R(K)=\int K(u)^2\,du\). Assume \(m\) has at least three continuous derivatives, \(f\) has at least two and is bounded away from zero, and \(\sigma^2\) is bounded and continuous. The usual local polynomial moment matrices are assumed nonsingular throughout the boundary layer. We consider \(h\to0\), \(nh^3\to\infty\), and estimators defined whenever the local fit exists; standard concentration conditions can make the probability of a missing local fit negligible.
These conditions give the familiar interior bias expansions. For local constant regression under random design, \(B_h(x)=h^2b_0(x)+o(h^2)\), where \(b_0(x)=\frac{\mu_2}{2}\{m''(x)+2m'(x)f'(x)/f(x)\}\). For local linear regression, \(B_h(x)=h^2b_1(x)+o(h^2)\), where \(b_1(x)=\frac{\mu_2}{2}m''(x)\). The density-gradient term in the local constant bias is not present in the leading local linear bias.
At a boundary, local constant regression has a different leading behavior. For \(x=ht\), \(0\leq t\leq1\), define \(\mu_j(t)=\int_{-t}^1u^jK(u)\,du\). To first order, the local constant weights use this truncated kernel. Expanding \(m(hu)\) and \(m(ht)\) about zero gives
The term of order \(h\) arises because the truncated weights do not have zero first moment about the target. For local linear regression, the fitted line reproduces constants and linear functions even with one-sided data. Its boundary bias is therefore \(O(h^2)\), under the stated smoothness and nonsingularity conditions. One-sided equivalent kernels can have negative weights, but their zeroth and first moments still reproduce those two polynomial terms.
Worked Example: Local Constant Bias at the Left Boundary
Take a uniform design on \([0,1]\), a uniform kernel \(K(u)=1/2\) on \([-1,1]\), and \(m(x)=x\). At \(x=ht\), only scaled locations \(u\in[-t,1]\) contribute. The kernel moments are
Since \(m'(0)=1\) and \(m''(0)=0\), the boundary bias is \(h\{(1-t)/2-t\}=h(1-3t)/2\). Integrating its square across the left boundary strip, using \(x=ht\) and \(dx=h\,dt\), gives
because \(\int_0^1(1-3t)^2dt=1-3+3=1\). The right boundary has the same squared contribution by symmetry. Thus the leading integrated squared boundary bias is \(h^3/2\), even though the interior bias for this linear regression function is zero.
How the Boundary Changes Integrated Squared Bias
A boundary layer has width \(h\). For local constant regression, its leading bias is of size \(h\) when the endpoint slope is nonzero. Squaring gives size \(h^2\), and integrating over a region of width \(h\) gives size \(h^3\). More precisely, with the symmetric kernel above, the leading boundary coefficient is
The integral in this coefficient is positive for a nondegenerate symmetric kernel with positive mass on the positive half of its support: at \(t=0\), the truncated first moment is positive. Thus a nonzero endpoint slope makes the leading \(h^3\) contribution positive. If both endpoint slopes vanish, this term disappears; one must then examine the next bias terms rather than assert that the squared bias is exactly of order \(h^3\).
For local linear regression, the boundary bias is \(O(h^2)\), so its squared contribution over a width-\(h\) strip is \(O(h^5)\). The interior squared bias is usually \(O(h^4)\) after integration over a region of order one. Consequently, when the interior leading bias function is not identically zero, it is the interior—not the boundary strip—that determines the leading integrated squared bias for local linear regression.
Worked Example: Local Linear Bias at the Boundary
Use the same uniform kernel and uniform design, but fit a local linear model at the left endpoint \(x=0\). In scaled coordinates \(u=X/h\), the observations lie on the one-sided interval \([0,1]\). The equivalent kernel at this endpoint is \(L(u)=4-6u\) on \([0,1]\). Direct integration verifies its reproduction properties:
For a twice differentiable regression function, \(m(hu)=m(0)+hu\,m'(0)+h^2u^2m''(0)/2+O(h^3)\). The first two moment calculations reproduce the constant and linear terms, while the third gives the leading bias:
This is second order in \(h\), not first order. The negative equivalent-kernel weights do not invalidate the calculation; they are what allow the first moment to be zero with one-sided data.
Integrated Variance and a Risk Decomposition
For either estimator, the variance has a leading contribution from the regression errors. In the interior, the local equivalent kernel is \(K\) for both local constant and local linear fits with a symmetric kernel. The leading conditional-noise variance is therefore \(\sigma^2(x)R(K)/(nhf(x))\). Integrating over the interval gives the constant
provided \(C_V>0\). The boundary strip does not change this leading integrated term: its pointwise variance is of order \(1/(nh)\), but the strip has width \(h\), so its integrated contribution is only of order \(1/n\). This argument assumes regular boundary moment matrices, which keep the boundary variance constant bounded.
The variance statement requires care when the conditional errors have little or no variance. For random design, the estimator can vary because the observed \(X_i\)'s vary, even if every \(\varepsilon_i=0\). The exact variance decomposition is \(\operatorname{Var}(\hat m_h(x))=E[\operatorname{Var}(\hat m_h(x)\mid X_1,\ldots,X_n)]+\operatorname{Var}(E[\hat m_h(x)\mid X_1,\ldots,X_n])\). The first term is the conditional-noise contribution above; the second is design variation and may remain when \(C_V=0\). In ordinary smooth settings its interior scale can be \(h/n\), rather than \(1/(nh)\). It cannot be discarded merely by writing down the noise-variance formula.
Two Integrated-Risk Regimes
Combining the expansions gives useful bandwidth balances, but only when their leading coefficients are positive. For local constant regression, if at least one endpoint slope is nonzero and \(C_V>0\), then
The balance \(h^3\asymp1/(nh)\) yields \(h\asymp n^{-1/4}\). This is a consequence of the first-order boundary bias, not a universal local constant rate. If both endpoint slopes vanish, the \(h^3\) coefficient is zero and the next nonzero integrated bias term must be identified before choosing a rate.
For local linear regression, if \(B_1=\int_0^1b_1(x)^2dx>0\) and \(C_V>0\), then
Balancing these terms gives \(h\asymp n^{-1/5}\). If \(b_1\) is identically zero, this balance is not justified: higher-order bias terms or other sources of error may determine the risk. Similarly, if \(C_V=0\), the remaining design-variation variance must be assessed before deriving a bandwidth rate.
Worked Example: A Valid Local Constant Bandwidth Balance
Let \(X\) be uniform on \([0,1]\), \(m(x)=x\), and \(\varepsilon\sim N(0,\sigma^2)\) independently of \(X\), with \(\sigma^2>0\). Use the uniform kernel \(K(u)=1/2\) on \([-1,1]\). The first worked example gives a boundary squared-bias contribution \(h^3/2\) from the two endpoints. The interior bias is zero because the regression function is linear and the interior kernel is symmetric.
Here \(R(K)=\int_{-1}^1(1/2)^2du=1/2\), \(f(x)=1\), and \(\sigma^2(x)=\sigma^2\). Therefore \(C_V=\sigma^2/2>0\). The leading IMSE is
Differentiating the two leading terms gives \(\frac32h^2-\frac{\sigma^2}{2n h^2}=0\), so \(3h^4=\sigma^2/n\), or \(h=(\sigma^2/(3n))^{1/4}\). The positive noise variance is essential to this calculation: it verifies that the displayed \(1/(nh)\) term is genuinely present. If instead \(\varepsilon=0\), this particular variance constant would be zero, and the same bandwidth balance could not be concluded from this expansion.
Common Pitfall and Practical Interpretation
A common mistake is to say that local constant squared bias is “of order \(h^4\)” everywhere because its interior bias is of order \(h^2\). That ignores the boundary strip: when an endpoint slope is nonzero, local constant bias there is order \(h\), and its integrated square is order \(h^3\). The correction is to separate interior and boundary regions before integrating.
A second mistake is to treat \(C_V/(nh)\) as the full leading variance without checking \(C_V\). It is the leading conditional-noise term. When \(C_V>0\), it dominates the usual smaller design-variation term and supports the balances above. If it vanishes, the total variance need not vanish, nor need it have order \(1/(nh)\); a separate variance calculation is required.
Check Your Understanding
Use the definitions and expansions above to answer the following questions.
- Why does a bias of order \(h\) on a boundary region of width \(h\) contribute order \(h^3\) to integrated squared bias?
- For local constant regression, what condition on endpoint slopes makes the leading boundary coefficient positive?
- Why is the integrated boundary variance typically order \(1/n\), even though pointwise variance there is order \(1/(nh)\)?
- What does \(C_V>0\) guarantee in the local constant bandwidth balance?
- If the local linear leading bias function \(b_1\) is identically zero, why is an \(n^{-1/5}\) bandwidth rate not established by the displayed risk expansion?