def getSufficientStatistic(multinomials):
    N = len(multinomials)
    K = len(multinomials[0])
    retVal = ([0] * K)
    for m in multinomials:
        for k in range(0, K):
            retVal[k] += math.log(m[k])
    for k in range(0, K):
        retVal[k] /= N
    return retVal
def getSufficientStatistic(multinomials):
    N = len(multinomials)
    K = len(multinomials[0])
    retVal = ([0] * K)
    for m in multinomials:
        for k in range(0, K):
            retVal[k] += math.log(m[k])
    for k in range(0, K):
        retVal[k] /= N
    return retVal