Tutorials › Statistical Learning (Graduate) › Polynomial Degree and Local Smoothness

Local Polynomial Estimation · Tutorial 425 of 989

Polynomial Degree and Local Smoothness

Learn how polynomial degree and local smoothness determine the order of local-polynomial bias, with fully worked degree-two and degree-three calculations.

Intermediate 11 min read

What You'll Learn

  • Explain why a degree-p local polynomial reproduces polynomial targets through degree p.
  • Determine the bias order from polynomial degree and a local smoothness condition.
  • Distinguish an upper bound on bias order from an exact, nonzero leading bias.
  • Work through a degree-two fit and check its coefficients directly.
  • Calculate a nonzero degree-two bias for a cubic target.
  • Analyze a degree-three fit to a target with 5/2-order local smoothness.

Why Degree and Smoothness Work Together

A local polynomial fit estimates a regression function near a target point by fitting a polynomial to nearby observations. Its degree determines which polynomial shapes it can reproduce exactly. The target function’s smoothness determines how closely it can be approximated by such a polynomial over a small neighborhood. Together, these facts determine the order of the fit’s approximation bias as the bandwidth \(h\) becomes small.

The key conclusion is an order bound: with a degree-\(p\) fit and local smoothness \(\beta\), the bias is typically at most of order \(h^{\min(\beta,p+1)}\), under suitable local-design and smoothness conditions. This is not automatically an exact bias formula. The actual bias can be smaller, or even zero, because of symmetry or other cancellations.

Local Polynomial Fit and Its Reproduction Property

Fix a target point \(x\). For observations at locations \(X_i\) within bandwidth \(h\), write \(u_i=(X_i-x)/h\). A degree-\(p\) local polynomial fit uses the regressors \(1,u_i,\ldots,u_i^p\) and minimizes a weighted sum of squared residuals. The fitted value at \(x\) is the fitted intercept.

For a precise bias statement, consider fixed design locations and nonnegative normalized weights \(q_i\), with \(\sum_i q_i=1\). Let \(r_p(u)=(1,u,\ldots,u^p)^\mathsf{T}\), and suppose the scaled locations with positive weight satisfy \(|u_i|\leq A\) for a fixed finite \(A\). Define the weighted design matrix

$$ G=\sum_i q_i r_p(u_i)r_p(u_i)^\mathsf{T}. $$

Assume \(G\) is invertible. With responses \(Y_i=f(X_i)+\varepsilon_i\), suppose \(E[\varepsilon_i\mid X_1,\ldots,X_n]=0\). The fitted coefficient vector is \(G^{-1}\sum_i q_i r_p(u_i)Y_i\), and the fitted value at \(x\) is its first component.

Definition: A degree-\(p\) local polynomial fit has polynomial reproduction through degree \(p\) if, whenever the response is a polynomial of degree at most \(p\) in the scaled coordinate \(u=(X-x)/h\), the fitted value at \(x\) equals that polynomial’s value at \(u=0\).
Theorem: If \(G\) is invertible, the degree-\(p\) weighted least-squares fit reproduces every polynomial of degree at most \(p\) exactly at \(x\).

Proof. Let the response at each scaled location be \(g(u_i)=r_p(u_i)^\mathsf{T}a\), where \(a\) is its coefficient vector. Then

$$ \sum_i q_i r_p(u_i)g(u_i) =\sum_i q_i r_p(u_i)r_p(u_i)^\mathsf{T}a =Ga. $$

The fitted coefficient vector is therefore \(G^{-1}Ga=a\). Its first component is \(g(0)\), since the constant basis function is the first component of \(r_p(u)\). This proves exact reproduction. \(\square\)

Worked Calculations

Worked Example: Checking the Coefficients of a Quadratic Fit

Consider a degree-two fit at \(x\), with equal weights at scaled locations \(u=-1,0,1\) and responses \(-0.7,-0.9,1.9\), respectively. Write the fitted polynomial as \(a+bu+cu^2\). Since there are three distinct locations, the quadratic interpolates these three responses.

At \(u=0\), \(a=-0.9\). The other two equations are \(-a+b-c=-0.7\) and \(a+b+c=1.9\). Adding them gives \(2b=1.2\), so \(b=0.6\). Wait: checking the stated data directly, the sum is \((-0.7)+(1.9)=1.2\), while the sum of the model values at \(-1\) and \(1\) is \(2a+2c\), not \(2b\). Thus \(2c=1.2-2a=1.2+1.8=3\), giving \(c=1.5\).

