示例#1
0
 def test_trimboth(self):
     "Testing trimboth"
     
     data = [ self.L, self.LF, self.A, self.AF ]
     results = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
     i = 0 
     for d in data:
         self.assertEqual( stats.trimboth( d, .2 )[i], results[i])
         i += 1
示例#2
0
    def test_trimboth(self):
        "Testing trimboth"

        data = [self.L, self.LF, self.A, self.AF]
        results = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
        i = 0
        for d in data:
            self.assertEqual(stats.trimboth(d, .2)[i], results[i])
            i += 1
示例#3
0
print(stats.obrientransform(a, a, a, a, a))

print('samplevar:', stats.samplevar(l), stats.samplevar(a))
print('samplestdev:', stats.samplestdev(l), stats.samplestdev(a))
print('var:', stats.var(l), stats.var(a))
print('stdev:', stats.stdev(l), stats.stdev(a))
print('sterr:', stats.sterr(l), stats.sterr(a))
print('sem:', stats.sem(l), stats.sem(a))
print('z:', stats.z(l, 4), stats.z(a, 4))
print('zs:')
print(stats.zs(l))
print(stats.zs(a))

print('\nTRIMMING')
print('trimboth:')
print(stats.trimboth(l, .2))
print(stats.trimboth(lf, .2))
print(stats.trimboth(a, .2))
print(stats.trimboth(af, .2))
print('trim1:')
print(stats.trim1(l, .2))
print(stats.trim1(lf, .2))
print(stats.trim1(a, .2))
print(stats.trim1(af, .2))

print('\nCORRELATION')
#execfile('testpairedstats.py')

l = list(range(1, 21))
a = N.array(l)
ll = [l] * 5
print stats.obrientransform(a,a,a,a,a)

print 'samplevar:',stats.samplevar(l),stats.samplevar(a)
print 'samplestdev:',stats.samplestdev(l),stats.samplestdev(a)
print 'var:',stats.var(l),stats.var(a)
print 'stdev:',stats.stdev(l),stats.stdev(a)
print 'sterr:',stats.sterr(l),stats.sterr(a)
print 'sem:',stats.sem(l),stats.sem(a)
print 'z:',stats.z(l,4),stats.z(a,4)
print 'zs:'
print stats.zs(l)
print stats.zs(a)

print '\nTRIMMING'
print 'trimboth:'
print stats.trimboth(l,.2)
print stats.trimboth(lf,.2)
print stats.trimboth(a,.2)
print stats.trimboth(af,.2)
print 'trim1:'
print stats.trim1(l,.2)
print stats.trim1(lf,.2)
print stats.trim1(a,.2)
print stats.trim1(af,.2)

print '\nCORRELATION'
#execfile('testpairedstats.py')

l = range(1,21)
a = N.array(l)
ll = [l]*5
示例#5
0
print stats.obrientransform(a, a, a, a, a)

print 'samplevar:', stats.samplevar(l), stats.samplevar(a)
print 'samplestdev:', stats.samplestdev(l), stats.samplestdev(a)
print 'var:', stats.var(l), stats.var(a)
print 'stdev:', stats.stdev(l), stats.stdev(a)
print 'sterr:', stats.sterr(l), stats.sterr(a)
print 'sem:', stats.sem(l), stats.sem(a)
print 'z:', stats.z(l, 4), stats.z(a, 4)
print 'zs:'
print stats.zs(l)
print stats.zs(a)

print '\nTRIMMING'
print 'trimboth:'
print stats.trimboth(l, .2)
print stats.trimboth(lf, .2)
print stats.trimboth(a, .2)
print stats.trimboth(af, .2)
print 'trim1:'
print stats.trim1(l, .2)
print stats.trim1(lf, .2)
print stats.trim1(a, .2)
print stats.trim1(af, .2)

print '\nCORRELATION'
#execfile('testpairedstats.py')

l = range(1, 21)
a = N.array(l)
ll = [l] * 5