Ask Your Question

Revision history [back]

This is not straightforward in Sage (for now)

sage: A = [1, 3, 2, 5]
sage: B = [2, 2, 1, 3]
sage: Ar = r(A)
sage: Br = r(B)
sage: print r.eval('t.test(%s, %s)' %(Ar._name, Br._name))

        Welch Two Sample t-test

data:  sage4 and sage9
t = 0.79241, df = 4.3033, p-value = 0.4695
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -1.806398  3.306398
sample estimates:
mean of x mean of y 
     2.75      2.00