def test_chi_random(self): vec = [randrange(100) for _ in range(10)] exp = sum(vec) / len(vec) self.assertAlmostEqual(chisquare(vec)[0], sr._chi_test(vec, exp))
def test_chi(self): vec = [1, 2, 5, 10, 2, 10, 25, 32] exp = sum(vec) / len(vec) self.assertAlmostEqual(chisquare(vec)[0], sr._chi_test(vec, exp))