def test_summult(self): "Testing summult" data1 = [ self.L, self.LF, self.A, self.AF ] data2 = [ self.M, self.M, self.B, self.B ] i = 0 for d in data1: self.assertEqual( stats.summult( d, data2[i] ), 3720.0 ) i += 1
def test_summult(self): "Testing summult" data1 = [self.L, self.LF, self.A, self.AF] data2 = [self.M, self.M, self.B, self.B] i = 0 for d in data1: self.assertEqual(stats.summult(d, data2[i]), 3720.0) i += 1
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)
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)