public static Vector4 Variance(this IArray <Vector4> self) { var mean = self.Average(); return(self.Select(x => MathOps.Sqr(x - mean)).Average()); }
public static Vector3 Variance(this IArray <Vector3> self) { var mean = self.Average(); return(self.Select(x => (x - mean).Sqr()).Average()); }
public static double Variance(this IArray <float> self) { var mean = self.Average(); return(self.Select(x => MathOps.Sqr(x - mean)).Average()); }
public static double Variance(this IArray <double> self) { var mean = self.Average(); return(self.Select(x => (x - mean).Sqr()).Average()); }