Four observations are . What is the estimated density at using (a) a box kernel of width , that is for with , and (b) a Gaussian kernel with ?
Supervised learning, Parzen windows and kernel density estimation
Level L2 Elementary. Length Medium. Nature Mat Mathematical.
What's being asked
Whether you can apply with two different kernels.
Key idea
; for a box it is (points in window).
Steps
- Here and . Distances are .
- (a) Box with : a point counts if , that is . The points count and does not. Each contributes .
- . Check: 3 points in a window of width 4, out of 4 points, gives .
- (b) Gaussian with : . The values at are . Their sum is .
- .
- The two answers are close, but the Gaussian gives every point some weight, while the box ignores the point at 7 completely.
Common mistakes
- Forgetting the factor , or using with the wrong for the box (width is , not ).
- Using over in the Gaussian and then dropping the square. The kernel is with , so a distance of 4 gives , almost zero.
- Treating the density value as a probability. A density can exceed 1 when the scale is small.
How long your answer should be
Half a page; 4 minutes.
Last checked on 4 December 2026.
Read this
Previous in Supervised learning: A multinomial naive Bayes spam filter uses the vocabulary . Training: spam documents "win win cash" and "cash cash"; ham documents "meeting win" and "meeting meeting cash". Using Laplace (add-one) smoothing, classify the new document "win meeting meeting". Why is the smoothing needed?
Next in Supervised learning: For the four data points , set up and solve the normal equations for the line . What are the residual sum of squares and the unbiased noise-variance estimate ?