コード例 #1
0
ファイル: test_morestats.py プロジェクト: BackupGGCode/pywafo
 def test_trimmed1(self):
     # Test that center='trimmed' gives the same result as center='mean'
     # when proportiontocut=0.
     Xsq1, pval1 = stats.fligner(g1, g2, g3, center='mean')
     Xsq2, pval2 = stats.fligner(g1, g2, g3, center='trimmed', proportiontocut=0.0)
     assert_almost_equal(Xsq1, Xsq2)
     assert_almost_equal(pval1, pval2)
コード例 #2
0
ファイル: test_morestats.py プロジェクト: BackupGGCode/pywafo
 def test_trimmed2(self):
     x = [1.2, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 100.0]
     y = [0.0, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 200.0]
     # Use center='trimmed'
     Xsq1, pval1 = stats.fligner(x, y, center='trimmed', proportiontocut=0.125)
     # Trim the data here, and use center='mean'
     Xsq2, pval2 = stats.fligner(x[1:-1], y[1:-1], center='mean')
     # Result should be the same.
     assert_almost_equal(Xsq1, Xsq2)
     assert_almost_equal(pval1, pval2)
コード例 #3
0
 def test_trimmed1(self):
     # Test that center='trimmed' gives the same result as center='mean'
     # when proportiontocut=0.
     Xsq1, pval1 = stats.fligner(g1, g2, g3, center='mean')
     Xsq2, pval2 = stats.fligner(g1,
                                 g2,
                                 g3,
                                 center='trimmed',
                                 proportiontocut=0.0)
     assert_almost_equal(Xsq1, Xsq2)
     assert_almost_equal(pval1, pval2)
コード例 #4
0
 def test_trimmed2(self):
     x = [1.2, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 100.0]
     y = [0.0, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 200.0]
     # Use center='trimmed'
     Xsq1, pval1 = stats.fligner(x,
                                 y,
                                 center='trimmed',
                                 proportiontocut=0.125)
     # Trim the data here, and use center='mean'
     Xsq2, pval2 = stats.fligner(x[1:-1], y[1:-1], center='mean')
     # Result should be the same.
     assert_almost_equal(Xsq1, Xsq2)
     assert_almost_equal(pval1, pval2)
コード例 #5
0
ファイル: test_morestats.py プロジェクト: BackupGGCode/pywafo
 def test_data(self):
     # numbers from R: fligner.test in package stats
     x1 = np.arange(5)
     assert_array_almost_equal(stats.fligner(x1,x1**2),
                        (3.2282229927203536, 0.072379187848207877), 11)
コード例 #6
0
 def test_data(self):
     # numbers from R: fligner.test in package stats
     x1 = np.arange(5)
     assert_array_almost_equal(stats.fligner(x1, x1**2),
                               (3.2282229927203536, 0.072379187848207877),
                               11)