def unknownPopulationStdev(seed, data, percent): ZScore = Zsc.zsc(seed, data) MarOfError = MarginOfError.marginOfError(seed, data) p = percent q = Subtraction.difference(1, p) pq = Division.division(ZScore, MarOfError) samplePopulation = Exponential.exponential(pq, 2) * p * q return samplePopulation
def unknownPopStdDev(seed, data, percent): z_score = Z_score.z_score(seed, data) marginError = MarginOfError.marginOfError(seed, data) x = percent y = Subtraction.difference(1, x) xy = Division.quotient(z_score, marginError) sample = Exponent.power(xy, 2) * x * y return sample
def zscore(sd, data): X = PickSeedList.pickSeed(sd, data) meanData = Mean.Mean(data) sd = StandardDeviation.standardDeviation(data) z = Division.divide(X - meanData, sd) return z
def test_MathOperations_division(self): self.assertEqual(3, Division.fraction(9, 3))
def test_MathOperations_divide_list(self): dividend = 16 divisor = 2 result = Division.divide(dividend, divisor) self.assertEqual(8, result)
def test_calculator_divide(self): self.assertEqual(2, Division.quotient(6,3))
def test_MathOperations_division(self): self.assertEqual(2, Division.division(4, 2))
def Division(self, a, b): self.Result = Division.division(a, b) return self.Result
def test_MathOperations_division(self): self.assertEqual(2, Division.quotient(10, 5))
def Divide(self, a, b): self.Result = Division.quotient(a, b) return self.Result
def test_MathOperations_division(self): self.assertEqual(3, Division.quotient(6, 2))
def Divide(self, a, b): self.Result = Division.divide(a, b) return a / b
def test_MathOperations_Division(self): self.assertEqual(2, Division.quotient(4, 2))
def test_MathOperations_Division(self): self.assertEqual(5, Division.division(35, 7))
def Fraction(self, a, b): self.Result = Division.fraction(a, b) return self.Result
def modeskewness(data): n = (Subtraction.difference(Mean.mean(data), Mode.mode(data))) nn = Division.division(n, Stddev.stddev(data)) return nn
def medianskewness(data): ni = (Subtraction.difference(Mean.mean(data), Median.median(data))) nii = Division.division(ni, Stddev.stddev(data)) return nii
def Quotient(a, b): return Division.quotient(a, b)
def Mean(data): num_values = len(data) total = 0 for num in data: total = Addition.addition(total, num) return Division.divide(total, num_values)
def test_MathOperations_division(self): Division.quotient(1, 2) self.assertEqual(0.5, Division.quotient(1, 2))
def Mean(data): num_values = len(data) total = 0 for num in data: total = Addition.sum(total, num) return Division.fraction(total, num_values)
def test_MathOperations_Quotient(self): self.assertEqual(2, Division.quotient(6, 3))