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); }
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); }
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); }
public dynamic Difference(dynamic a, dynamic b) { solution = Subtraction.Difference(a, b); return(solution); }
public dynamic Difference(dynamic a, dynamic b) { result = Subtraction.Difference(a, b); return(result); }
public void SumDoubleArrayTest() { Assert.AreEqual(-41.28, Subtraction.Difference(arrayA)); }
public void SubDoubleArrayTest() { double a = Subtraction.Difference(arrayA); Assert.AreEqual(-8.16, a); }
public void DifferenceDoubleArrayTest() { Assert.AreEqual(-20.65, Subtraction.Difference(e)); }
public void DifferenceDoubleTest() { Assert.AreEqual(3.5, Subtraction.Difference(c, d)); }
public void DifferenceTest() { Assert.AreEqual(3, Subtraction.Difference(a, b)); }
public dynamic Subtract(dynamic minuend, dynamic subtrahend) { return(Subtraction.Difference(minuend, subtrahend)); }
public void DifferenceTest() { Assert.AreEqual(1, Subtraction.Difference(4, 3)); }
public void DifferenceIntArrayTest() { Assert.AreEqual(15, Subtraction.Difference(arrayB)); }
public void SubDoubleTest() { double a = Subtraction.Difference(d, c); Assert.AreEqual(10.01, a); }
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); }
public void DifferenceTest() { int c = Subtraction.Difference(random.GenerateRandomNumber(min, max), random1.GenerateRandomNumber(min, max)); Assert.AreEqual(0, c); }
public void DifferenceDoubleArrayTest() { Assert.AreEqual(-8.16, Subtraction.Difference(arrayA)); }