T-test using R¶
- sage.stats.r.ttest(x, y, conf_level=0.95, **kw)[source]¶
T-Test using R.
INPUT:
x
,y
– vectors of same lengthconf_level
– confidence level of the interval, [0,1) in percent
OUTPUT:
Tuple: (p-value, R return object)
EXAMPLES:
sage: a, b = ttest([1,2,3,4,5],[1,2,3,3.5,5.121]); a # abs tol 1e-12 # optional - rpy2 0.9410263720274274
>>> from sage.all import * >>> a, b = ttest([Integer(1),Integer(2),Integer(3),Integer(4),Integer(5)],[Integer(1),Integer(2),Integer(3),RealNumber('3.5'),RealNumber('5.121')]); a # abs tol 1e-12 # optional - rpy2 0.9410263720274274