Пример #1
0
from metagenomics.plugins.statisticalTests.Fishers import Fishers
from metagenomics.plugins.statisticalTests.ChiSquare import ChiSquare
from metagenomics.plugins.statisticalTests.ChiSquareYates import ChiSquareYates
from metagenomics.plugins.statisticalTests.GTest import GTest
from metagenomics.plugins.statisticalTests.GTestYates import GTestYates
from metagenomics.plugins.statisticalTests.Permutation import Permutation
from metagenomics.plugins.statisticalTests.DiffBetweenProp import DiffBetweenProp
from metagenomics.plugins.statisticalTests.Bootstrap import Bootstrap 
from metagenomics.plugins.statisticalTests.Barnard import Barnard 

fishers = Fishers()
chiSquare = ChiSquare()
chiSquareYates = ChiSquareYates()
gTest = GTest()
gTestYates = GTestYates()
permutation = Permutation()
diffBetweenProp = DiffBetweenProp()
bootstrap = Bootstrap()
barnard = Barnard()

sampleSizes = [5, 10, 15, 25]

def mean(x):
  if len(x) == 0:
    return 0
    
  sum = 0.0
  for i in xrange(0, len(x)):
    sum += x[i]
  return sum / len(x)