Exemplo n.º 1
0
        public static double ZScore(dynamic score, dynamic values)
        {
            double mean     = StatMean.Mean(values);
            double standDev = StatStandardDev.StandDev(values);
            double zScore   = Division.Quotient(Subtraction.Difference(score, mean), standDev);

            return(zScore);
        }
Exemplo n.º 2
0
        public static double Variance(dynamic values)
        {
            double mean = StatMean.Mean(values);

            double[] squaredDeviation = new double[Helpers.Array.Length(values)];;
            int      i = 0;

            foreach (int a in values)
            {
                squaredDeviation[i] = Sq.Squared(Subtraction.Difference(a, mean));
                i++;
            }
            double variance = StatMean.Mean(squaredDeviation);

            return(variance);
        }
Exemplo n.º 3
0
        public static dynamic Variance(dynamic arrayA)
        {
            dynamic theMean      = MeanAvg.Mean_Average(arrayA);
            dynamic arrayCount_1 = Helpers.ArrayHelper.arrayLength(arrayA) - 1;

            dynamic squares     = new Array[0];
            dynamic squareSum   = 0.0;
            dynamic differences = 0.0;


            foreach (dynamic a in arrayA)
            {
                differences = Subtraction.Difference(a, theMean);
                squares     = Square.Squared(differences);
                squareSum   = (squareSum + squares);

                Debug.WriteLine("This is the issue");
            }

            result = Division.Quotient(squareSum, arrayCount_1);
            return(result);
        }
        public void SubIntTest()
        {
            int c = Subtraction.Difference(b, a);

            Assert.AreEqual(10, c);
        }
Exemplo n.º 5
0
 public dynamic Difference(dynamic a, dynamic b)
 {
     solution = Subtraction.Difference(a, b);
     return(solution);
 }
Exemplo n.º 6
0
 public dynamic Difference(dynamic a, dynamic b)
 {
     result = Subtraction.Difference(a, b);
     return(result);
 }
Exemplo n.º 7
0
 public void SumDoubleArrayTest()
 {
     Assert.AreEqual(-41.28, Subtraction.Difference(arrayA));
 }
        public void SubDoubleArrayTest()
        {
            double a = Subtraction.Difference(arrayA);

            Assert.AreEqual(-8.16, a);
        }
Exemplo n.º 9
0
 public void DifferenceDoubleArrayTest()
 {
     Assert.AreEqual(-20.65, Subtraction.Difference(e));
 }
Exemplo n.º 10
0
 public void DifferenceDoubleTest()
 {
     Assert.AreEqual(3.5, Subtraction.Difference(c, d));
 }
Exemplo n.º 11
0
 public void DifferenceTest()
 {
     Assert.AreEqual(3, Subtraction.Difference(a, b));
 }
Exemplo n.º 12
0
 public dynamic Subtract(dynamic minuend, dynamic subtrahend)
 {
     return(Subtraction.Difference(minuend, subtrahend));
 }
Exemplo n.º 13
0
 public void DifferenceTest()
 {
     Assert.AreEqual(1, Subtraction.Difference(4, 3));
 }
Exemplo n.º 14
0
 public void DifferenceIntArrayTest()
 {
     Assert.AreEqual(15, Subtraction.Difference(arrayB));
 }
        public void SubDoubleTest()
        {
            double a = Subtraction.Difference(d, c);

            Assert.AreEqual(10.01, a);
        }
Exemplo n.º 16
0
 public void DifferenceIntArrayTest()
 {
     Assert.AreEqual(-39, Subtraction.Difference(f));
 }
        public void SubIntArrayTest()
        {
            int c = Subtraction.Difference(arrayB);

            Assert.AreEqual(-13, c);
        }
 public dynamic Sub(dynamic a)
 {
     result = Subtraction.Difference(a);
     return(result);
 }
Exemplo n.º 19
0
        public void DifferenceTest()
        {
            int c = Subtraction.Difference(random.GenerateRandomNumber(min, max), random1.GenerateRandomNumber(min, max));

            Assert.AreEqual(0, c);
        }
Exemplo n.º 20
0
 public void DifferenceDoubleArrayTest()
 {
     Assert.AreEqual(-8.16, Subtraction.Difference(arrayA));
 }