Kernelwidth

Definition:

w = kernelwidth( vX ) returns the estimated optimal kernel bandwidth for a given vector vX.

w = 0.9 \sigma n^{-\frac{1}{5}}

where n is the size of vector vX, and

 \sigma = \min( \hat{\sigma}, \ IQR/1.349 )

, \hat{\sigma} is the standard deviation of vX, and IQR is the interquartile range of vX.

Parameters:

vX (input, vector)
Distributed samples used to estimate bandwidth
w (output, double)
Estimated optimal bandwidth for kernel density, w > 0

Reference

Silverman, B.W. (1986). Density Estimation for Statistics and Data Analysis. Chapman & Hall, London.