For a kernel density estimate in one dimension, derive the leading terms of its bias and variance at a point . Hence what is the bandwidth that minimises the asymptotic mean squared error, and at what rate does the error shrink with ?
Supervised learning, Parzen windows and kernel density estimation
Level L4 Advanced. Length Long. Nature Mat Mathematical.
What's being asked
Whether you can use a Taylor expansion for the bias and see the bias–variance trade-off that fixes .
Key idea
and , so AMSE is minimised at and decays as .
Steps
- Assume is a symmetric density with and . The are i.i.d. with density .
- Mean: (substituting ).
- Taylor expand . The middle term vanishes by symmetry, so the bias is .
- Variance: is an average of independent terms, so .
- Add: . The first term grows with , the second shrinks.
- Differentiate and set to zero: , so .
- At this both terms are of order , so AMSE . This is slower than the parametric rate : this is the price of not assuming a model.
- Example: for a density at with a Gaussian kernel (, , , ) and , .
Common mistakes
- Saying variance is times a constant. It is , so a smaller increases variance.
- Expecting a symmetric kernel to bias the estimate to first order in . The term cancels, and bias is order .
- Using the optimal without noting that it depends on the unknown (so in practice we use a rule of thumb or cross-validation).
How long your answer should be
One page; 10 minutes.
Last checked on 4 December 2026.
Read this
Previous in Supervised learning: Why is gradient boosting called gradient descent in function space, what are the pseudo-residuals for squared, absolute and logistic loss, and what is the full algorithm with regression trees as base learners?
Next in Supervised learning: Show that, as , the error rate of the 1-nearest-neighbour classifier for two classes is at most , where is the Bayes error. What does it say numerically for ?