def test_randPickListSeed(self): temp = RandPick.randPickListSeed(5, 1, self.test) temp2 = RandPick.randPickListSeed(5, 1, self.test) x = None if temp == temp2: x = True self.assertEqual(True, x)
def test_randPickSeed(self): result = RandPick.randPickSeed(4, self.test) result2 = RandPick.randPickSeed(2, self.test) x = None if result in self.test and type(result) == int: if result == result2: x = True self.assertEqual(True, x)
def test_randPickList(self): temp = RandPick.randPickList(4, self.test) x = None if len(temp) == 4: for item in temp: if item in self.test and type(item) == int: x = True self.assertEqual(True, x)
def populationPorportion(seeds, nums, data): p = RandPick.randPickListSeed(seeds, nums, data) pp = len(p) / len(data) return pp
def test_randPick(self): result = RandPick.randPick(self.test) x = None if result in self.test and type(result) == int: x = True self.assertEqual(True, x)
def zsc(seed, data): X = RandPick.randPickSeed(seed, data) mean = Mean.mean(data) stddev = Stddev.stddev(data) return (X - mean) / stddev
def samplecorrelation(seed, sample_size, data1, data2): dataA = RandPick.randPickListSeed(seed, sample_size, data1) dataB = RandPick.randPickListSeed(seed, sample_size, data2) return Covariance.covariance(dataA, dataB) / (Stddev.stddev(dataA) * Stddev.stddev(dataB))