6.5.6.2.4.1.4. statsmodels.sandbox.nonparametric.kernels.CustomKernel.density_var

CustomKernel.density_var(density, nobs)[source]

approximate pointwise variance for kernel density

not verified

Parameters:

density : array_lie

pdf of the kernel density

nobs : int

number of observations used in the KDE estimation

Returns:

kde_var : ndarray

estimated variance of the density estimate

Notes

This uses the asymptotic normal approximation to the distribution of the density estimate.