[Scipy-svn] r5598 - trunk/scipy/stats/tests
scipy-svn at scipy.org
scipy-svn at scipy.org
Thu Feb 26 14:01:16 EST 2009
Author: josef
Date: 2009-02-26 13:01:09 -0600 (Thu, 26 Feb 2009)
New Revision: 5598
Modified:
trunk/scipy/stats/tests/test_stats.py
Log:
add test for stats.pointbiserial
Modified: trunk/scipy/stats/tests/test_stats.py
===================================================================
--- trunk/scipy/stats/tests/test_stats.py 2009-02-25 05:40:47 UTC (rev 5597)
+++ trunk/scipy/stats/tests/test_stats.py 2009-02-26 19:01:09 UTC (rev 5598)
@@ -1259,6 +1259,16 @@
yield assert_array_almost_equal, stats.skewtest(x), (st_skew, pv_skew)
yield assert_array_almost_equal, stats.kurtosistest(x), (st_kurt, pv_kurt)
+def test_pointbiserial():
+ # copied from mstats tests removing nans
+ x = [1,0,1,1,1,1,0,1,0,0,0,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,1,0,
+ 0,0,0,0,1]
+ y = [14.8,13.8,12.4,10.1,7.1,6.1,5.8,4.6,4.3,3.5,3.3,3.2,3.0,
+ 2.8,2.8,2.5,2.4,2.3,2.1,1.7,1.7,1.5,1.3,1.3,1.2,1.2,1.1,
+ 0.8,0.7,0.6,0.5,0.2,0.2,0.1]
+ assert_almost_equal(stats.pointbiserialr(x, y)[0], 0.36149, 5)
+
+
def test_obrientransform():
#this is a regression test to check np.var replacement
#I didn't separately verigy the numbers
More information about the Scipy-svn
mailing list