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))
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))
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))