Kernel Density Estimation and Distribution Testing (KDE)
Also known as: kernel density estimate, KDE, Parzen window estimation, nonparametric density estimation, Çekirdek Yoğunluk Tahmini ve Testi (KDE)
Kernel Density Estimation is a nonparametric method that estimates a continuous probability density by placing a smooth kernel function over each observation, without assuming any parametric distribution. It traces back to Rosenblatt (1956) and the textbook treatment by Silverman (1986), and it also supports distribution-comparison tests built on the estimated densities.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use KDE when you have continuous data and want to visualise or compare distribution shapes without committing to a parametric model such as the normal. It works best with a reasonable sample size (at least about 30 observations) so the estimate is stable. The main assumption is that the data are continuous, and the choice of bandwidth materially affects the result, so an automatic rule such as Silverman or cross-validation is recommended. It is poorly suited to very small samples, where the estimate becomes overly sensitive to the bandwidth.
Strengths & limitations
- Makes no parametric distribution assumption, so it reveals shape features such as skewness, multimodality, and heavy tails.
- Produces a smooth, continuous density estimate, avoiding the bin-edge artefacts of a histogram.
- Supports distribution comparison directly from the estimated densities.
- The result depends heavily on the bandwidth, which must be chosen carefully (Silverman or cross-validation).
- In small samples (n < 20) the estimate is highly sensitive to the bandwidth, and a histogram is often enough.
- With very few observations (n < 10) the estimate becomes meaningless; simple descriptive statistics are preferable.
Frequently asked
How is KDE different from a histogram?
A histogram counts observations into fixed bins, producing a step function whose appearance depends on bin edges and widths. KDE instead places a smooth kernel on each observation and sums them, giving a continuous curve free of bin-edge artefacts, though it still depends on the bandwidth.
What is the bandwidth and how do I choose it?
The bandwidth h sets how wide each kernel bump is and therefore how smooth the estimate is. Too small a bandwidth produces a spiky, noisy curve; too large oversmooths and hides real features. Silverman's rule gives a quick automatic choice, while Sheather-Jones and cross-validation adapt more closely to the data.
Does KDE require the data to be normal?
No. KDE is nonparametric and makes no parametric distribution assumption. It only requires the data to be continuous, which is exactly why it is useful for revealing non-normal shapes such as skewness or multimodality.
How much data do I need?
Aim for at least about 30 observations for a stable estimate. Below 20 the curve is dominated by the bandwidth choice and a histogram is usually enough; below 10 KDE is unreliable and simple descriptive statistics are better.
Sources
- Rosenblatt, M. (1956). Remarks on Some Nonparametric Estimates of a Density Function. Annals of Mathematical Statistics, 27(3), 832-837. DOI: 10.1214/aoms/1177728190 ↗
- Silverman, B. W. (1986). Density Estimation for Statistics and Data Analysis. Chapman & Hall / CRC Press. ISBN: 978-0412246203
How to cite this page
ScholarGate. (2026, June 1). Kernel Density Estimation and Distribution Testing (KDE). ScholarGate. https://scholargate.app/en/statistics/kernel-density-test
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Anderson-Darling TestStatistics↔ compare
- Lilliefors TestStatistics↔ compare
- Mood's Median TestStatistics↔ compare
- Quantile RegressionEconometrics↔ compare