Ejemplo n.º 1
0
 def testVariationInBothDeme(self):
     counts = [{1: 5, 2: 3, 3: 2}, {1: 5, 2: 3, 3: 2}]
     denom = 90
     self.assertAlmostEqual(st.measure_variation_within(self.dist, counts, denom), 6.444444444444445)
Ejemplo n.º 2
0
 def testNoVariationInBothDemes2(self):
     counts = [{1: 10}, {2: 10}]
     denom = 90
     self.assertAlmostEqual(st.measure_variation_within(self.dist, counts, denom), 0.0)
Ejemplo n.º 3
0
 def testNoVariationInOneDeme(self):
     counts = [{1: 5, 2: 3, 3: 2}, {1: 0, 2: 0, 3: 15}]
     denom = 9 * 5 + 15 * 7
     self.assertAlmostEqual(st.measure_variation_within(self.dist, counts, denom), 1.9333333333333333)