Esempio n. 1
0
print('\nCENTRAL TENDENCY')
print('geometricmean:', stats.geometricmean(l), stats.geometricmean(lf),
      stats.geometricmean(a), stats.geometricmean(af))
print('harmonicmean:', stats.harmonicmean(l), stats.harmonicmean(lf),
      stats.harmonicmean(a), stats.harmonicmean(af))
print('mean:', stats.mean(l), stats.mean(lf), stats.mean(a), stats.mean(af))
print('median:', stats.median(l), stats.median(lf), stats.median(a),
      stats.median(af))
print('medianscore:', stats.medianscore(l), stats.medianscore(lf),
      stats.medianscore(a), stats.medianscore(af))
print('mode:', stats.mode(l), stats.mode(a))

print('\nMOMENTS')
print('moment:', stats.moment(l), stats.moment(lf), stats.moment(a),
      stats.moment(af))
print('variation:', stats.variation(l), stats.variation(a),
      stats.variation(lf), stats.variation(af))
print('skew:', stats.skew(l), stats.skew(lf), stats.skew(a), stats.skew(af))
print('kurtosis:', stats.kurtosis(l), stats.kurtosis(lf), stats.kurtosis(a),
      stats.kurtosis(af))
print('tmean:', stats.tmean(a, (5, 17)), stats.tmean(af, (5, 17)))
print('tvar:', stats.tvar(a, (5, 17)), stats.tvar(af, (5, 17)))
print('tstdev:', stats.tstdev(a, (5, 17)), stats.tstdev(af, (5, 17)))
print('tsem:', stats.tsem(a, (5, 17)), stats.tsem(af, (5, 17)))
print('describe:')
print(stats.describe(l))
print(stats.describe(lf))
print(stats.describe(a))
print(stats.describe(af))

print('\nFREQUENCY')
a = N.array(l)
af = N.array(lf)
ll = [l]*5
aa = N.array(ll)

print '\nCENTRAL TENDENCY'
print 'geometricmean:',stats.geometricmean(l), stats.geometricmean(lf), stats.geometricmean(a), stats.geometricmean(af)
print 'harmonicmean:',stats.harmonicmean(l), stats.harmonicmean(lf), stats.harmonicmean(a), stats.harmonicmean(af)
print 'mean:',stats.mean(l), stats.mean(lf), stats.mean(a), stats.mean(af)
print 'median:',stats.median(l),stats.median(lf),stats.median(a),stats.median(af)
print 'medianscore:',stats.medianscore(l),stats.medianscore(lf),stats.medianscore(a),stats.medianscore(af)
print 'mode:',stats.mode(l),stats.mode(a)

print '\nMOMENTS'
print 'moment:',stats.moment(l),stats.moment(lf),stats.moment(a),stats.moment(af)
print 'variation:',stats.variation(l),stats.variation(a),stats.variation(lf),stats.variation(af)
print 'skew:',stats.skew(l),stats.skew(lf),stats.skew(a),stats.skew(af)
print 'kurtosis:',stats.kurtosis(l),stats.kurtosis(lf),stats.kurtosis(a),stats.kurtosis(af)
print 'tmean:',stats.tmean(a,(5,17)),stats.tmean(af,(5,17))
print 'tvar:',stats.tvar(a,(5,17)),stats.tvar(af,(5,17))
print 'tstdev:',stats.tstdev(a,(5,17)),stats.tstdev(af,(5,17))
print 'tsem:',stats.tsem(a,(5,17)),stats.tsem(af,(5,17))
print 'describe:'
print stats.describe(l)
print stats.describe(lf)
print stats.describe(a)
print stats.describe(af)

print '\nFREQUENCY'
print 'freqtable:'
print 'itemfreq:'
Esempio n. 3
0
 def test_variation(self):
     "Testing variation"
     data = [self.L, self.A, self.LF, self.AF]
     for d in data:
         self.EQ(stats.variation(d), 54.9169647365)
Esempio n. 4
0
 def test_variation(self):
     "Testing variation"
     data = [ self.L, self.A, self.LF, self.AF ]
     for d in data:
         self.EQ( stats.variation( d ), 54.9169647365 )
Esempio n. 5
0
print '\nCENTRAL TENDENCY'
print 'geometricmean:', stats.geometricmean(l), stats.geometricmean(
    lf), stats.geometricmean(a), stats.geometricmean(af)
print 'harmonicmean:', stats.harmonicmean(l), stats.harmonicmean(
    lf), stats.harmonicmean(a), stats.harmonicmean(af)
print 'mean:', stats.mean(l), stats.mean(lf), stats.mean(a), stats.mean(af)
print 'median:', stats.median(l), stats.median(lf), stats.median(
    a), stats.median(af)
print 'medianscore:', stats.medianscore(l), stats.medianscore(
    lf), stats.medianscore(a), stats.medianscore(af)
print 'mode:', stats.mode(l), stats.mode(a)

print '\nMOMENTS'
print 'moment:', stats.moment(l), stats.moment(lf), stats.moment(
    a), stats.moment(af)
print 'variation:', stats.variation(l), stats.variation(a), stats.variation(
    lf), stats.variation(af)
print 'skew:', stats.skew(l), stats.skew(lf), stats.skew(a), stats.skew(af)
print 'kurtosis:', stats.kurtosis(l), stats.kurtosis(lf), stats.kurtosis(
    a), stats.kurtosis(af)
print 'tmean:', stats.tmean(a, (5, 17)), stats.tmean(af, (5, 17))
print 'tvar:', stats.tvar(a, (5, 17)), stats.tvar(af, (5, 17))
print 'tstdev:', stats.tstdev(a, (5, 17)), stats.tstdev(af, (5, 17))
print 'tsem:', stats.tsem(a, (5, 17)), stats.tsem(af, (5, 17))
print 'describe:'
print stats.describe(l)
print stats.describe(lf)
print stats.describe(a)
print stats.describe(af)

print '\nFREQUENCY'
 def evaluate(self, *args, **params):
     return _stats.variation(*args, **params)