code: func Variance(xs []float64) float64 {
  	if len(xs) == 0 {
  		return math.NaN()
  	} else if len(xs) <= 1 {
  		return 0
  	}
  
  	// Based on Wikipedia's presentation of Welford 1962
  	// (http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Online_algorithm).
  	// This is more numerically stable than the standard two-pass
  	// formula and not prone to massive cancellation.
  	mean, M2 := 0.0, 0.0
  	for n, x := range xs {
  		delta := x - mean
  		mean += delta / float64(n+1)
  		M2 += delta * (x - mean)
  	}
  	return M2 / float64(len(xs)-1)
  }
docs: // Variance returns the sample variance of xs.