Esempio n. 1
0
m = list(range(4, 24))
m[10] = 34
b = N.array(m)

print('\n\nF_oneway:')
print(stats.F_oneway(l, m))
print(stats.F_oneway(a, b))
#print 'F_value:',stats.F_value(l),stats.F_value(a)

print('\nSUPPORT')
print('sum:', stats.sum(l), stats.sum(lf), stats.sum(a), stats.sum(af))
print('cumsum:')
print(stats.cumsum(l))
print(stats.cumsum(lf))
print(stats.cumsum(a))
print(stats.cumsum(af))
print('ss:', stats.ss(l), stats.ss(lf), stats.ss(a), stats.ss(af))
print('summult:', stats.summult(l, m), stats.summult(lf, m),
      stats.summult(a, b), stats.summult(af, b))
print('sumsquared:', stats.square_of_sums(l), stats.square_of_sums(lf),
      stats.square_of_sums(a), stats.square_of_sums(af))
print('sumdiffsquared:', stats.sumdiffsquared(l, m),
      stats.sumdiffsquared(lf, m), stats.sumdiffsquared(a, b),
      stats.sumdiffsquared(af, b))
print('shellsort:')
print(stats.shellsort(m))
print(stats.shellsort(b))
print('rankdata:')
print(stats.rankdata(m))
print(stats.rankdata(b))
a = N.array(l)
ll = [l]*5
aa = N.array(ll)

m = range(4,24)
m[10] = 34 
b = N.array(m)

print '\n\nF_oneway:'
print stats.F_oneway(l,m) 
print stats.F_oneway(a,b)
#print 'F_value:',stats.F_value(l),stats.F_value(a)

print '\nSUPPORT'
print 'sum:',stats.sum(l),stats.sum(lf),stats.sum(a),stats.sum(af)
print 'cumsum:'
print stats.cumsum(l)
print stats.cumsum(lf)
print stats.cumsum(a)
print stats.cumsum(af)
print 'ss:',stats.ss(l),stats.ss(lf),stats.ss(a),stats.ss(af)
print 'summult:',stats.summult(l,m),stats.summult(lf,m),stats.summult(a,b),stats.summult(af,b)
print 'sumsquared:',stats.square_of_sums(l),stats.square_of_sums(lf),stats.square_of_sums(a),stats.square_of_sums(af)
print 'sumdiffsquared:',stats.sumdiffsquared(l,m),stats.sumdiffsquared(lf,m),stats.sumdiffsquared(a,b),stats.sumdiffsquared(af,b)
print 'shellsort:'
print stats.shellsort(m)
print stats.shellsort(b)
print 'rankdata:'
print stats.rankdata(m)
print stats.rankdata(b)
Esempio n. 3
0
 def test_sumsquared(self):
     "Testing square_of_sums"
     
     data = [ self.L, self.LF, self.A, self.AF ]
     for d in data:
         self.assertEqual( stats.square_of_sums( d ), 44100.0 )
Esempio n. 4
0
    def test_sumsquared(self):
        "Testing square_of_sums"

        data = [self.L, self.LF, self.A, self.AF]
        for d in data:
            self.assertEqual(stats.square_of_sums(d), 44100.0)
Esempio n. 5
0
m = range(4, 24)
m[10] = 34
b = N.array(m)

print '\n\nF_oneway:'
print stats.F_oneway(l, m)
print stats.F_oneway(a, b)
#print 'F_value:',stats.F_value(l),stats.F_value(a)

print '\nSUPPORT'
print 'sum:', stats.sum(l), stats.sum(lf), stats.sum(a), stats.sum(af)
print 'cumsum:'
print stats.cumsum(l)
print stats.cumsum(lf)
print stats.cumsum(a)
print stats.cumsum(af)
print 'ss:', stats.ss(l), stats.ss(lf), stats.ss(a), stats.ss(af)
print 'summult:', stats.summult(l, m), stats.summult(lf, m), stats.summult(
    a, b), stats.summult(af, b)
print 'sumsquared:', stats.square_of_sums(l), stats.square_of_sums(
    lf), stats.square_of_sums(a), stats.square_of_sums(af)
print 'sumdiffsquared:', stats.sumdiffsquared(l, m), stats.sumdiffsquared(
    lf, m), stats.sumdiffsquared(a, b), stats.sumdiffsquared(af, b)
print 'shellsort:'
print stats.shellsort(m)
print stats.shellsort(b)
print 'rankdata:'
print stats.rankdata(m)
print stats.rankdata(b)