code: func BandwidthScott(data interface {
  	StdDev() float64
  	Weight() float64
  	Quantile(float64) float64
  }) float64 {
  	iqr := data.Quantile(0.75) - data.Quantile(0.25)
  	hScale := 1.06 * math.Pow(data.Weight(), -1.0/5)
  	stdDev := data.StdDev()
  	if stdDev < iqr/1.349 {
  		// Use Silverman's Rule of Thumb
  		return hScale * stdDev
  	} else {
  		// Use IQR/1.349 as a robust estimator of the standard
  		// deviation of a Gaussian distribution.
  		return hScale * (iqr / 1.349)
  	}
  }
docs: // BandwidthScott is a bandwidth estimator implementing Scott's Rule.
  // This is generally robust to outliers: it chooses the minimum
  // between the sample's standard deviation and an robust estimator of
  // a Gaussian distribution's standard deviation.
  //
  // Scott, D. W. (1992) Multivariate Density Estimation: Theory,
  // Practice, and Visualization.