Beispiel #1
0
 def test_mean_std_typical(self):
     mean, std = mean_std([5, 7, 8, 6])
     self.assertEqual(mean, 6.5)
     self.assertEqual(round(std, 5), 1.11803)
     mean, std = mean_std([5, 7, 8, 6], pop=False)
     self.assertEqual(mean, 6.5)
     self.assertEqual(round(std, 5), 1.29099)
Beispiel #2
0
 def test_mean_std_typical(self):
   mean, std = mean_std([5, 7, 8, 6])
   self.assertEqual(mean, 6.5)
   self.assertEqual(round(std, 5), 1.11803)
   mean, std = mean_std([5, 7, 8, 6], pop=False)
   self.assertEqual(mean, 6.5)
   self.assertEqual(round(std, 5), 1.29099)
Beispiel #3
0
 def test_mean_std_same(self):
     self.assertEqual(mean_std([2, 2, 2, 2]), (2, 0))
     self.assertEqual(mean_std([2, 2, 2, 2], pop=False), (8 / 3, 0))
Beispiel #4
0
 def test_mean_std_single(self):
     self.assertEqual(mean_std([1]), (1, 0))
Beispiel #5
0
 def test_mean_std_same(self):
   self.assertEqual(mean_std([2, 2, 2, 2]), (2, 0))
   self.assertEqual(mean_std([2, 2, 2, 2], pop=False), (8/3, 0))
Beispiel #6
0
 def test_mean_std_single(self):
   self.assertEqual(mean_std([1]), (1, 0))