public void VarianceDoubleTest() { double[] values = { 2.0, 3.0, 4.0 }; var variance = StatsVariance.Variance(values); Assert.AreEqual(0.66667, Helpers.Rounding.RoundFiveDecimals(variance)); }
public void VarianceIntTest() { int[] values = { 1, 2, 3 }; var variance = StatsVariance.Variance(values); Assert.AreEqual(2, Helpers.Rounding.RoundTwoDecimals(variance)); }
public void VarianceTest() { int[] values = { 2, 4, 6, 8 }; var variance = StatsVariance.Variance(values); Assert.AreEqual(5, Helpers.Rounding.RoundFiveDecimals(variance)); }
public double Variance(dynamic arrayA) { result = StatsVariance.Variance(arrayA); return(result); }