Example #1
0
 def testUniformParametric(self):
     bootstrap_data = bootstrap_sample(self.uniform_data,
                                       parametric='uniform')
     self.assertAlmostEqual(
         np.mean(self.uniform_data) / 10000,
         np.mean(bootstrap_data) / 10000, 3)
     self.assertEqual(len(bootstrap_data), len(self.uniform_data))
Example #2
0
 def testPoissonParametric(self):
     bootstrap_data = bootstrap_sample(self.poisson_data,
                                       parametric='poisson')
     self.assertAlmostEqual(
         np.mean(self.poisson_data) / 10000,
         np.mean(bootstrap_data) / 10000, 3)
     self.assertEqual(len(bootstrap_data), len(self.poisson_data))
Example #3
0
 def testNormalParametric(self):
     bootstrap_data = bootstrap_sample(self.normal_data,
                                       parametric='normal')
     self.assertAlmostEqual(
         np.mean(self.normal_data) / 10000,
         np.mean(bootstrap_data) / 10000, 3)
     self.assertEqual(len(bootstrap_data), len(self.normal_data))