Kernel Density Estimation: Different Results for All Data Points vs. Within Bandwidth
I’m working on kernel density estimation (KDE) using python for road accidents data, but here I will use 1d data just for illustration. When fitting the KDE model, I’ve noticed that I get different results when considering all data points versus restricting to those within the bandwidth. Specifically,when using only points within the bandwidth I get almost the same values of density both in areas with few points and areas with many point which to me seems counterintuitive. I don’t know how to interpret this or if it is some code problem.