What is the effect of choosing a bandwidth that is too small or too large in kernel density estimation?

Quick Overview

Asks what happens to a kernel density estimate when the bandwidth is too small or too large. Tests the bias-variance trade-off behind smoothing, its effect on modes, tails and anomaly detection, and how bandwidth should be chosen as sample size and dimension change.

What is the effect of choosing a bandwidth that is too small or too large in kernel density estimation?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

What is the effect of choosing a bandwidth that is too small or too large in kernel density estimation? Describe what each estimate looks like and what it does to tasks built on top of it, such as anomaly detection. ```hint Think in bias and variance Picture each training point getting its own bump of width h. Ask what the sum of bumps looks like as h shrinks toward zero and as it grows very large. ``` ### What a Strong Answer Covers - What an undersmoothed estimate looks like and why it overfits - What an oversmoothed estimate looks like and which real structure it hides - How bias and variance depend on the bandwidth, the sample size and the dimension - How the bandwidth is chosen in practice, including when features are on different scales ### Follow-up Questions - Why does maximizing the training log-likelihood fail as a way to choose the bandwidth, and what works instead? - When does a rule-of-thumb bandwidth such as Silverman's go wrong? - How would you handle a density that is sharp in one region and flat in another? - Why does kernel density estimation get harder as the number of dimensions grows?

Overview: Asks what happens to a kernel density estimate when the bandwidth is too small or too large. Tests the bias-variance trade-off behind smoothing, its effect on modes, tails and anomaly detection, and how bandwidth should be chosen as sample size and dimension change.

General logo
General
Nov 24, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

What is the effect of choosing a bandwidth that is too small or too large in kernel density estimation? Describe what each estimate looks like and what it does to tasks built on top of it, such as anomaly detection.

What a Strong Answer Covers Guidance

  • What an undersmoothed estimate looks like and why it overfits
  • What an oversmoothed estimate looks like and which real structure it hides
  • How bias and variance depend on the bandwidth, the sample size and the dimension
  • How the bandwidth is chosen in practice, including when features are on different scales

Follow-up Questions Guidance

  • Why does maximizing the training log-likelihood fail as a way to choose the bandwidth, and what works instead?
  • When does a rule-of-thumb bandwidth such as Silverman's go wrong?
  • How would you handle a density that is sharp in one region and flat in another?
  • Why does kernel density estimation get harder as the number of dimensions grows?