Пример #1
0
        public void VarianceTest2()
        {
            int[] values   = { 17, 15, 23, 7, 9, 13 };
            var   variance = StatVariance.Variance(values);

            Assert.AreEqual(27.67, Helpers.Rounding.RoundToTwo(variance));
        }
Пример #2
0
        public void VarianceIntTest()
        {
            int[] values   = { 1, 2, 3, 4, 5 };
            var   variance = StatVariance.Variance(values);

            Assert.AreEqual(2, Helpers.Rounding.RoundToFive(variance));
        }
        public void VarianceDoubleTest()
        {
            double[] values   = { 2.0, 3.0, 4.0 };
            var      variance = StatVariance.Variance(values);

            Assert.AreEqual(0.66667, Helpers.Rounding.RoundFiveDecimals(variance));
        }
        public void VarianceTest()
        {
            int[] values   = { 2, 4, 6, 8 };
            var   variance = StatVariance.Variance(values);

            Assert.AreEqual(5, Helpers.Rounding.RoundFiveDecimals(variance));
        }
Пример #5
0
 public double Variance(dynamic arrayA)
 {
     result = StatVariance.Variance(arrayA);
     return(result);
 }
Пример #6
0
 public dynamic Variance(dynamic values)
 {
     solution = StatVariance.Variance(values);
     return(solution);
 }
Пример #7
0
        public void VarianceDoubleTest()
        {
            var finalVariance = StatVariance.Variance(arrayB);

            Assert.AreEqual(1.13, Helpers.Rounding.RoundOffTwoPlaces(finalVariance));
        }
Пример #8
0
        public void Variance_Test()
        {
            var finalVariance = StatVariance.Variance(arrayA);

            Assert.AreEqual(5.67, Helpers.Rounding.RoundOffTwoPlaces(finalVariance));
        }