Example #1
0
 def test_normal(self):
     rs = RandomState(1234567890)
     x1 = rs.standard_exponential(size=50)
     x2 = rs.standard_normal(size=50)
     A, crit, sig = stats.anderson(x1)
     assert_array_less(crit[:-1], A)
     A, crit, sig = stats.anderson(x2)
     assert_array_less(A, crit[-2:])
Example #2
0
 def test_normal(self):
     rs = RandomState(1234567890)
     x1 = rs.standard_exponential(size=50)
     x2 = rs.standard_normal(size=50)
     A,crit,sig = stats.anderson(x1)
     assert_array_less(crit[:-1], A)
     A,crit,sig = stats.anderson(x2)
     assert_array_less(A, crit[-2:])
Example #3
0
 def check_expon(self):
     rs = RandomState(1234567890)
     x1 = rs.standard_exponential(size=50)
     x2 = rs.standard_normal(size=50)
     A,crit,sig = scipy.stats.anderson(x1,'expon')
     assert_array_less(A, crit[-2:])
     A,crit,sig = scipy.stats.anderson(x2,'expon')
     assert_array_less(crit[:-1], A)
Example #4
0
 def test_expon(self):
     rs = RandomState(1234567890)
     x1 = rs.standard_exponential(size=50)
     x2 = rs.standard_normal(size=50)
     A, crit, sig = stats.anderson(x1, 'expon')
     assert_array_less(A, crit[-2:])
     olderr = np.seterr(all='ignore')
     try:
         A, crit, sig = stats.anderson(x2, 'expon')
     finally:
         np.seterr(**olderr)
     assert_(A > crit[-1])
Example #5
0
 def test_expon(self):
     rs = RandomState(1234567890)
     x1 = rs.standard_exponential(size=50)
     x2 = rs.standard_normal(size=50)
     A,crit,sig = stats.anderson(x1,'expon')
     assert_array_less(A, crit[-2:])
     olderr = np.seterr(all='ignore')
     try:
         A,crit,sig = stats.anderson(x2,'expon')
     finally:
         np.seterr(**olderr)
     assert_(A > crit[-1])
Example #6
0
 def test_result_attributes(self):
     rs = RandomState(1234567890)
     x = rs.standard_exponential(size=50)
     res = stats.anderson(x)
     attributes = ('statistic', 'critical_values', 'significance_level')
     check_named_results(res, attributes)
Example #7
0
 def test_result_attributes(self):
     rs = RandomState(1234567890)
     x = rs.standard_exponential(size=50)
     res = stats.anderson(x)
     attributes = ('statistic', 'critical_values', 'significance_level')
     check_named_results(res, attributes)