def test_cdf_rand(self): for _ in range(1000): x = uniform(-1e8, 1e8) self.assertAlmostEqual(norm.cdf(x), std_norm_cdf(x), places=10)
def test_cdf_three(self): self.assertAlmostEqual(norm.cdf(3), std_norm_cdf(3), places=10)
def test_cdf_half(self): self.assertAlmostEqual(0.5, std_norm_cdf(0), places=10)
def test_cdf_zero(self): self.assertAlmostEqual(norm.cdf(-1e8), std_norm_cdf(-1e8), places=10)
def test_cdf_positive_input(self): self.assertAlmostEqual(norm.cdf(1), std_norm_cdf(1), places=10)
def test_cdf_zero_input(self): self.assertAlmostEqual(norm.cdf(0), std_norm_cdf(0), places=10)