Subtracting the equation at \(-1\) from the equation at \(1\) gives \(2b=1.9-(-0.7)=2.6\), so \(b=1.3\). The fitted polynomial is therefore \(-0.9+1.3u+1.5u^2\), and its fitted value at the target \(u=0\) is \(-0.9\). Direct substitution checks all three responses: the values at \(-1,0,1\) are \(-0.7,-0.9,1.9\).

This calculation illustrates why coefficients should be checked in the original equations: the sum of the two endpoint equations identifies the even terms, while their difference identifies the odd term.

Worked Example: A Degree-Two Fit to a Cubic Target

Let the target be \(f(t)=t^3\), estimate at \(x=0\), and use degree two with equal weights at \(t=-h,h,2h\), where \(h>0\). The fit interpolates the three observations. In the scaled coordinate \(u=t/h\), the response values are \(-h^3,h^3,8h^3\).

Write the fitted quadratic as \(a+bu+cu^2\). The interpolation equations are

$$ a-b+c=-h^3,\qquad a+b+c=h^3,\qquad a+2b+4c=8h^3. $$

Subtracting the first equation from the second gives \(2b=2h^3\), hence \(b=h^3\). The first two equations also imply \(a+c=0\). Substituting \(b=h^3\) into the third gives \(a+2h^3+4c=8h^3\), or \(a+4c=6h^3\). Since \(a=-c\), this yields \(3c=6h^3\), \(c=2h^3\), and \(a=-2h^3\).

Thus the fitted value at zero is \(-2h^3\), whereas \(f(0)=0\); the bias is \(-2h^3\). It is nonzero and of order \(h^3\), consistent with a degree-two fit’s ability to remove polynomial terms through degree two, but not the cubic term. Direct substitution gives the values \(-h^3,h^3,8h^3\) at \(u=-1,1,2\), respectively.

From Smoothness to a Bias-Order Bound

A smoothness condition describes how well \(f\) can be approximated near \(x\). For noninteger \(\beta=m+\alpha\), where \(m\) is a nonnegative integer and \(0<\alpha<1\), a standard local Hölder condition is that \(f\) has \(m\) continuous derivatives near \(x\) and its \(m\)th derivative is locally \(\alpha\)-Hölder. This gives a Taylor polynomial through degree \(m\) with remainder bounded by a constant times \(|t-x|^\beta\). For integer \(\beta\), assume the derivatives through order \(\beta\) exist locally, are continuous as needed for Taylor’s theorem, and the derivative of order \(\beta\) is bounded; the Taylor polynomial through degree \(\beta-1\) then has remainder bounded by a constant times \(|t-x|^\beta\).

The following bound makes the role of degree explicit. It uses the design and weight assumptions already stated, including invertibility of \(G\). Let \(s=\min(\beta,p+1)\).

Theorem: Suppose \(f\) has local smoothness \(\beta>0\) at \(x\) in the sense just described. Under the stated bounded-scaled-location and invertible-design assumptions, and assuming the inverses of the design matrices are uniformly bounded as \(h\to0\), the conditional bias of the degree-\(p\) fitted value at \(x\) is \(O(h^s)\), where \(s=\min(\beta,p+1)\).

Proof. The fitted intercept is a linear function of the responses. Let \(e_0=(1,0,\ldots,0)^\mathsf{T}\), and let \(T(u)\) be a polynomial of degree at most \(p\) approximating the function \(u\mapsto f(x+hu)\). Polynomial reproduction shows that replacing the responses \(f(x+hu_i)\) by \(T(u_i)\) gives fitted value \(T(0)\).

By the smoothness condition, choose \(T\) so that, for \(|u|\leq A\),

$$ |f(x+hu)-T(u)|\leq C h^s $$

for a constant \(C\) independent of small \(h\). If \(\beta\leq p+1\), use the Taylor polynomial through degree \(\lfloor\beta\rfloor\) for noninteger \(\beta\), or through degree \(\beta-1\) for integer \(\beta\); its remainder is \(O(h^\beta)\). If \(\beta>p+1\), use the Taylor polynomial through degree \(p\); the bounded derivative of order \(p+1\) gives remainder \(O(h^{p+1})\). In either case its degree is at most \(p\) and \(s=\min(\beta,p+1)\).

Write \(\delta_i=f(x+hu_i)-T(u_i)\). The difference between the fitted intercept for the true means and \(T(0)\) is

