Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 def populationPorportion(seeds, nums, data):
     p = RandPick.randPickListSeed(seeds, nums, data)
     pp = len(p) / len(data)
     return pp
    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))