$$ e_0^\mathsf{T}G^{-1}\sum_i q_i r_p(u_i)\delta_i. $$

Because the inverses of the design matrices are uniformly bounded as \(h\to0\), \(\|r_p(u_i)\|\) is bounded for \(|u_i|\leq A\), and \(\sum_iq_i=1\), the absolute value of this difference is at most a constant times \(\max_i|\delta_i|\), hence at most a constant times \(h^s\). The conditional mean-zero error assumption makes the conditional expectation of the fitted value equal to the fit to the means. Therefore its bias relative to \(f(x)=T(0)\) is \(O(h^s)\). \(\square\)

Worked Example: A Degree-Three Fit to a 5/2-Smooth Target

Take \(f(t)=|t|^{5/2}\), estimate at \(x=0\), and fit a cubic using equal weights at \(t=-2h,-h,0,h,2h\). This target has local smoothness \(\beta=5/2\) at zero. Since the fitted degree is \(p=3\), the bias bound has exponent \(\min(5/2,4)=5/2\).

Use the scaled locations \(u=-2,-1,0,1,2\). The responses divided by \(h^{5/2}\) are \(2^{5/2}=4\sqrt{2},1,0,1,4\sqrt{2}\). Symmetry of the design and responses, together with uniqueness of the least-squares fit, makes the odd coefficients of the fitted cubic zero. Write the fitted polynomial, after dividing its coefficients by \(h^{5/2}\), as \(a+cu^2\).

The normal equations for \(a,c\), using all five observations, are

$$ 5a+10c=2+8\sqrt{2},\qquad 10a+34c=2+32\sqrt{2}. $$

Multiply the first equation by \(2\) and subtract it from the second: \(14c=16\sqrt{2}-2\), so \(c=(8\sqrt{2}-1)/7\). Substitution into the first equation gives

$$ a=\frac{2+8\sqrt{2}-10(8\sqrt{2}-1)/7}{5} =\frac{24(1-\sqrt{2})}{35}. $$

The fitted value at zero is \(a h^{5/2}\), while \(f(0)=0\). Its bias is therefore \(24(1-\sqrt{2})h^{5/2}/35\), which is nonzero because \(\sqrt{2}\ne1\). This verifies that a cubic fit does not generally improve the bias order beyond the target’s \(5/2\)-order smoothness.

What the Order Does—and Does Not—Say

The expression \(h^{\min(\beta,p+1)}\) is an upper-order description under the stated conditions, not a promise that the leading bias coefficient is nonzero. In the cubic-target example, the degree-two fit has a nonzero \(h^3\) bias. But a symmetric design can cancel particular terms, and if \(f\) itself is a polynomial of degree at most \(p\), polynomial reproduction gives zero bias exactly.

The degree and the smoothness therefore answer different questions. Degree \(p\) sets the highest polynomial order reproduced exactly and contributes the \(p+1\) ceiling in the generic remainder bound. Smoothness \(\beta\) limits how small the approximation remainder can be, even when the fitted polynomial has higher degree. Neither one alone determines an exact bias constant.

Common Mistake

  • Wrong reasoning: “A cubic fit always has bias of order \(h^4\), because its degree is three.” This ignores the possibility that the target is less smooth than order four.
  • Correction: The bound is \(O(h^{\min(\beta,p+1)})\). For a cubic fit and a \(5/2\)-smooth target, the bound is \(O(h^{5/2})\), as the worked example demonstrates.
  • Another caution: An order bound does not assert that the bias is exactly that order. Polynomial reproduction or design symmetry may remove terms and make the bias smaller.
Key takeaway: A degree-\(p\) local polynomial reproduces polynomial targets through degree \(p\). With local smoothness \(\beta\), its approximation bias is bounded in order by \(h^{\min(\beta,p+1)}\), subject to local design stability; the bound need not be exact.

Check Your Understanding

Answer each question using the distinction between a bias-order bound and an exact bias.

  1. For a degree-two fit and a locally \(3/2\)-smooth target, what exponent does the bias-order bound give?
  2. Why does a degree-three fit reproduce a cubic target exactly at the target point under an invertible local design?
  3. For a degree-two fit to a target with four bounded continuous derivatives, what is the generic remainder exponent in the bias bound?
  4. Does a bound of \(O(h^3)\) imply that the bias is nonzero and proportional to \(h^3\)? Explain.
  5. In the degree-three example with \(f(t)=|t|^{5/2}\), which limits the bias order: the fitted degree or the target’s smoothness?
Clinical Biostats